/* ============================================================
   Lyoran Lee · Portfolio 2026
   纯黑白编辑感风格 — 仅 #000 / #fff 及黑色透明度灰阶
   ============================================================ */

:root {
    --black: #000000;
    --white: #ffffff;
    --line: rgba(0, 0, 0, 0.16);
    --line-soft: rgba(0, 0, 0, 0.08);
    --gray: rgba(0, 0, 0, 0.46);
    --gray-light: rgba(0, 0, 0, 0.28);

    --serif-en: "Times New Roman", Times, Georgia, serif;
    --serif-zh: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif;
    --script: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Apple Chancery", cursive;

    --pad: clamp(20px, 5vw, 72px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--white);
    color: var(--black);
    font-family: var(--serif-en);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--black); color: var(--white); }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- 导航 ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid transparent;
    transition: border-color .35s ease;
}
.navbar.scrolled { border-bottom-color: var(--line); }
.nav-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--pad);
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.logo {
    font-size: 20px;
    letter-spacing: .18em;
    font-weight: 400;
    white-space: nowrap;
}
.logo-dot { font-family: var(--serif-zh); }
.nav-links { display: flex; align-items: center; gap: clamp(20px, 3.6vw, 52px); }
.nav-link {
    position: relative;
    font-size: 12px;
    letter-spacing: .2em;
    padding: 8px 0;
    color: var(--gray);
    transition: color .25s ease;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 2px;
    width: 100%; height: 1px;
    background: var(--black);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--black); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    background: var(--white);
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease;
}
.icon-btn:hover { background: var(--black); border-color: var(--black); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--black); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s ease; }
.icon-btn:hover svg { stroke: var(--white); }
.menu-btn { display: none; }

/* ---------- 通用排版 ---------- */
.eyebrow, .section-index {
    font-size: 11px;
    letter-spacing: .3em;
    color: var(--gray);
    text-transform: uppercase;
}
.script { font-family: var(--script); font-weight: 400; }
.rule { height: 1px; background: var(--black); width: 100%; margin: 26px 0 18px; }
.caption { font-size: 12px; letter-spacing: .18em; color: var(--gray); margin-top: 14px; text-align: right; text-transform: uppercase; }

.btn {
    display: inline-block;
    font-size: 13px;
    letter-spacing: .18em;
    padding: 14px 30px;
    border: 1px solid var(--black);
    transition: background .3s ease, color .3s ease;
}
.btn-solid { background: var(--black); color: var(--white); }
.btn-solid:hover { background: var(--white); color: var(--black); }
.btn-line { background: transparent; color: var(--black); }
.btn-line:hover { background: var(--black); color: var(--white); }

.section { padding: clamp(90px, 12vw, 170px) 0; }

/* ---------- 首屏 ---------- */
.hero {
    position: relative;
    min-height: calc(100vh - 78px);
    display: flex;
    align-items: center;
    padding: clamp(60px, 8vw, 120px) 0 clamp(90px, 10vw, 140px);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(40px, 7vw, 110px);
    align-items: center;
}
.hero-title {
    font-family: var(--serif-zh);
    font-size: clamp(64px, 9vw, 138px);
    line-height: 1.02;
    font-weight: 400;
    letter-spacing: .08em;
    margin: 22px 0 0;
}
.hero-title span { display: block; letter-spacing: .18em; }
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 5vw, 70px);
    font-size: 14px;
    letter-spacing: .14em;
}
.hero-meta span:last-child { color: var(--gray); }
.hero-script {
    font-size: clamp(30px, 4vw, 52px);
    color: var(--gray-light);
    margin: 26px 0 20px;
    line-height: 1;
    transform: rotate(-4deg);
    transform-origin: left center;
}
.hero-desc { font-family: var(--serif-zh); font-size: 15px; color: var(--gray); line-height: 2.1; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* 图片框 / 占位
   --ph 只用于「未加载」时的占位比例；图片加载成功后改为 auto，
   让画幅完全跟随原图宽高比，横图不再被裁成竖图。 */
.img-frame {
    --ph: 4 / 5;
    position: relative;
    width: 100%;
    aspect-ratio: var(--ph);
    border: 1px solid var(--line);
    background:
        repeating-linear-gradient(135deg, transparent, transparent 11px, var(--line-soft) 11px, var(--line-soft) 12px),
        var(--white);
    overflow: hidden;
    display: grid;
    place-items: center;
}
.img-frame img {
    display: none;
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity .6s ease;
}
/* 加载后：按原图比例撑开容器 */
.img-frame.loaded { --ph: auto; display: block; background: var(--white); }
.img-frame.loaded img { display: block; opacity: 1; }
.frame-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 20px;
    transition: opacity .4s ease;
}
.img-frame.loaded .frame-inner { display: none; }
.frame-mark { font-size: clamp(50px, 8vw, 96px); color: var(--line); line-height: 1; }
.frame-label { font-size: 12px; letter-spacing: .28em; color: var(--gray); }
.frame-file { font-size: 11px; letter-spacing: .06em; color: var(--gray-light); font-style: italic; }

