/**
 * Main Styles - Austin's Portfolio Site
 * Refactored with Modern CSS
 */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.7;
    background: var(--bg-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    position: relative;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    line-height: 1.3;
}

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

#main {
    margin-left: calc(var(--header-width) + 40px);
    transition: margin-left var(--transition-slow);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Header / Sidebar - Glass Floating Style */
#header {
    position: fixed;
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: var(--header-width);
    background: rgba(4, 11, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-md);
    overflow-y: auto;
    overflow-x: visible;
    z-index: var(--z-fixed);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-slow);
}

/* Collapsed Sidebar - triggered by body.sidebar-collapsed */
body.sidebar-collapsed #header {
    width: 70px;
    padding: var(--space-sm);
}

body.sidebar-collapsed #header .profile-name,
body.sidebar-collapsed #header .social-links,
body.sidebar-collapsed #header .nav-menu span,
body.sidebar-collapsed #header .language-switcher,
body.sidebar-collapsed #header .sidebar-footer {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    position: absolute;
    pointer-events: none;
}

body.sidebar-collapsed #header .profile-img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    border-width: 3px;
}

body.sidebar-collapsed #header .profile {
    padding: var(--space-xs) 0;
}

body.sidebar-collapsed #header .nav-menu a {
    justify-content: center;
    padding: 12px;
}

body.sidebar-collapsed #header .nav-menu a i {
    margin: 0;
    font-size: 22px;
}

.header-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Profile */
.profile {
    text-align: center;
    padding: var(--space-md) 0;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    border: 8px solid var(--border-color);
    margin: 0 auto var(--space-md);
    object-fit: cover;
}

.profile-name {
    font-size: var(--fs-lg);
    font-family: var(--font-accent);
    margin-bottom: var(--space-md);
}

.profile-name a {
    color: var(--text-white);
}

.profile-name a:hover {
    color: var(--color-primary);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #212431;
    color: var(--text-white);
    border-radius: var(--radius-full);
    font-size: 18px;
    transition: background var(--transition-base);
}

.social-links a:hover {
    background: var(--color-primary);
    color: var(--text-white);
}

/* Navigation */
.nav-menu {
    padding-top: var(--space-xl);
    flex-grow: 1;
}

.nav-menu ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-light);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all var(--transition-base);
}

.nav-menu a i {
    font-size: 24px;
    color: #6f7180;
    transition: color var(--transition-base);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-white);
}

.nav-menu a:hover i,
.nav-menu a.active i {
    color: var(--color-primary);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
}

.lang-btn {
    padding: 8px 16px;
    background: #212431;
    color: var(--text-white);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    transition: all var(--transition-base);
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--color-primary);
}

/* Sidebar Footer */
.sidebar-footer {
    text-align: center;
    padding: var(--space-md) 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-footer .copyright {
    margin-bottom: var(--space-xs);
}

/* Sidebar Toggle - As Nav Item */
.nav-toggle-item {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-light);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all var(--transition-base);
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.sidebar-toggle i {
    font-size: 24px;
    color: #6f7180;
    transition: all var(--transition-base);
}

.sidebar-toggle:hover {
    color: var(--text-white);
}

.sidebar-toggle:hover i {
    color: var(--color-primary);
}

body.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar-toggle span {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    position: absolute;
    pointer-events: none;
}

body.sidebar-collapsed .sidebar-toggle {
    justify-content: center;
    padding: 12px;
}

body.sidebar-collapsed .nav-toggle-item {
    padding-top: var(--space-sm);
    border-top: none;
}

body.sidebar-collapsed #main {
    margin-left: 110px;
}

/* =====================================================
   Mobile Navigation - 全新独立设计
===================================================== */

/* 移动端顶部栏 - 默认隐藏 */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(4, 11, 20, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 9998;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* 菜单激活时的顶部栏样式 */
body.mobile-nav-active .mobile-header {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}

.mobile-logo {
    font-family: var(--font-accent);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--text-white) 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.3s ease;
}

