/* ============================================================
   繁夏的开发日志 · summerworld.cn —— 竹林烟雨 · 江南雨巷主题
   青瓷为天 · 竹影为幕 · 细雨为帘 · 朱砂一点
   ============================================================ */
:root {
  --mist: #edf0e8;        /* 青瓷白 */
  --mist-2: #e3e8dc;      /* 深一度的雾 */
  --card: #f6f8f1;        /* 卡片 */
  --ink: #2e3833;         /* 墨绿黑 */
  --ink-2: #5c6a60;
  --ink-3: #8b968b;
  --line: #ccd6c8;
  --line-2: #b4c3b1;
  --bamboo: #4f7259;      /* 竹青 */
  --bamboo-2: #93a878;    /* 嫩竹 */
  --bamboo-deep: #3c5a49; /* 浓竹 */
  --seal: #a63a2b;        /* 朱砂印 */
  --dark: #212923;        /* 墨石板 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  --mono: Consolas, "Courier New", monospace;
  --radius: 6px;
}

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

html {
  background: var(--mist);
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--serif);
  background-color: var(--mist);
  background-image:
    radial-gradient(1100px 480px at 88% -120px, rgba(79, 114, 89, .07), transparent 60%),
    radial-gradient(900px 420px at -8% 24%, rgba(60, 90, 73, .05), transparent 60%),
    radial-gradient(700px 500px at 55% 108%, rgba(147, 168, 120, .07), transparent 60%);
  color: var(--ink);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(79, 114, 89, .82); color: var(--mist); }

img { max-width: 100%; display: block; }
a { color: var(--bamboo-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237, 240, 232, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 56, 51, .4);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.08rem; letter-spacing: .06em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-dot {
  width: 26px; height: 26px; border-radius: 4px;
  background: var(--seal); color: #f5f2e8;
  font-family: var(--kai); font-size: 15px; line-height: 26px; text-align: center;
  box-shadow: inset 0 0 0 1.5px rgba(245, 242, 232, .55);
}
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--ink-2); font-size: .95rem; letter-spacing: .05em; }
.nav a:hover { color: var(--bamboo-deep); text-decoration: none; }
.host { font-family: var(--mono); font-size: .78rem; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 12px; }

/* ---------------- hero：竹林烟雨 ---------------- */
.hero { position: relative; padding: 96px 0 130px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(640px 300px at 78% 24%, rgba(79, 114, 89, .08), transparent 65%),
    radial-gradient(520px 260px at 18% 10%, rgba(246, 248, 241, .9), transparent 70%);
}
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-rain {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    repeating-linear-gradient(100deg, rgba(46, 56, 51, 0) 0 13px, rgba(46, 56, 51, .05) 13px 14px),
    repeating-linear-gradient(100deg, rgba(46, 56, 51, 0) 0 27px, rgba(46, 56, 51, .035) 27px 28px);
  animation: rainfall 8s linear infinite;
}
@keyframes rainfall {
  from { background-position: 0 0, 0 0; }
  to   { background-position: -90px 520px, -70px 660px; }
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 52px; align-items: center; }
.eyebrow {
  display: inline-block; font-family: var(--kai); font-size: .88rem; letter-spacing: .14em;
  color: var(--bamboo-deep); border: 1px solid rgba(79, 114, 89, .55);
  background: rgba(79, 114, 89, .07); border-radius: 2px; padding: 4px 16px; margin-bottom: 22px;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.28; letter-spacing: .04em; font-weight: 700; }