.scroll-cue {
    position: absolute;
    left: 50%; bottom: 26px;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-size: 10px; letter-spacing: .3em; color: var(--gray);
}
.scroll-cue i { display: block; width: 1px; height: 46px; background: var(--black); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- 关于 ---------- */
.about { border-top: 1px solid var(--line-soft); }
.big-script {
    font-family: var(--serif-en);
    font-size: clamp(52px, 10vw, 150px);
    font-weight: 400;
    letter-spacing: .02em;
    line-height: 1;
    margin: 24px 0 0;
    white-space: nowrap;
}
.about-script {
    font-size: clamp(24px, 3.4vw, 44px);
    color: var(--gray-light);
    margin: 4px 0 clamp(48px, 7vw, 90px);
    transform: rotate(-3deg);
    transform-origin: left center;
}
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(44px, 8vw, 120px); align-items: start; }
.about-portrait .img-frame:not(.loaded) { --ph: 3 / 4; }
.portrait-frame:not(.loaded) { --ph: 4 / 5; }

/* ---------- 首屏擦拭显影 ---------- */
.wipe-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--white);
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}
.wipe-frame img,
.wipe-frame canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.wipe-frame .wipe-base { object-fit: cover; z-index: 1; }
.wipe-frame .wipe-cover { z-index: 2; }
.wipe-hint {
    position: absolute;
    z-index: 3;
    left: 50%; bottom: 18px;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
    letter-spacing: .18em;
    color: var(--black);
    background: rgba(255, 255, 255, .82);
    padding: 7px 16px;
    pointer-events: none;
    transition: opacity .4s ease;
}
.wipe-frame.touched .wipe-hint { opacity: 0; }
.wipe-reset {
    position: absolute;
    z-index: 4;
    top: 12px; right: 12px;
    width: 34px; height: 34px;
    border: 1px solid rgba(0, 0, 0, .35);
    background: rgba(255, 255, 255, .85);
    color: var(--black);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .25s ease, color .25s ease;
}
.wipe-reset:hover { background: var(--black); color: var(--white); }
@media (max-width: 960px) { .wipe-frame { aspect-ratio: 4 / 5; } }
.hello { font-family: var(--serif-zh); font-size: clamp(26px, 3.4vw, 44px); margin-bottom: 18px; }
.hello strong { font-weight: 400; border-bottom: 1px solid var(--black); }
.lead { font-family: var(--serif-zh); font-size: 16px; line-height: 2.1; }
.lead span { color: var(--gray); }
.about-text { font-family: var(--serif-zh); font-size: 15px; color: var(--gray); line-height: 2.1; margin-top: 22px; max-width: 620px; }
.about-columns { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: 48px; }
.about-col h3 {
    font-family: var(--serif-zh);
    font-size: 17px;
    font-weight: 400;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--black);
    margin-bottom: 18px;
}
.about-col h3 em { display: block; font-family: var(--serif-en); font-size: 10px; letter-spacing: .2em; color: var(--gray); font-style: normal; margin-top: 4px; }
.honor-list { list-style: none; }
.honor-list li {
    font-family: var(--serif-zh);
    font-size: 13px;
    color: var(--gray);
    line-height: 1.85;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
    position: relative;
    padding-left: 18px;
}
.honor-list li::before { content: "—"; position: absolute; left: 0; color: var(--black); }
.skills-block { margin-top: 48px; }
.skills-block .script { font-size: clamp(32px, 4vw, 50px); line-height: 1; }
.skill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.skill-list li { border: 1px solid var(--line); padding: 7px 16px; font-size: 12px; letter-spacing: .16em; }