/* 菜单激活时隐藏 logo */
body.mobile-nav-active .mobile-logo {
    opacity: 0;
    pointer-events: none;
}

.mobile-logo:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 汉堡按钮 - 更现代的设计 */
.mobile-nav-toggle {
    display: none;
    width: 24px;
    height: 18px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 9999;
    /* 确保垂直居中对齐 */
    flex-shrink: 0;
    align-self: center;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-white);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-line:nth-child(1) { top: 0; width: 100%; }
.hamburger-line:nth-child(2) { top: 50%; transform: translateY(-50%); width: 80%; }
.hamburger-line:nth-child(3) { bottom: 0; width: 60%; }

/* 汉堡按钮 hover 效果 */
.mobile-nav-toggle:hover .hamburger-line:nth-child(2),
.mobile-nav-toggle:hover .hamburger-line:nth-child(3) {
    width: 100%;
}

/* 汉堡按钮激活状态 - 变成X */
body.mobile-nav-active .hamburger-line {
    background: var(--color-primary);
}

body.mobile-nav-active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 100%;
}

body.mobile-nav-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
    width: 100%;
}

body.mobile-nav-active .hamburger-line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
    width: 100%;
}

/* 移动端全屏导航菜单 - 默认隐藏 */
.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(4, 11, 20, 0.97) 0%,
        rgba(10, 25, 47, 0.98) 50%,
        rgba(4, 11, 20, 0.97) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 9995;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s ease;
    overflow: hidden; /* 禁止滚动 */
}

/* 装饰性背景元素 */
.mobile-nav-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%,
        rgba(20, 157, 221, 0.08) 0%,
        transparent 50%);
    pointer-events: none;
}

body.mobile-nav-active .mobile-nav-menu {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100%;
    padding: 90px 24px 60px;
    position: relative;
    z-index: 1;
}

/* 移动端导航用户头像 */
.mobile-nav-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 36px;
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

body.mobile-nav-active .mobile-nav-profile {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.mobile-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(20, 157, 221, 0.4);
    box-shadow: 0 8px 30px rgba(20, 157, 221, 0.25);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.mobile-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-profile-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: 1px;
    margin: 0;
    background: linear-gradient(135deg, var(--text-white) 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航链接容器 */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin-bottom: auto;
}

/* 单个导航链接 */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    position: relative;
    overflow: hidden;
}

/* 链接悬浮光效 */
.mobile-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(20, 157, 221, 0.15) 0%,
        transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.mobile-nav-active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 延迟动画 - 更流畅的交错效果 */
body.mobile-nav-active .mobile-nav-link:nth-child(1) { transition-delay: 0.08s; }
body.mobile-nav-active .mobile-nav-link:nth-child(2) { transition-delay: 0.14s; }
body.mobile-nav-active .mobile-nav-link:nth-child(3) { transition-delay: 0.20s; }
body.mobile-nav-active .mobile-nav-link:nth-child(4) { transition-delay: 0.26s; }
body.mobile-nav-active .mobile-nav-link:nth-child(5) { transition-delay: 0.32s; }

.mobile-nav-link:hover::before,
.mobile-nav-link:active::before {
    opacity: 1;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: rgba(20, 157, 221, 0.12);
    border-color: rgba(20, 157, 221, 0.35);
    transform: scale(1.02) translateX(4px);
    box-shadow: 0 8px 25px rgba(20, 157, 221, 0.15);
}

.mobile-nav-link.active {
    background: rgba(20, 157, 221, 0.1);
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(20, 157, 221, 0.2);
}

.mobile-nav-link.active::after {
    content: '';
    position: absolute;
    right: 20px;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary);
}

