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

:root {
    --sidebar-width: 260px;
    --bg-color: #faf9f6;
    --text-color: #333333;
    --text-light: #888888;
    --text-hover: #000000;
    --accent-color: #e8a838;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* ========================================
   Sidebar (左侧固定导航)
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px 50px;
    background-color: var(--bg-color);
    z-index: 100;
    border-right: 1px solid rgba(0,0,0,0.05);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.logo-icon {
    width: 120px;
    height: 120px;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-link {
    font-size: 20px;
    color: var(--text-light);
    padding: 6px 0;
    transition: var(--transition);
    position: relative;
    width: fit-content;
}

.nav-link:hover {
    color: var(--text-hover);
}

.nav-link.active {
    color: var(--text-hover);
    font-weight: 500;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--text-hover);
}

/* 侧边栏底部 */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.copyright {
    font-size: 16px;
    color: #373737;
    line-height: 1.5;
}

/* ========================================
   Main Content (右侧主内容区)
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 50px 40px;
    min-height: 100vh;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

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

/* Hero */
.hero-section {
    margin-bottom: 50px;
    padding: 40px 0;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-light);
}

/* Section Title */
.section-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* ========================================
   Art Grid (作品网格)
   ======================================== */
.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-auto-flow: dense;
    gap: 35px;
    margin-bottom: 50px;
}

.art-item[data-size="wide"] {
    grid-column: span 2;
}

.art-item {
    cursor: pointer;
    transition: var(--transition);
    group: art;
}

.art-item:hover {
    transform: translateY(-4px);
}

.art-item:hover .art-image {
    box-shadow: var(--shadow-hover);
}

.art-image-wrapper {
    overflow: hidden;
    position: relative;
    background-color: #faf9f6;
    border-radius: 2px;
}

.art-image {
    width: 100%;
    height: auto;
    max-height: 85vh;   
    display: block;
    object-fit: contain;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

/* 图片尺寸变体 - 通过data-size控制
.art-item[data-size="small"] .art-image {
    aspect-ratio: 4 / 3;
}

.art-item[data-size="medium"] .art-image {
    aspect-ratio: 3 / 4;
}

.art-item[data-size="large"] .art-image {
    aspect-ratio: 1 / 1;
}

.art-item[data-size="wide"] .art-image {
    aspect-ratio: 16 / 9;
}

.art-item[data-size="tall"] .art-image {
    aspect-ratio: 2 / 3;
} */

/* 强制取消所有尺寸变体的固定比例 */
.art-item[data-size="small"] .art-image,
.art-item[data-size="medium"] .art-image,
.art-item[data-size="large"] .art-image,
.art-item[data-size="wide"] .art-image,
.art-item[data-size="tall"] .art-image {
    aspect-ratio: auto !important;
    height: auto !important;
}

/* 悬停时显示标题遮罩 */
.art-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.art-item:hover .art-overlay {
    opacity: 1;
}

.art-overlay-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

.art-info {
    margin-top: 14px;
    text-align: left;
}

.art-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.art-description {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ========================================
   About Section
   ======================================== */
.about-content {
    max-width: 1800px;
}

.about-text {
    font-size: 18px;
    line-height: 2;
    color: #555;
}

.about-text p {
    margin-bottom: 20px;
}

.contact-email {
    font-size: 18px;
    color: var(--text-color);
    font-weight: 500;
    margin-top: 24px !important;
}

/* ========================================
   Lightbox (图片查看弹窗)
   ======================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-caption {
    color: white;
    font-size: 16px;
    margin-top: 16px;
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 36px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* ========================================
   Mobile Header (移动端顶部导航)
   ======================================== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-color);
    z-index: 200;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mobile-logo {
    font-size: 18px;
    font-weight: 600;
}

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

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
}

/* 移动端导航菜单 */
.mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-color);
    z-index: 199;
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav .nav-link {
    font-size: 18px;
    padding: 8px 0;
}