/* ========================================
   影像现场 — 极简风格摄影网站
   ======================================== */

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

:root {
    --color-bg: #fafafa;
    --color-text: #1a1a1a;
    --color-text-secondary: #555;
    --color-text-muted: #999;
    --color-border: #e8e8e8;
    --color-card-bg: #ffffff;
    --color-accent: #2c2c2c;
    --color-accent-light: #f0f0f0;
    --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;
    --max-width: 1040px;
    --transition: all 0.35s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    transition: var(--transition);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.main-nav {
    display: flex;
    gap: 26px;
}

.main-nav a {
    font-size: 13px;
    color: var(--color-text-secondary);
    position: relative;
    padding: 4px 0;
}

.main-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width 0.3s ease;
}

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

.main-nav a:hover::after {
    width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

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

/* --- Hero Section --- */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

.hero-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- Content Grid --- */
.content-grid {
    padding: 80px 0;
}

.content-grid .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

/* --- Card --- */
.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    cursor: default;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--color-text);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

/* Card Image */
.card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

/* 图片加载前的占位骨架屏 */
.card-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    z-index: 0;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: grayscale(15%) contrast(1.02);
    position: relative;
    z-index: 1;
    opacity: 0;
}

.card-image img.loaded {
    opacity: 1;
}

.card:hover .card-image img {
    transform: scale(1.04);
    filter: grayscale(0%) contrast(1);
}

/* Card Body */
.card-body {
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-number {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text);
}

.card-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 18px;
    flex: 1;
}

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

.card-tags span {
    font-size: 11px;
    color: var(--color-text-muted);
    background: var(--color-accent-light);
    padding: 3px 10px;
    border-radius: 2px;
    letter-spacing: 0.03em;
}

/* --- About Section --- */
.about {
    padding: 80px 0;
    border-top: 1px solid var(--color-border);
    background: #fff;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--color-text);
}

.about-text {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 2;
    max-width: 680px;
    margin-bottom: 16px;
}

.about-text strong {
    color: var(--color-text);
    font-weight: 600;
}

/* --- Footer --- */
.site-footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-brand .logo {
    display: block;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    line-height: 1.8;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
    }

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

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 140px 0 60px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .content-grid {
        padding: 50px 0;
    }

    .content-grid .container {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card-body {
        padding: 22px 22px 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

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

    .card-title {
        font-size: 17px;
    }

    .card-desc {
        font-size: 13px;
    }

    .card-image {
        aspect-ratio: 4 / 3;
    }
}

/* --- Scroll Animation --- */
.card {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:nth-child(9) { animation-delay: 0.45s; }
.card:nth-child(10) { animation-delay: 0.5s; }
.card:nth-child(11) { animation-delay: 0.55s; }
.card:nth-child(12) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Selection --- */
::selection {
    background: var(--color-text);
    color: var(--color-bg);
}

/* --- Image loading fade-in --- */
.card-image img {
    transition: opacity 0.5s ease, transform 0.6s ease, filter 0.4s ease;
}

/* --- Lazy load placeholder --- */
.card-image img[loading="lazy"] {
    opacity: 0;
}