.mobile-nav-link .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg,
        rgba(20, 157, 221, 0.2) 0%,
        rgba(20, 157, 221, 0.1) 100%);
    border-radius: 14px;
    font-size: 1.3rem;
    color: var(--color-primary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-nav-link:hover .nav-icon,
.mobile-nav-link:active .nav-icon {
    background: linear-gradient(135deg,
        rgba(20, 157, 221, 0.35) 0%,
        rgba(20, 157, 221, 0.2) 100%);
    transform: scale(1.05);
}

.mobile-nav-link .nav-text {
    flex: 1;
    letter-spacing: 0.5px;
}

/* 底部区域 */
.mobile-nav-footer {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

body.mobile-nav-active .mobile-nav-footer {
    opacity: 1;
    transform: translateY(0);
}

/* 语言切换 */
.mobile-lang-switcher {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-lang-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.mobile-lang-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-lang-btn.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1089c9 100%);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(20, 157, 221, 0.35);
}

/* 社交链接 */
.mobile-social-links {
    display: flex;
    gap: 16px;
}

.mobile-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-social-links a:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-white);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(20, 157, 221, 0.3);
}

/* Hero Section */
#hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh; /* 动态视口高度，修复 iOS Safari */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('../assets/img/hero-bg.jpg') center center / cover no-repeat;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 13, 24, 0.7) 0%, rgba(5, 13, 24, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(600px, calc(100% - 40px));
    padding: var(--space-xl);
    text-align: center;
    /* 防止内容溢出 */
    box-sizing: border-box;
}

/* 桌面端 Hero 内容在屏幕中心 - 补偿 #main 的 margin-left */
@media (min-width: 1200px) {
    #hero {
        /* 让 hero 向左扩展，覆盖侧边栏区域 */
        margin-left: calc(-1 * (var(--header-width) + 40px));
        width: 100vw;
        max-width: 100vw;
    }

    body.sidebar-collapsed #hero {
        margin-left: calc(-1 * (70px + 40px));
    }
}

/* Premium Frosted Glass Hero Card */
.hero-card {
    padding: var(--space-2xl) var(--space-xl);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 -20px 40px -20px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent);
}

.hero-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card h1 {
    font-size: var(--fs-2xl);
    color: var(--text-white);
    margin-bottom: var(--space-xs);
    font-weight: var(--fw-bold);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.hero-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    padding: var(--space-xs) var(--space-lg);
    font-size: var(--fs-base);
    font-family: var(--font-accent);
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title .typed {
    color: var(--color-primary);
    font-weight: var(--fw-semibold);
}

.hero-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    text-align: left;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    border-left: 2px solid rgba(20, 157, 221, 0.6);
    transition: all var(--transition-base);
}

.highlight-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--color-primary);
    transform: translateX(3px);
}

.highlight-item i {
    font-size: var(--fs-lg);
    color: var(--color-primary);
    flex-shrink: 0;
    text-shadow: 0 2px 8px rgba(20, 157, 221, 0.4);
}

.highlight-item span {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--fs-sm);
    line-height: 1.5;
    font-weight: var(--fw-medium);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-xl);
    background: rgba(20, 157, 221, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-white);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    border-radius: var(--radius-pill);
    text-decoration: none;
    border: 1px solid rgba(20, 157, 221, 0.5);
    transition: all var(--transition-base);
}

.hero-cta:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 157, 221, 0.4);
}

.hero-cta i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(5px); }
    60% { transform: translateY(3px); }
}

/* Section Common Styles - Dark Theme */
.section {
    padding: var(--section-padding) 0;
    overflow: hidden;
    background: var(--bg-dark);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

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

.section:nth-child(even) {
    background: var(--bg-section);
}

.section-title {
    padding-bottom: var(--space-lg);
}

.section-title h2 {
    font-size: var(--fs-xl);
    color: var(--text-heading);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent-cyan));
    border-radius: 2px;
}

.section-title p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

/* About Section - Dark Theme */
.about-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.about-image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    width: 100%;
    border: 2px solid var(--border-color);
}

.about-info h3 {
    font-size: var(--fs-md);
    color: var(--text-heading);
    margin-bottom: var(--space-xs);
}

.about-info {
    display: flex;
    flex-direction: column;
}

