/* ===== 似了家族 · 全站布局系统 ===== */

:root {
    --site-max: 980px;
    --site-wide: 1120px;
    --site-nav-h: 52px;
    --site-gap: 16px;
    --site-section-y: 72px;
    --site-radius: 18px;
    --site-radius-sm: 12px;
}

/* 全站基础 */
.site-page {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
        'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--apple-black);
    background: var(--apple-bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* —— 导航栏 —— */
.site-page .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--site-nav-h);
    padding: 0 24px;
    background: rgba(251, 251, 253, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    box-shadow: none;
}

.site-page .navbar.scrolled {
    background: rgba(251, 251, 253, 0.92);
    border-bottom-color: var(--apple-border);
}

.site-page .logo-container {
    cursor: default;
    text-decoration: none;
    color: inherit;
}

.site-page .logo-text {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--apple-black);
    background: none;
    -webkit-text-fill-color: var(--apple-black);
}

.site-page .nav-links {
    gap: 20px;
}

.site-page .nav-links a {
    font-size: 12px;
    font-weight: 400;
    color: var(--apple-black);
    opacity: 0.72;
    padding: 4px 0;
}

.site-page .nav-links a::after {
    display: none;
}

.site-page .nav-links a:hover,
.site-page .nav-links a.active {
    opacity: 1;
    font-weight: 500;
    color: var(--apple-black);
}

.site-page .btn-download {
    background: var(--apple-blue);
    color: #fff;
    border: none;
    border-radius: 980px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: none;
    text-decoration: none;
}

.site-page .btn-download:hover {
    background: #0077ed;
    box-shadow: none;
}

.site-page .btn-login {
    display: none;
}

/* —— 页面主结构 —— */
.page-main {
    padding-top: var(--site-nav-h);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-header {
    text-align: center;
    padding: 56px 24px 40px;
    max-width: var(--site-max);
    margin: 0 auto;
    width: 100%;
}

.page-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--apple-gray);
    margin-bottom: 10px;
}

.page-title {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--apple-black);
    margin-bottom: 10px;
}

.page-desc {
    font-size: 15px;
    line-height: 1.5;
    color: var(--apple-gray);
    max-width: 480px;
    margin: 0 auto;
}

.page-desc strong {
    color: var(--apple-black);
    font-weight: 600;
}

.page-content {
    flex: 1;
    width: 100%;
    max-width: var(--site-max);
    margin: 0 auto;
    padding: 0 24px var(--site-section-y);
}

.page-toolbar {
    max-width: 320px;
    margin: 0 auto 32px;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--apple-gray);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 11px 16px 11px 40px;
    border: none;
    border-radius: var(--site-radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: rgba(0, 0, 0, 0.04);
    color: var(--apple-black);
    transition: background 0.25s var(--apple-ease), box-shadow 0.25s var(--apple-ease);
}

.search-box input::placeholder {
    color: var(--apple-gray);
}

.search-box input:focus {
    outline: none;
    background: var(--apple-white);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

/* —— 通用卡片网格 —— */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--site-gap);
}

.card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* —— 页脚 —— */
.site-footer {
    background: var(--apple-bg);
    padding: 32px 24px 40px;
    border-top: 1px solid var(--apple-border);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--site-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-brand {
    font-size: 14px;
    font-weight: 600;
    color: var(--apple-black);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-nav a {
    font-size: 12px;
    color: var(--apple-gray);
    text-decoration: none;
    transition: color 0.2s var(--apple-ease);
}

.footer-nav a:hover {
    color: var(--apple-black);
}

.footer-copy {
    font-size: 11px;
    color: var(--apple-gray);
    margin: 0;
    text-align: center;
}

/* ===== 首页 index ===== */
.home-page .hero {
    min-height: calc(100vh - var(--site-nav-h));
    min-height: calc(100dvh - var(--site-nav-h));
    padding-top: var(--site-nav-h);
    background: var(--apple-white);
}

.home-page .gallery-section {
    background: var(--apple-bg);
    padding: var(--site-section-y) 0;
}

.home-page .gallery-section .page-header {
    padding-top: 0;
    padding-bottom: 32px;
}

.home-page .gallery-grid {
    max-width: var(--site-max);
    margin: 0 auto;
    padding: 0 24px;
}

.gallery-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--apple-gray);
    font-size: 15px;
}

