/* ============================================================
   个人作品集网站 — 样式表
   ============================================================ */

/* ----------------------------------------------------------
   1. Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --font-en: 'Raleway', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --font-default: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
    --bg: #FFFFFF;
    --panel: #F7F7F4;
    --panel-soft: #EFEFED;
    --text: #050505;
    --text-soft: #333333;
    --muted: #8A8A8A;
    --muted-dark: #626262;
    --line: rgba(0,0,0,0.10);
    --line-strong: rgba(0,0,0,0.18);
    --accent: #050505;
}

body {
    background-color: var(--bg);
    color: var(--text);
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    font-family: var(--font-en);
    letter-spacing: 0;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; }

/* ----------------------------------------------------------
   2. Raleway @font-face (local TTF)
   ---------------------------------------------------------- */
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 400;
    src: url('assets/fonts/Raleway-400.ttf') format('truetype');
}
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 500;
    src: url('assets/fonts/Raleway-500.ttf') format('truetype');
}
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 600;
    src: url('assets/fonts/Raleway-600.ttf') format('truetype');
}
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 700;
    src: url('assets/fonts/Raleway-700.ttf') format('truetype');
}
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 800;
    src: url('assets/fonts/Raleway-800.ttf') format('truetype');
}

/* ----------------------------------------------------------
   3. Keyframe Animations
   ---------------------------------------------------------- */
@keyframes fadeInUp {
    0%   { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* ----------------------------------------------------------
   4. Reveal Animation System
   ---------------------------------------------------------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; }
    .reveal.reveal-run { animation: fadeInUp 0.7s ease-out forwards; }
}
.reveal.reveal-run.reveal-delay-1 { animation-delay: 0.1s; }
.reveal.reveal-run.reveal-delay-2 { animation-delay: 0.2s; }
.reveal.reveal-run.reveal-delay-3 { animation-delay: 0.3s; }
.reveal.reveal-run.reveal-delay-4 { animation-delay: 0.4s; }
.reveal.reveal-run.reveal-delay-5 { animation-delay: 0.5s; }

/* ----------------------------------------------------------
   5. Shared Utilities
   ---------------------------------------------------------- */
.hairline {
    border: none;
    height: 1px;
    background: var(--line);
    margin: 0;
}
.hr-section         { margin-bottom: 36px; }
.hr-section--lg     { margin-bottom: 72px; }

.section-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding-left: clamp(20px, 4vw, 44px);
    padding-right: clamp(20px, 4vw, 44px);
}

.section-heading {
    font-family: var(--font-en);
    font-weight: 600;
    font-size: clamp(40px, 6vw, 64px);
    color: var(--text);
    margin: 0 0 12px 0;
    line-height: 0.98;
}
.section-subheading {
    font-family: var(--font-en);
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

/* ----------------------------------------------------------
   6. Top Navigation
   ---------------------------------------------------------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 86px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    padding: 32px 36px 0;
    background: #FFFFFF;
    color: #000000;
}

.nav-brand {
    justify-self: start;
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 20px;
    color: #252525;
    letter-spacing: -0.06em;
    line-height: 0.82;
    white-space: nowrap;
}

.nav-center {
    justify-self: center;
    display: flex;
    align-items: flex-start;
    gap: 31px;
}

.nav-link {
    font-family: var(--font-en);
    font-size: 18px;
    font-weight: 500;
    color: #9A9A9A;
    letter-spacing: -0.08em;
    line-height: 0.82;
    padding: 0;
    border-radius: 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link-active {
    color: #111111;
}

.nav-year {
    justify-self: end;
    font-family: var(--font-en);
    font-size: 18px;
    font-weight: 800;
    color: #252525;
    letter-spacing: -0.05em;
    line-height: 0.82;
}

.nav-hamburger {
    display: none;
    justify-self: end;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.16);
    color: #111111;
    cursor: pointer;
}

/* Mobile Menu */
#mobile-menu { transition: opacity 0.3s ease, transform 0.3s ease; }
.mobile-menu {
    position: fixed;
    top: 78px;
    left: 18px;
    right: 18px;
    z-index: 49;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.08);
}