/* ---------- 作品 ---------- */
.works { border-top: 1px solid var(--line-soft); }
.part-divider { text-align: center; margin-bottom: clamp(60px, 9vw, 120px); }
.part-divider span { display: block; font-size: 11px; letter-spacing: .4em; color: var(--gray); }
.part-divider h2 {
    font-family: var(--serif-zh);
    font-size: clamp(40px, 6.5vw, 92px);
    font-weight: 400;
    letter-spacing: .22em;
    margin: 16px 0 6px;
}
.part-divider .script { font-size: clamp(22px, 3vw, 38px); color: var(--gray-light); }
.works-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.filter-btn {
    background: none;
    border: none;
    padding: 6px 0;
    cursor: pointer;
    font-family: var(--serif-zh);
    font-size: 15px;
    color: var(--gray);
    border-bottom: 1px solid transparent;
    transition: color .25s ease, border-color .25s ease;
}
.filter-btn sup { font-family: var(--serif-en); font-size: 9px; letter-spacing: .12em; margin-left: 3px; color: var(--gray-light); }
.filter-btn:hover, .filter-btn.active { color: var(--black); border-bottom-color: var(--black); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 62px) clamp(20px, 3vw, 44px); }
.work-card { cursor: pointer; }
.work-card .img-frame { transition: border-color .3s ease; }
.work-card:hover .img-frame { border-color: var(--black); }
.work-card img { transition: opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.work-card:hover img { transform: scale(1.035); }
.work-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; }
.work-title { font-family: var(--serif-zh); font-size: 17px; }
.work-no { font-size: 11px; letter-spacing: .14em; color: var(--gray-light); }
.work-desc { font-family: var(--serif-zh); font-size: 13px; color: var(--gray); margin-top: 4px; }
.work-cat { font-size: 10px; letter-spacing: .2em; color: var(--gray-light); margin-top: 8px; text-transform: uppercase; }
.work-hidden { display: none !important; }