/* ===== 班级采风 bj ===== */
.page-bj .photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--site-radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--apple-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.page-bj .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-bj .photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--site-gap);
}

/* ===== 作品集 shejiao ===== */
.page-portfolio .page-content {
    max-width: var(--site-wide);
}

.page-portfolio .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: var(--site-wide);
    margin: 0 auto;
    padding: 0 24px var(--site-section-y);
}

.page-portfolio .portfolio-card {
    background: var(--apple-white);
    border: none;
    border-radius: var(--site-radius);
    padding: 14px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-rows: 200px 1fr;
    gap: 12px;
}

.page-portfolio .portfolio-card .card-visual {
    border-radius: 14px;
    overflow: hidden;
}

.page-portfolio .portfolio-card .card-meta h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--apple-black);
    line-height: 1.3;
}

.page-portfolio .portfolio-card .card-meta p {
    font-size: 13px;
    color: var(--apple-gray);
    line-height: 1.5;
}

.page-portfolio .ghost-btn {
    padding: 6px 14px;
    border-radius: 980px;
    border: 1px solid var(--apple-border);
    background: rgba(0, 0, 0, 0.03);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s var(--apple-ease);
}

.page-portfolio .ghost-btn:hover {
    background: rgba(0, 113, 227, 0.08);
    color: var(--apple-blue);
}

.page-portfolio .meta-row {
    font-size: 12px;
    color: var(--apple-gray);
}

.page-portfolio .chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-portfolio .chip {
    padding: 7px 14px;
    border-radius: 980px;
    font-size: 12px;
    color: var(--apple-gray);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s var(--apple-ease);
}

.page-portfolio .chip.active,
.page-portfolio .chip:hover {
    color: var(--apple-black);
    background: var(--apple-white);
    border-color: var(--apple-border);
}

/* ===== 成就 me ===== */
.page-me .achievement-card {
    margin-bottom: 20px;
    background: var(--apple-white);
    border-radius: var(--site-radius);
    padding: 24px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

.page-me .gallery-edit-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--apple-black);
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--apple-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-me .gallery-images-grid {
    display: grid;
    gap: 12px;
    justify-items: center;
}

.page-me .gallery-images-grid.single-item {
    grid-template-columns: 1fr;
    max-width: 220px;
    margin: 0 auto;
}

.page-me .gallery-images-grid.two-items {
    grid-template-columns: repeat(2, 1fr);
    max-width: 440px;
    margin: 0 auto;
}

.page-me .gallery-images-grid.three-items {
    grid-template-columns: repeat(3, 1fr);
}

.page-me .gallery-image-item {
    aspect-ratio: 1;
    width: 100%;
    max-width: 220px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.page-me .gallery-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-me .gallery-empty-message {
    text-align: center;
    padding: 48px 20px;
    color: var(--apple-gray);
    font-size: 14px;
}

/* —— 响应式 —— */
@media (max-width: 768px) {
    :root {
        --site-nav-h: 48px;
        --site-section-y: 56px;
        --site-gap: 12px;
    }

    .site-page .navbar {
        padding: 0 16px;
    }

    .site-page .nav-buttons {
        display: none;
    }

    .page-header {
        padding: 40px 16px 28px;
    }

    .page-content {
        padding: 0 16px var(--site-section-y);
    }

    .home-page .gallery-grid {
        padding: 0 16px;
        grid-template-columns: repeat(2, 1fr);
    }

    .page-bj .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-portfolio .portfolio-grid {
        grid-template-columns: 1fr;
        padding: 0 16px var(--site-section-y);
    }

    .page-portfolio .portfolio-card {
        grid-template-rows: 180px 1fr;
    }

    .page-me .gallery-images-grid.single-item {
        max-width: 160px;
    }

    .footer-nav {
        gap: 14px;
    }
}

@media (min-width: 900px) {
    .page-me .gallery-images-grid.three-items {
        max-width: 660px;
        margin: 0 auto;
    }
}