.about-subheading2 {
    font-size: var(--fs-sm) !important;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: var(--space-md) !important;
    color: var(--color-accent-cyan);
    font-weight: var(--fw-semibold);
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
    padding: var(--space-xs) var(--space-md);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(20, 157, 221, 0.05));
    border-radius: var(--radius-pill);
    border: 1px solid rgba(34, 211, 238, 0.2);
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.about-details ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.about-details li {
    display: flex;
    flex-wrap: wrap;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--border-light);
}

.about-details strong {
    min-width: 100px;
    color: var(--color-primary-light);
    margin-right: var(--space-sm);
    font-weight: var(--fw-semibold);
}

.about-details span {
    color: var(--text-primary);
}

.about-long-desc {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Resume Section - Dark Theme */
.resume-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(135deg, rgba(20, 157, 221, 0.15) 0%, rgba(34, 211, 238, 0.08) 100%);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    color: var(--text-white);
    text-align: center;
    box-shadow: var(--shadow-glow-sm);
    transition: all var(--transition-base);
    min-width: 120px;
    flex: 1;
    max-width: 180px;
}

/* 可点击的统计卡片 */
.stat-item.clickable {
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(20, 157, 221, 0.3) 0%, rgba(34, 211, 238, 0.2) 100%);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    font-size: 24px;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.stat-number {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    line-height: 1;
    margin-bottom: var(--space-xs);
    color: var(--color-primary-light);
}

.stat-label {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-detail {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: var(--space-xs);
    opacity: 0.8;
}

.resume-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.resume-section {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(20, 157, 221, 0.2);
    transition: all 0.5s ease;
}

/* 统计卡片点击后的高亮效果 */
.resume-section.highlight-section {
    border-color: var(--color-primary);
    box-shadow: 0 0 30px rgba(20, 157, 221, 0.4), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.resume-section-highlight {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(10, 22, 40, 0.95) 100%);
    border-color: rgba(34, 211, 238, 0.4);
}

.resume-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-lg);
    color: var(--text-heading);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-primary);
}

.resume-section-highlight .resume-section-title {
    border-bottom-color: var(--color-accent-cyan);
}

.resume-section-highlight .resume-section-title i {
    color: var(--color-accent-cyan);
}

.resume-section-title i {
    font-size: var(--fs-xl);
    color: var(--color-primary);
}

.resume-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.resume-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.resume-title {
    font-size: var(--fs-lg);
    color: var(--text-heading);
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.resume-title:first-child {
    margin-top: 0;
}

.resume-item {
    position: relative;
    padding: var(--space-md);
    padding-left: var(--space-xl);
    margin-bottom: var(--space-xs);
    border-left: 3px solid var(--color-primary);
    background: rgba(20, 157, 221, 0.05);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transition: all var(--transition-base);
}

.resume-item:hover {
    background: rgba(20, 157, 221, 0.1);
    border-left-color: var(--color-accent-cyan);
}

.resume-item::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    left: -6.5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    border: 2px solid var(--bg-card-solid);
    box-shadow: var(--shadow-glow-sm);
}

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

.resume-item h4 {
    font-size: var(--fs-base);
    font-family: var(--font-accent);
    color: var(--text-heading);
    margin-bottom: var(--space-xs);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
}

.resume-item h5 {
    display: inline-block;
    font-size: var(--fs-sm);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent-cyan));
    color: var(--text-white);
    padding: 3px 10px;
    margin-bottom: var(--space-xs);
    font-weight: var(--fw-medium);
    border-radius: var(--radius-sm);
}

.resume-item em {
    color: var(--text-secondary);
    font-style: normal;
    font-size: var(--fs-sm);
}

.resume-item p {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.6;
    margin-top: var(--space-xs);
}

.resume-item ul {
    padding-left: var(--space-md);
    list-style: disc;
    margin-top: var(--space-xs);
}