.mobile-menu-link {
    display: block;
    font-family: var(--font-en);
    font-size: 22px;
    font-weight: 600;
    color: #111111;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.mobile-menu-link:hover { background: rgba(0,0,0,0.04); }

/* ----------------------------------------------------------
   7. Hero Section
   ---------------------------------------------------------- */
.hero-section {
    padding-top: clamp(120px, 14vh, 168px);
    padding-bottom: clamp(72px, 10vh, 112px);
    min-height: 92vh;
    display: flex;
    align-items: center;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(360px, 0.72fr);
    gap: clamp(42px, 7vw, 96px);
    align-items: center;
    width: 100%;
}
.hero-name {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: clamp(84px, 14vw, 168px);
    color: var(--text);
    line-height: 0.82;
    margin: 0 0 22px 0;
    letter-spacing: 0;
}
.hero-subtitle {
    font-family: var(--font-en);
    font-size: 18px;
    font-weight: 400;
    color: var(--text-soft);
    margin: 0 0 24px 0;
    line-height: 1.6;
}
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}
.hero-tag {
    font-family: var(--font-en);
    font-size: 10px;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.06em;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2px;
}
.hero-bio {
    font-family: var(--font-en);
    font-size: 15px;
    font-weight: 400;
    color: var(--text-soft);
    line-height: 1.8;
    max-width: 640px;
    margin: 0 0 32px 0;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.1em;
    padding: 12px 28px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hero-cta:hover { border-color: var(--accent); color: var(--accent); }

.hero-photo-wrap {
    display: flex;
    align-items: stretch;
}
.hero-photo-inner {
    width: 100%;
    overflow: hidden;
    border-radius: 2px;
    height: 100%;
    min-height: clamp(520px, 62vh, 760px);
}
.hero-photo-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ----------------------------------------------------------
   8. Section Spacing
   ---------------------------------------------------------- */
.section-experience  { padding: 92px clamp(20px, 4vw, 44px) 116px; max-width:1320px; margin:0 auto; }
.section-works       { padding: 0 clamp(20px, 4vw, 44px) 96px; }
.section-playground  { padding: 116px clamp(20px, 4vw, 44px) 112px; }
.section-contact     { padding: 0 clamp(20px, 4vw, 44px) 132px; }
.section-header       { margin-bottom: 52px; }
.section-header--lg   { margin-bottom: 60px; }

/* ----------------------------------------------------------
   9. Work Experience Cards
   ---------------------------------------------------------- */
.work-stack {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
    padding: 20px 0;
}
.work-card-container {
    position: relative;
    will-change: transform;
    transform: translateX(-130vw);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#work-stack .work-card-container:nth-child(1) { transition-delay: 0s; }
#work-stack .work-card-container:nth-child(2) { transition-delay: 0.07s; }
#work-stack .work-card-container:nth-child(3) { transition-delay: 0.14s; }

.work-card {
    width: 360px;
    background: #111111;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px 16px 41px 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.work-card-container:not(.active):not(.dimmed) .work-card:hover { scale: 1.1; }

#work-stack .work-card-container:nth-child(1) .work-card { animation: floatCard 3.5s ease-in-out infinite; }
#work-stack .work-card-container:nth-child(2) .work-card { animation: floatCard 3.0s ease-in-out infinite; }
#work-stack .work-card-container:nth-child(3) .work-card { animation: floatCard 2.5s ease-in-out infinite; }

.work-card-container.active {
    z-index: 10;
    scale: 1.2;
    transition: scale 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.work-card-container.active .work-card {
    box-shadow: 0 0 32px rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
.work-card-container.dimmed {
    opacity: 0.25;
    filter: blur(4px);
    transform: scale(0.92);
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
}

.work-card-logo {
    aspect-ratio: 1;
    width: 100%;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.work-card-logo img { width: 80%; height: 80%; object-fit: contain; }

.work-card-body { margin-top: 16px; padding: 0 4px; }
.work-card-body h4 {
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 18px;
    color: var(--text);
    margin: 0;
}
.work-role {
    font-family: var(--font-en);
    font-size: 12px;
    color: var(--muted-dark);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.work-role i { color: var(--accent); font-size: 14px; }
.work-card-desc {
    font-family: var(--font-en);
    font-size: 12px;
    color: var(--muted-dark);
    line-height: 1.6;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 12px;
    padding-top: 12px;
}

/* ----------------------------------------------------------
   10. Selected Works — Horizontal Projects
   ---------------------------------------------------------- */
.section-works {
    max-width: none;
    overflow: hidden;
}

.section-works .section-header--lg {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-works .hairline {
    display: none;
}

.section-works .section-heading br {
    display: none;
}

.section-works .section-subheading {
    margin-top: 18px;
    font-size: 22px;
    color: #8F8F8F;
}

.works-carousel {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    cursor: default;
}

.works-track {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 0 calc((100vw - min(41.6vw, 704px)) / 2);
    will-change: transform;
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card {
    position: relative;
    --project-image-bleed: 9%;
    flex: 0 0 min(41.6vw, 704px);
    /* The image expands by 9% on hover. Reserve room for the labels
       outside that expanded edge, with a consistent 10px breathing space. */
    padding-top: 76px;
    padding-bottom: 62px;
    cursor: pointer;
    color: var(--text);
    transform: translateX(0);
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    will-change: transform;
}

.project-card:hover,
.project-card.is-hovered {
    z-index: 3;
}

.works-track.is-card-hovering .project-card.is-before-hover {
    transform: translateX(6.5%);
}

.works-track.is-card-hovering .project-card.is-after-hover {
    transform: translateX(-6.5%);
}

.project-card:not(.is-current) {
    cursor: default;
}

.project-card.is-current {
    cursor: pointer;
}

.project-card-meta--top {
    position: absolute;
    /* Align to the visible (enlarged) image edge, rather than its unscaled box. */
    left: calc(var(--project-image-bleed) * -1);
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text);
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.18;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.project-card-meta--top span {
    font-size: 13px;
}

.project-card-meta--top strong {
    font-weight: 600;
}

.project-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: transparent;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card:hover .project-card-image img {
    transform: scale(1.025);
}

.project-card:hover .project-card-image,
.project-card.is-hovered .project-card-image {
    transform: scale(1.18);
}

.works-track.is-card-hovering .project-card:not(:hover) .project-card-image {
    transform: scale(0.7);
}

.project-card-year {
    position: absolute;
    right: calc(var(--project-image-bleed) * -1);
    bottom: 0;
    color: var(--text);
    font-family: var(--font-default);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.project-card.is-current:hover .project-card-meta--top,
.project-card.is-current:hover .project-card-year,
.project-card.is-current.is-hovered .project-card-meta--top,
.project-card.is-current.is-hovered .project-card-year {
    opacity: 1;
}

/* ----------------------------------------------------------
   11. Gallery (Masonry)
   ---------------------------------------------------------- */
.gallery-mixed { columns: 3; gap: 12px; }
.gallery-mixed .g-item {
    break-inside: avoid;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: opacity 0.3s ease, scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gallery-mixed .g-item:hover { animation: floatCard 3.5s ease-in-out infinite; }
.gallery-mixed .g-item.active  { scale: 1.05; opacity: 1; z-index: 2; }
.gallery-mixed .g-item.dimmed { scale: 0.95; opacity: 0.50; }
.gallery-mixed .g-item::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #F5F5F5;
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.gallery-mixed .g-item:hover::after { opacity: 1; }
.gallery-mixed .g-item img { width: 100%; display: block; }

.gallery-cta-btn {
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 500;
    color: #F5F5F5;
    letter-spacing: 0.1em;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 12px 28px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.gallery-cta-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ----------------------------------------------------------
   12. Infinite Gallery Overlay
   ---------------------------------------------------------- */
#infinite-gallery {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #0D0D0D;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.32,0.72,0,1);
}
#infinite-gallery::-webkit-scrollbar { width: 8px; }
#infinite-gallery::-webkit-scrollbar-track { background: transparent; }
#infinite-gallery::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.15); border-radius: 20px; }

.gallery-overlay-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #0D0D0D;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gallery-overlay-title {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 22px;
    color: #F5F5F5;
    margin: 0;
}
.gallery-overlay-subtitle {
    font-family: var(--font-en);
    font-size: 11px;
    color: #888;
}

#infinite-masonry-grid {
    columns: 3;
    gap: 12px;
    padding: 16px 24px;
    max-width: 1280px;
    margin: 0 auto;
}
.inf-card {
    break-inside: avoid;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
    transition: opacity 0.3s ease, scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.inf-card:hover { animation: floatCard 3.5s ease-in-out infinite; }
.inf-card.active  { scale: 1.05; opacity: 1; z-index: 2; }
.inf-card.dimmed { scale: 0.95; opacity: 0.50; }
.inf-card img { width: 100%; display: block; border-radius: 12px; }

/* ----------------------------------------------------------
   13. Contact Section
   ---------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.contact-card-wrapper .contact-card {
    animation: floatCard 3.5s ease-in-out infinite;
    transition: scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.contact-card-wrapper .contact-card:hover { scale: 1.06; }
.contact-card-wrapper:nth-child(2) .contact-card { animation-duration: 3s; }
.contact-card-wrapper:nth-child(3) .contact-card { animation-duration: 2.5s; }

.contact-card {
    display: block;
    background: #0D0D0D;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 44px 28px 36px;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s ease;
}
.contact-card:hover { border-color: rgba(176,38,255,0.3); background: #111111; }
.contact-card h3 {
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 20px;
    color: var(--text);
    margin: 0 0 10px 0;
}
.contact-card-icon-wrap {
    width: 56px;
    height: 56px;
    background: #1A1A1A;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: background 0.35s ease;
}
.contact-card:hover .contact-card-icon-wrap { background: #222222; }
.contact-card-icon { font-size: 24px; color: #F5F5F5; }
.contact-card-text {
    font-family: var(--font-default);
    font-size: 13px;
    font-weight: 400;
    color: #888;
    margin: 0;
    word-break: break-all;
    transition: color 0.35s ease;
}

/* Footer */
.footer-hr { margin-top: 80px; margin-bottom: 24px; }
.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-brand {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 14px;
    color: #F5F5F5;
    letter-spacing: 0.05em;
}
.footer-copy {
    font-family: var(--font-default);
    font-size: 11px;
    font-weight: 400;
    color: #888;
}

/* ----------------------------------------------------------
   14. WeChat Modal
   ---------------------------------------------------------- */
#wechat-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    opacity: 0;
    padding: 24px;
    transition: opacity 0.3s ease;
}
.wechat-modal-inner {
    background: #1A1A1A;
    padding: 32px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 300px;
    width: 100%;
}
.wechat-qr-wrap {
    width: 220px;
    height: 220px;
    background: #0D0D0D;
    border-radius: 12px;
    overflow: hidden;
}
.wechat-qr-wrap img { width: 100%; height: 100%; object-fit: cover; }
.wechat-modal-text {
    font-family: var(--font-en);
    font-size: 13px;
    color: #888;
    margin: 0;
}
.wechat-modal-btns { display: flex; gap: 12px; width: 100%; }

.btn-primary-outline {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    color: #F5F5F5;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.btn-primary-outline:hover { border-color: rgba(176,38,255,0.5); color: #B026FF; }
.btn-secondary-outline {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    color: #888;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.btn-secondary-outline:hover { border-color: rgba(255,255,255,0.2); color: #F5F5F5; }

/* ----------------------------------------------------------
   15. Close Buttons (shared)
   ---------------------------------------------------------- */
.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #CCC;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.close-btn:hover { background: #B026FF; color: #0D0D0D; }

.simple-close-btn {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    color: #CCC;
    background: rgba(255,255,255,0.08);
    border: none;
    padding: 12px 28px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.simple-close-btn:hover { background: rgba(255,255,255,0.15); }

/* ----------------------------------------------------------
   16. Artwork Modal
   ---------------------------------------------------------- */
#artwork-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.artwork-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #CCC;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}
.artwork-modal-close:hover { background: rgba(255,255,255,0.2); }

#artwork-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
#artwork-modal-img {
    max-height: 70vh;
    width: auto;
    object-fit: contain;
    border-radius: 2px;
}
.artwork-modal-info { margin-top: 24px; text-align: center; }
.artwork-modal-tag {
    font-family: var(--font-en);
    font-size: 10px;
    font-weight: 500;
    color: #B026FF;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}
.artwork-modal-title {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 28px;
    color: #F5F5F5;
    margin: 0;
}

/* ----------------------------------------------------------
   17. Toast Notification
   ---------------------------------------------------------- */
#toast-notification {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translate(-50%, 20px);
    z-index: 400;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 4px;
    background: #1A1A1A;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}
.toast-icon { color: #B026FF; font-size: 18px; }
#toast-message {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 400;
    color: #CCC;
}

/* ----------------------------------------------------------
   18. Project Detail Page
   ---------------------------------------------------------- */
#project-detail-page {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #0D0D0D;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.32,0.72,0,1);
    overscroll-behavior: contain;
    isolation: isolate;
}
#project-detail-page::-webkit-scrollbar { width: 8px; }
#project-detail-page::-webkit-scrollbar-track { background: transparent; }
#project-detail-page::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.15); border-radius: 20px; }

.detail-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #0D0D0D;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.detail-header-left h2 {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 20px;
    color: #F5F5F5;
    margin: 0;
}
.detail-header-left span {
    font-family: var(--font-en);
    font-size: 11px;
    color: #888;
    display: none;
}
.detail-body {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 80px;
}
#detail-long-container {
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#detail-long-container img {
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

.detail-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 48px 0;
}
.detail-close-btn {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    color: #CCC;
    background: rgba(255,255,255,0.08);
    border: none;
    padding: 12px 28px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.detail-close-btn:hover { background: rgba(255,255,255,0.15); }
.detail-next-btn {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    color: #0D0D0D;
    background: #F5F5F5;
    border: none;
    padding: 12px 28px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.detail-next-btn:hover { background: #B026FF; }

/* ----------------------------------------------------------
   19. Responsive — 1024px+
   ---------------------------------------------------------- */
@media (min-width: 768px) {
    .inf-card { margin-bottom: 16px; }
}

/* ----------------------------------------------------------
   20. Responsive — 768px and below (tablet)
   ---------------------------------------------------------- */
@media (max-width: 900px) {
    .site-nav {
        height: 76px;
        grid-template-columns: 1fr auto;
        padding: 24px 20px 0;
    }
    .nav-brand {
        font-size: 18px;
    }
    .nav-center,
    .nav-year {
        display: none;
    }
    .nav-hamburger {
        display: flex;
    }
    .mobile-menu {
        display: flex;
    }
    .gallery-mixed { columns: 2; }
}

@media (max-width: 767px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-photo-inner {
        min-height: 420px;
    }
    .works-track {
        gap: 18px;
        padding: 0 calc((100vw - 65.6vw) / 2);
    }
    .project-card {
        flex-basis: 65.6vw;
        padding-top: 56px;
        padding-bottom: 40px;
    }
    .project-card-meta--top {
        font-size: 13px;
    }
    .project-card-meta--top span {
        font-size: 13px;
    }
    .project-card-year {
        font-size: 14px;
    }
}

/* ----------------------------------------------------------
   21. Responsive — 480px and below (mobile)
   ---------------------------------------------------------- */
@media (max-width: 600px) {
    .gallery-mixed { columns: 1; }
}

@media (max-width: 480px) {
    .work-card { width: 300px; }
    .contact-grid { grid-template-columns: 1fr; }
    .section-heading {
        font-size: clamp(34px, 12vw, 48px);
    }
    .hero-name {
        font-size: clamp(72px, 24vw, 112px);
    }
}

/* ----------------------------------------------------------
   22. White Editorial Theme
   ---------------------------------------------------------- */
body {
    background: #FFFFFF;
    color: #050505;
}

.site-nav {
    background: transparent;
    color: #FFFFFF;
    mix-blend-mode: difference;
    pointer-events: none;
}

.site-nav a,
.site-nav button,
.nav-year {
    pointer-events: auto;
}

.nav-brand,
.nav-year {
    color: #FFFFFF;
    opacity: 1;
}

.nav-link,
.nav-link:hover,
.nav-link-active {
    color: #FFFFFF;
}

.nav-link {
    opacity: 0.42;
}

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

.nav-hamburger {
    border-color: rgba(255,255,255,0.35);
    color: #FFFFFF;
}

.mobile-menu {
    background: #FFFFFF;
    color: #050505;
    mix-blend-mode: normal;
}

.mobile-menu-link {
    color: #050505;
}

.hairline,
.hr-section,
.hr-section--lg {
    background: rgba(0,0,0,0.10);
}

.section-heading,
.hero-name,
.work-card-body h4,
.ws-nav-title--active,
.project-card,
.contact-card h3,
.footer-brand,
.gallery-overlay-title,
.artwork-modal-title,
.detail-header-left h2 {
    color: #050505;
}

.section-subheading,
.hero-subtitle,
.hero-bio,
.work-role,
.work-card-desc,
.contact-card-text,
.footer-copy,
.gallery-overlay-subtitle,
.detail-header-left span {
    color: #777777;
}

.hero-tag,
.hero-cta,
.gallery-cta-btn,
.detail-close-btn {
    color: #050505;
    border-color: rgba(0,0,0,0.18);
}

.hero-tag {
    background: #FFFFFF;
}

.hero-cta:hover,
.gallery-cta-btn:hover {
    border-color: #050505;
    color: #050505;
    background: #F3F3F0;
}

.work-card,
.contact-card {
    background: #FFFFFF;
    border-color: rgba(0,0,0,0.10);
    box-shadow: none;
}

.work-card-container.active .work-card,
.contact-card:hover {
    background: #F7F7F4;
    border-color: rgba(0,0,0,0.18);
}

.work-card-desc {
    border-top-color: rgba(0,0,0,0.10);
}

.work-role i,
.toast-icon {
    color: #050505;
}

.contact-card-icon-wrap {
    background: #F0F0ED;
}

.contact-card:hover .contact-card-icon-wrap {
    background: #E7E7E2;
}

.contact-card-icon {
    color: #050505;
}

.footer-hr {
    background: rgba(0,0,0,0.10);
}

#infinite-gallery,
#project-detail-page {
    background: #FFFFFF;
}

#infinite-gallery::-webkit-scrollbar-thumb,
#project-detail-page::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.22);
}

.gallery-overlay-header,
.detail-header {
    background: rgba(255,255,255,0.92);
    border-bottom-color: rgba(0,0,0,0.10);
}

.close-btn,
.artwork-modal-close {
    background: rgba(0,0,0,0.06);
    color: #050505;
}

.close-btn:hover,
.artwork-modal-close:hover {
    background: #050505;
    color: #FFFFFF;
}

.simple-close-btn,
.detail-close-btn {
    background: rgba(0,0,0,0.06);
    color: #050505;
}

.simple-close-btn:hover,
.detail-close-btn:hover {
    background: rgba(0,0,0,0.12);
}

.detail-next-btn {
    background: #050505;
    color: #FFFFFF;
}

.detail-next-btn:hover {
    background: #333333;
}

#toast-notification {
    background: #050505;
    color: #FFFFFF;
}

#toast-message {
    color: #FFFFFF;
}

#wechat-modal,
#artwork-modal {
    background: rgba(255,255,255,0.92);
}

.wechat-modal-inner {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.12);
}

.wechat-qr-wrap {
    background: #F4F4F1;
}

.btn-primary-outline,
.btn-secondary-outline {
    color: #050505;
    border-color: rgba(0,0,0,0.16);
}

.btn-primary-outline:hover,
.btn-secondary-outline:hover {
    color: #050505;
    border-color: #050505;
    background: #F3F3F0;
}

#artwork-modal-img {
    border: 1px solid rgba(0,0,0,0.10);
}

.artwork-modal-tag {
    color: #777777;
}

/* Numeric text must use the system/default font, never Raleway. */
.num-font,
.nav-year,
.project-card-meta--top span,
.project-card-year,
.contact-card-text,
.footer-copy,
.gallery-overlay-subtitle,
.artwork-modal-tag,
#toast-message,
.detail-header-left span,
.detail-close-btn,
.detail-next-btn {
    font-family: var(--font-default) !important;
}

/* Final navigation override */
.site-nav {
    background: transparent !important;
    mix-blend-mode: difference !important;
}

.nav-brand {
    font-size: 18px !important;
    color: #FFFFFF !important;
    opacity: 1 !important;
}

.nav-center {
    gap: 28px !important;
}

.nav-link {
    font-size: 16px !important;
    color: #FFFFFF !important;
    opacity: 0.38 !important;
}

.nav-link:hover {
    opacity: 0.58 !important;
}

.nav-link-active {
    opacity: 1 !important;
}

.nav-year {
    font-size: 16px !important;
    font-family: var(--font-default) !important;
    color: #FFFFFF !important;
    opacity: 1 !important;
}

@media (max-width: 900px) {
    .nav-brand {
        font-size: 16px !important;
    }
}

/* Project detail: editorial caption aligned to the image column. */
#project-detail-page {
    background: #FFFFFF;
    color: #111111;
    overflow-y: auto;
}
.detail-body {
    width: min(100% - 48px, 1000px);
    max-width: 1000px;
    margin: 0 auto;
    padding: clamp(116px, 13vh, 190px) 0 80px;
}
.detail-project-intro {
    display: grid;
    grid-template-columns: minmax(0, 330px) auto;
    justify-content: space-between;
    align-items: start;
    gap: 32px;
    margin-bottom: clamp(68px, 8vw, 120px);
}
.detail-project-intro h2 {
    margin: 0;
    color: #111111;
    font-family: var(--font-en);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.04em;
}
.detail-project-intro p {
    margin: 16px 0 0;
    color: #6D6D6D;
    font-family: var(--font-default);
    font-size: 12px;
    line-height: 1.4;
}
.detail-project-intro span { color: #111111; font-size: 12px; }
#detail-long-container { width: 100%; overflow: visible; }
#detail-long-container img { width: 100%; display: block; margin: 0 0 12px; padding: 0; border: 0; }
.detail-nav-buttons { justify-content: flex-start; padding: 40px 0 0; }
.detail-close-btn, .detail-next-btn { padding: 11px 20px; font-size: 11px; }

@media (max-width: 767px) {
    .detail-body { width: min(100% - 40px, 1000px); padding-top: 96px; }
    .detail-project-intro { grid-template-columns: 1fr; gap: 12px; margin-bottom: 52px; }
}

/* Keep the Selected Works note consistent with other section notes. */
.section-works .section-subheading { font-size: 14px; }

/* Detail scale: 15% larger artwork and matching editorial metadata. */
.detail-body { width: min(100% - 48px, 1150px); max-width: 1150px; }
.detail-project-intro { grid-template-columns: minmax(0, 380px) auto; }
.detail-project-intro h2 { font-size: 17px; }
.detail-project-intro p { font-size: 14px; line-height: 1.45; }
.detail-project-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.detail-project-intro span, .detail-project-meta span { font-size: 14px; }
.detail-project-meta #detail-type { color: #666; font-family: var(--font-default); font-size: 12px; }
.detail-project-intro { margin-bottom: clamp(20px, 2.4vw, 32px); }

@media (max-width: 767px) {
    .detail-body { width: min(100% - 40px, 1150px); }
    .detail-project-intro { grid-template-columns: 1fr; margin-bottom: 24px; }
    .detail-project-meta { align-items: flex-start; }
}

/* Always-available project navigation. */
.detail-nav-buttons {
    position: fixed;
    z-index: 600;
    right: clamp(20px, 3vw, 48px);
    bottom: clamp(20px, 3vw, 40px);
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0;
}
.detail-close-btn, .detail-next-btn {
    min-height: 40px;
    padding: 10px 16px;
    border: 1px solid #111111;
    border-radius: 0;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
.detail-close-btn { background: #FFFFFF; color: #111111; }
.detail-next-btn { background: #111111; color: #FFFFFF; }

@media (max-width: 767px) {
    .detail-nav-buttons { right: 20px; bottom: 20px; }
    .detail-close-btn, .detail-next-btn { min-height: 38px; padding: 9px 13px; }
}

/* Contact closing section */
.section-contact > .reveal { text-align: center; }
.contact-heading { margin-bottom: 16px !important; }
.contact-intro {
    margin: 0 auto 56px;
    color: var(--muted);
    font-family: var(--font-en);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}
.section-contact .contact-grid { text-align: left; }

/* Visual Gallery uses the same editorial header and fixed return action as project details. */
#infinite-gallery { background: #FFFFFF; color: #111111; }
.gallery-overlay-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 380px) auto;
    justify-content: space-between;
    align-items: start;
    gap: 32px;
    width: min(100% - 48px, 1150px);
    max-width: 1150px;
    margin: 0 auto;
    padding: clamp(116px, 13vh, 190px) 0 clamp(20px, 2.4vw, 32px);
    background: transparent;
    border: 0;
}
.gallery-overlay-title { color: #111111; font-size: 17px; font-weight: 700; letter-spacing: -.04em; }
.gallery-overlay-description { margin: 16px 0 0; color: #6D6D6D; font-family: var(--font-default); font-size: 14px; line-height: 1.45; }
.gallery-overlay-subtitle { color: #111111; font-size: 14px; }
#infinite-masonry-grid { max-width: 1150px; padding: 0 0 96px; }
.gallery-nav-buttons {
    position: fixed;
    z-index: 600;
    right: clamp(20px, 3vw, 48px);
    bottom: clamp(20px, 3vw, 40px);
    display: none;
}
.gallery-nav-buttons .detail-close-btn { min-height: 40px; padding: 10px 16px; border: 1px solid #111111; border-radius: 0; box-shadow: 0 3px 12px rgba(0,0,0,.08); background: #FFFFFF; color: #111111; }
.detail-project-meta #detail-type { display: block; }

@media (max-width: 767px) {
    .gallery-overlay-header { grid-template-columns: 1fr; gap: 12px; width: min(100% - 40px, 1150px); padding-top: 96px; }
    #infinite-masonry-grid { padding-bottom: 84px; }
    .gallery-nav-buttons { right: 20px; bottom: 20px; }
    .gallery-nav-buttons .detail-close-btn { min-height: 38px; padding: 9px 13px; }
}