/* ---------- 经历 ---------- */
.experience { border-top: 1px solid var(--line-soft); }
.experience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 9vw, 140px); }
.section-script { font-size: clamp(40px, 6vw, 76px); line-height: 1; color: var(--gray-light); margin: 20px 0 30px; }
.exp-title { font-family: var(--serif-zh); font-size: clamp(24px, 3vw, 40px); font-weight: 400; line-height: 1.7; }
.exp-item { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.exp-item:last-child { border-bottom: 1px solid var(--line); }
.exp-year { font-size: 11px; letter-spacing: .14em; color: var(--gray); padding-top: 6px; }
.exp-item h3 { font-family: var(--serif-zh); font-size: 18px; font-weight: 400; }
.exp-item p { font-family: var(--serif-zh); font-size: 13px; color: var(--gray); line-height: 1.9; margin-top: 6px; }

/* ---------- 页脚 ---------- */
.footer { background: var(--black); color: var(--white); padding: clamp(80px, 10vw, 140px) 0 34px; }
.footer .section-index { color: rgba(255,255,255,.45); }
.footer-script { font-size: clamp(42px, 7vw, 96px); margin: 22px 0 12px; }
.footer-title { font-family: var(--serif-zh); font-size: clamp(30px, 4.5vw, 60px); font-weight: 400; letter-spacing: .1em; padding-bottom: 46px; border-bottom: 1px solid rgba(255,255,255,.25); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 46px 0 70px; }
.footer-cols h4 { font-size: 11px; letter-spacing: .24em; color: rgba(255,255,255,.5); font-weight: 400; margin-bottom: 16px; }
.footer-cols p { font-family: var(--serif-zh); font-size: 14px; line-height: 2.2; color: rgba(255,255,255,.85); }
.footer-cols a:hover { text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 22px; font-size: 10px; letter-spacing: .2em; color: rgba(255,255,255,.45); }

/* ---------- 访问公告 ---------- */
.notice-mask {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(6px);
    display: grid; place-items: center;
    padding: clamp(16px, 4vw, 40px);
    overflow-y: auto;
}
.notice-box {
    width: 100%;
    max-width: 720px;
    background: var(--white);
    border: 1px solid var(--black);
    padding: clamp(24px, 4vw, 48px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}
.notice-head { border-bottom: 1px solid var(--black); padding-bottom: 18px; margin-bottom: 26px; }
.notice-kicker { font-size: 11px; letter-spacing: .34em; color: var(--gray); }
.notice-head h2 {
    font-family: var(--serif-zh);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 400;
    letter-spacing: .08em;
    margin-top: 8px;
}
.notice-body { display: flex; flex-direction: column; gap: 22px; }
.notice-item { display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.notice-no { font-size: 13px; letter-spacing: .1em; color: var(--gray-light); padding-top: 4px; }
.notice-item h3 {
    font-family: var(--serif-zh);
    font-size: 17px;
    font-weight: 400;
    margin-bottom: 7px;
    display: inline-block;
    border-bottom: 1px solid var(--line);
    padding-bottom: 3px;
}
.notice-item p {
    font-family: var(--serif-zh);
    font-size: 14px;
    line-height: 2;
    color: var(--gray);
    text-align: justify;
}
.notice-foot {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.notice-sign { font-size: 11px; letter-spacing: .14em; color: var(--gray-light); }
.notice-btn {
    font-family: var(--serif-zh);
    font-size: 15px;
    letter-spacing: .1em;
    padding: 11px 26px;
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
    cursor: pointer;
    transition: background .3s ease, color .3s ease, opacity .3s ease;
    min-width: 200px;
}
.notice-btn:hover:not(:disabled) { background: var(--white); color: var(--black); }
.notice-btn:disabled {
    background: transparent;
    color: var(--gray-light);
    border-color: var(--line);
    cursor: not-allowed;
}
@media (max-width: 700px) {
    .notice-item { grid-template-columns: 26px 1fr; gap: 10px; }
    .notice-item p { font-size: 13px; line-height: 1.9; }
    .notice-foot { flex-direction: column; align-items: stretch; }
    .notice-btn { width: 100%; }
}

/* ---------- 灯箱 ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(255,255,255,.97);
    display: grid; place-items: center;
    padding: clamp(24px, 6vw, 80px);
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(100%, 1100px); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; }
.lightbox figcaption { font-family: var(--serif-zh); font-size: 14px; letter-spacing: .06em; }
.lightbox-close {
    position: absolute; top: 24px; right: 30px;
    width: 42px; height: 42px;
    border: 1px solid var(--line);
    background: var(--white);
    font-size: 26px; line-height: 1;
    cursor: pointer;
}
.lightbox-close:hover { background: var(--black); color: var(--white); border-color: var(--black); }

/* ---------- 滚动淡入 ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .hero-visual { max-width: 460px; }
    .about-grid { grid-template-columns: 1fr; }
    .about-portrait { max-width: 420px; }
    .work-grid { grid-template-columns: repeat(2, 1fr); }
    .experience-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .nav-wrap { height: 64px; }
    .nav-links {
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 8px var(--pad) 18px;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-link { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
    .nav-link::after { display: none; }
    .menu-btn { display: grid; }
    .hero { min-height: auto; }
    .hero-title { letter-spacing: .04em; }
    .hero-script { transform: none; }
    .about-script { transform: none; }
    .hero-meta { flex-direction: column; gap: 4px; }
    .about-columns { grid-template-columns: 1fr; }
    .work-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 16px; }
    .work-title { font-size: 15px; }
    .work-desc { font-size: 12px; }
    .work-cat { display: none; }
    .exp-item { grid-template-columns: 1fr; gap: 6px; }
    .footer-cols { grid-template-columns: 1fr; gap: 26px; }
    .footer-bottom { flex-direction: column; }
    .caption { text-align: left; }
}

@media (max-width: 420px) {
    .work-grid { grid-template-columns: 1fr; }
    .hero-buttons .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
    .scroll-cue i { animation: none; }
}