.resume-item ul li {
    padding-bottom: var(--space-xs);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

/* Why Me Section - Dark Theme - Premium Design */
.why-me-subtitle {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.why-me-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.why-me-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-xl);
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(20, 157, 221, 0.2);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.why-me-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent-cyan));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.why-me-item:hover {
    background: rgba(20, 157, 221, 0.15);
    border-color: rgba(20, 157, 221, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(20, 157, 221, 0.2);
}

.why-me-item:hover::before {
    opacity: 1;
}

.why-me-item .icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 157, 221, 0.2), rgba(34, 211, 238, 0.1));
    border: 1px solid rgba(20, 157, 221, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: all var(--transition-base);
}

.why-me-item .icon i {
    font-size: 28px;
    color: var(--color-primary);
    transition: color var(--transition-base);
}

.why-me-item:hover .icon {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent-cyan));
    box-shadow: var(--shadow-glow-sm);
}

.why-me-item:hover .icon i {
    color: var(--text-white);
}

.why-me-item .content h4 {
    font-size: var(--fs-md);
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
    font-weight: var(--fw-semibold);
}

.why-me-item .content p {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Contact Section - Dark Theme - New Layout */
.contact {
    padding-bottom: 130px;
}

.contact-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.contact-card {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(20, 157, 221, 0.2);
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.contact-card:hover {
    border-color: rgba(20, 157, 221, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(20, 157, 221, 0.2);
}

.contact-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 157, 221, 0.2), rgba(34, 211, 238, 0.1));
    border: 1px solid rgba(20, 157, 221, 0.3);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.contact-card-icon i {
    font-size: 28px;
    color: var(--color-primary);
}

.contact-card:hover .contact-card-icon {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent-cyan));
}

.contact-card:hover .contact-card-icon i {
    color: var(--text-white);
}

.contact-card h4 {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-card p {
    font-size: var(--fs-base);
    color: var(--text-heading);
    margin: 0;
}

.contact-card p a {
    color: var(--color-primary-light);
    word-break: break-all;
}

.contact-card p a:hover {
    color: var(--color-accent-cyan);
}

/* WeChat Full Width Section */
.contact-wechat-full {
    background: rgba(10, 22, 40, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(20, 157, 221, 0.2);
    padding: var(--space-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.wechat-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
}

.contact-wechat-full .wechat-qr-wrapper {
    flex-shrink: 0;
}

.contact-wechat-full .wechat-qr-code {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(20, 157, 221, 0.3);
    object-fit: cover;
    transition: all var(--transition-base);
}

.contact-wechat-full .wechat-qr-code:hover {
    border-color: var(--color-primary);
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(20, 157, 221, 0.3);
}

.wechat-info {
    text-align: left;
}

.wechat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(7, 193, 96, 0.2), rgba(7, 193, 96, 0.1));
    border: 1px solid rgba(7, 193, 96, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.wechat-icon i {
    font-size: 32px;
    color: #07c160;
}

.wechat-info h4 {
    font-size: var(--fs-lg);
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
}

.wechat-id {
    font-size: var(--fs-xl);
    font-weight: var(--fw-semibold);
    color: var(--color-primary-light);
    font-family: var(--font-accent);
    margin-bottom: var(--space-sm);
}

.wechat-hint {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

/* Footer - At bottom of main content */
#footer {
    padding: var(--space-xl) 0;
    background: var(--bg-darker);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    text-align: center;
    margin-left: calc(var(--header-width) + 40px);
    border-top: 1px solid var(--border-color);
    width: calc(100% - var(--header-width) - 40px);
    box-sizing: border-box;
}

#footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

#footer .copyright {
    text-align: center;
}

#footer .credits {
    text-align: center;
    font-size: 13px;
    color: #eaebf0;
}

#footer .credits a {
    color: var(--color-primary-light);
}

body.sidebar-collapsed #footer {
    margin-left: 110px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 15px;
    z-index: var(--z-sticky);
    background: var(--color-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 28px;
    transition: all var(--transition-base);
}

.back-to-top:hover {
    background: var(--color-primary-light);
    color: var(--text-white);
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}