h1 em {
  font-style: normal; color: var(--bamboo-deep);
  background: linear-gradient(transparent 66%, rgba(79, 114, 89, .16) 66%);
}
.lead { color: var(--ink-2); margin: 22px 0 30px; font-size: 1.05rem; max-width: 34em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 11px 28px; border-radius: 4px; font-size: .98rem; letter-spacing: .08em; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--bamboo-deep); color: #eef2e8; font-weight: 700; box-shadow: 0 8px 22px rgba(60, 90, 73, .3); }
.btn-primary:hover { background: #32493b; }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--bamboo-deep); color: var(--bamboo-deep); }

.stats { list-style: none; display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-size: 1.85rem; line-height: 1.2; color: var(--bamboo-deep); font-family: var(--serif); font-weight: 700; }
.stats span { color: var(--ink-3); font-size: .84rem; letter-spacing: .06em; }

/* ---------------- terminal（墨石板） ---------------- */
.terminal { background: var(--dark); border: 1px solid #3a463c; border-radius: var(--radius); box-shadow: 0 24px 50px rgba(46, 56, 51, .32); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #3a463c; }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; opacity: .8; }
.terminal-bar i:nth-child(1) { background: #8f6a5a; }
.terminal-bar i:nth-child(2) { background: #a89a5f; }
.terminal-bar i:nth-child(3) { background: #6f8f6a; }
.terminal-bar span { margin-left: auto; font-family: var(--mono); font-size: .74rem; color: #7f8b7a; }
#term { padding: 20px 20px 24px; font-family: var(--mono); font-size: .85rem; line-height: 1.95; min-height: 252px; color: #dee6d3; white-space: pre-wrap; word-break: break-all; }
#term .p { color: #9cc39a; font-weight: 700; }
#term .p2 { color: #75816f; }
#term .ok { color: #b5c98a; }
.cur { display: inline-block; width: 8px; height: 1.05em; background: #9cc39a; vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- sections ---------------- */
.section { padding: 80px 0; }
.section.alt { background: var(--mist-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-title {
  position: relative; font-size: 1.72rem; letter-spacing: .12em; font-weight: 700;
  padding-left: 20px; margin-bottom: 36px;
}
.sec-title::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 6px;
  border-radius: 2px; transform: skewX(-6deg);
  background: linear-gradient(180deg, var(--bamboo-deep), var(--bamboo-2));
}

/* about */
.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 42px; align-items: start; }
.about-text { color: #3d473f; font-size: 1.03rem; }
.about-text strong { color: var(--bamboo-deep); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  font-family: var(--kai); font-size: .88rem; color: var(--ink-2);
  border: 1px solid var(--line-2); background: rgba(246, 248, 241, .75); border-radius: 2px; padding: 5px 14px;
}

/* project card */
.project-card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 36px 38px; box-shadow: 0 14px 34px rgba(46, 56, 51, .1);
  position: relative; overflow: hidden;
}
.project-card::after {
  content: "谱"; position: absolute; right: 18px; bottom: -26px; z-index: 0;
  font-family: var(--kai); font-size: 150px; line-height: 1; color: rgba(46, 56, 51, .05);
  pointer-events: none;
}
.project-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; position: relative; z-index: 1; }
.project-head h3 { font-size: 1.42rem; letter-spacing: .05em; }
.project-head .en { font-family: var(--kai); font-size: .88rem; color: var(--ink-3); font-weight: 400; margin-left: 8px; letter-spacing: .08em; }
.project-desc { color: var(--ink-2); max-width: 62em; position: relative; z-index: 1; }
.chip {
  display: inline-block; font-size: .8rem; color: var(--ink-2); font-family: var(--kai); letter-spacing: .05em;
  border: 1px solid var(--line-2); border-radius: 2px; padding: 3px 12px; background: rgba(252, 253, 249, .85);
  white-space: nowrap;
}
a.chip:hover { border-color: var(--bamboo-deep); color: var(--bamboo-deep); text-decoration: none; }
.chip-live { color: var(--bamboo-deep); border-color: rgba(79, 114, 89, .6); background: rgba(79, 114, 89, .08); font-weight: 700; }
.chip-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bamboo); margin-right: 7px; animation: pulse 1.6s ease infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.progress-list { display: grid; gap: 16px; margin: 28px 0 10px; position: relative; z-index: 1; }
.prog { display: grid; grid-template-columns: 172px 1fr 52px; gap: 14px; align-items: center; font-size: .93rem; }
.prog span { color: #3d473f; }
.prog i { display: block; height: 8px; background: #dfe5d6; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.prog b { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--bamboo-deep), var(--bamboo-2)); transition: width 1.1s cubic-bezier(.25, .8, .3, 1); }
.prog em { font-style: normal; font-family: var(--mono); font-size: .82rem; color: var(--ink-3); text-align: right; }
.fine { color: var(--ink-3); font-size: .8rem; margin-top: 4px; position: relative; z-index: 1; }

.spec { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; position: relative; z-index: 1; }
.spec li { font-family: var(--kai); font-size: .84rem; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: 2px; padding: 5px 12px; }

/* works */
.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.work {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.work:hover { transform: translateY(-4px); border-color: #8fa78f; box-shadow: 0 16px 36px rgba(46, 56, 51, .14); }
.work-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 440px 1fr; }
.work-media { position: relative; }
.shot { padding: 14px; }
.shot img { width: 100%; border: 1px solid var(--line); border-radius: 4px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.gallery-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-3 .g-item img { aspect-ratio: 16 / 9; }
.g-item { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; padding: 0; background: var(--mist-2); cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; transition: transform .25s ease; }
.g-item:hover img { transform: scale(1.04); }
.strip { padding: 14px; }
.strip img { width: 100%; border: 1px solid var(--line); border-radius: 4px; }
.work-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 12px; }
.work-body-full { height: 100%; justify-content: center; }
.work-body h3 { font-size: 1.18rem; letter-spacing: .05em; }
.work-body h3::before { content: "◆ "; color: var(--bamboo); font-size: .8em; vertical-align: 2px; }
.work-body p { color: var(--ink-2); font-size: .94rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* timeline */
.timeline { list-style: none; border-left: 1px solid var(--line-2); margin-left: 10px; padding-left: 30px; }
.timeline li { position: relative; padding-bottom: 36px; }
.timeline li:last-child { padding-bottom: 4px; }
.timeline li::before {
  content: ""; position: absolute; left: -35.5px; top: 9px; width: 10px; height: 10px;
  border-radius: 2px; transform: rotate(45deg); background: var(--seal);
  box-shadow: 0 0 0 4px rgba(166, 58, 43, .12);
}
.timeline time { font-family: var(--kai); font-size: .88rem; letter-spacing: .1em; color: var(--seal); }
.timeline h3 { font-size: 1.08rem; letter-spacing: .04em; margin: 4px 0 6px; }
.timeline p { color: var(--ink-2); font-size: .94rem; max-width: 62em; }

/* contact */
.contact-card {
  border: 1px solid transparent; border-radius: var(--radius); padding: 40px 42px; text-align: center;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(120deg, rgba(79, 114, 89, .75), rgba(147, 168, 120, .6)) border-box;
}
.contact-card h2 { font-size: 1.5rem; letter-spacing: .2em; margin-bottom: 10px; }
.contact-card p { color: var(--ink-2); margin-bottom: 18px; }
.contact-card .chip-row { justify-content: center; margin-top: 0; }

/* footer */
.site-footer { border-top: 1px solid rgba(46, 56, 51, .4); padding: 34px 0 40px; text-align: center; }
.site-footer .copy { color: var(--ink-2); font-size: .9rem; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.seal {
  display: inline-block; writing-mode: vertical-rl; font-family: var(--kai);
  background: var(--seal); color: #f5f2e8; font-size: .82rem; line-height: 1;
  padding: 6px 4px; border-radius: 3px; letter-spacing: 2px;
  box-shadow: inset 0 0 0 1px rgba(245, 242, 232, .5);
}
.site-footer .beian { margin-top: 10px; font-size: .85rem; }
.site-footer .beian a { color: var(--ink-3); }
.site-footer .beian a:hover { color: var(--bamboo-deep); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 99; background: rgba(28, 34, 30, .9); display: flex; align-items: center; justify-content: center; padding: 30px; }
.lightbox img { max-width: min(860px, 92vw); max-height: 88vh; border-radius: 4px; border: 1px solid rgba(237, 240, 232, .25); }
.lb-close { position: absolute; top: 22px; right: 30px; font-size: 2rem; line-height: 1; color: #a9b5a5; background: none; border: none; cursor: pointer; }
.lb-close:hover { color: var(--mist); }
.lightbox[hidden] { display: none; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.on { opacity: 1; transform: none; }

/* focus */
a:focus-visible, button:focus-visible { outline: 2px solid var(--bamboo-deep); outline-offset: 3px; border-radius: 4px; }

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .works-grid { grid-template-columns: 1fr; }
  .work-wide { grid-template-columns: 1fr; }
  .host { display: none; }
}
@media (max-width: 620px) {
  .section { padding: 58px 0; }
  .hero { padding: 60px 0 110px; }
  .nav { display: none; }
  .header-inner { height: 58px; }
  .stats { gap: 24px; }
  .project-card { padding: 26px 22px; }
  .prog { grid-template-columns: 118px 1fr 46px; font-size: .85rem; }
  .contact-card { padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .prog b { transition: none; }
  .cur { animation: none; }
  .hero-rain { animation: none; }
}
