:root{color-scheme:light;--paper:#f7f7ef;--ink:#202419;--muted:#535a4a;--line:#d7dacb;--green:#435322;--lime:#d9eaab}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}
a{color:inherit;text-decoration:none}
a:focus-visible,summary:focus-visible{outline:2px solid var(--green);outline-offset:5px}
.wrap{width:min(1100px,calc(100% - 80px));margin-inline:auto}
.skip{position:absolute;left:12px;top:12px;transform:translateY(-150%);background:var(--lime);padding:10px;z-index:1}
.skip:focus{transform:none}
.top{height:78px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}
.brand{font-weight:700;white-space:nowrap}
.brand span{color:var(--green);margin-right:7px;font-size:1.2em}
nav{display:flex;gap:30px;font-size:.9rem;color:var(--muted)}
nav a:hover,.foot a:hover{text-decoration:underline;text-underline-offset:5px}
.hero{display:grid;grid-template-columns:1.15fr 1fr;gap:clamp(28px,6vw,80px);align-items:center;padding:90px 0 92px;border-bottom:1px solid var(--line)}
.label{font:600 .75rem/1.5 ui-monospace,monospace;letter-spacing:.13em;color:var(--green)}
h1{font-size:clamp(2.7rem,6.3vw,5.55rem);line-height:1.12;letter-spacing:-.065em;margin:19px 0 24px}
h1 span{color:#68812f}
.section-intro,.bio p,.detail{color:var(--muted);line-height:1.85}
.button{display:inline-flex;gap:24px;align-items:center;padding:12px 16px;border:1px solid #bdce8d;background:var(--lime);font-weight:650}
.button:hover{background:#cddd96}
.section{padding:62px 0;border-bottom:1px solid var(--line);scroll-margin-top:18px}
h2{font-size:clamp(2rem,4vw,3rem);letter-spacing:-.05em;margin:6px 0 16px}
.section-intro{margin:0 0 26px}
details{border-top:1px solid var(--line)}
summary{cursor:pointer;list-style:none;display:grid;grid-template-columns:1fr auto 23px;align-items:center;gap:14px;padding:20px 6px}
summary::-webkit-details-marker{display:none}
summary:hover{background:#eef0e4}
summary strong{font-size:1.1rem}
summary small{display:block;color:var(--muted);margin-top:6px}
.tag{font-size:.75rem;border:1px solid var(--line);padding:3px 7px;color:var(--muted)}
.toggle{text-align:center;color:var(--green)}
.toggle::before{content:"+"}
details[open] .toggle::before{content:"−"}
.detail{margin:0 24px 22px 6px;max-width:43em}
.detail p{margin:8px 0}
.about{display:grid;grid-template-columns:1fr 1fr;gap:30px;align-items:center}
.bio p{margin:0}
.foot{display:flex;justify-content:space-between;padding:25px 0 32px;color:var(--muted);font-size:.85rem}
@media(max-width:720px){.wrap{width:calc(100% - 36px)}.top{height:64px}nav{gap:15px}.hero{grid-template-columns:1fr;padding:50px 0;gap:34px}.section{padding:40px 0}.about{grid-template-columns:1fr;gap:0}summary{grid-template-columns:1fr auto 16px;gap:8px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

.text-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-page {
  max-width: 680px;
  margin-inline: auto;
  padding-block: clamp(36px, 8vw, 80px);
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.article-page h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -.03em;
}

.article-page h2 {
  font-size: 1.5rem;
  margin-top: 2em;
}

.article-page img {
  max-width: 100%;
  height: auto;
}

#editor label {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  font-weight: 600;
}

#editor input, #editor textarea {
  font: inherit;
  font-weight: 400;
  min-width: 0;
}

#editor input:not([type="file"]), #editor textarea {
  padding: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

#editor textarea {
  resize: vertical;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-actions button {
  font: inherit;
  cursor: pointer;
  padding: 8px 14px;
}

#preview {
  width: 100%;
  height: 32rem;
  border: 1px solid var(--line);
  margin-top: 20px;
}

.portfolio .top {
  height: 74px;
}

.portfolio .hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 1fr);
  padding-block: clamp(48px, 9vw, 115px);
}

.hero-copy h1 {
  font-size: clamp(3.7rem, 10vw, 8.4rem);
  margin-block: 14px 20px;
}

.hero-line {
  margin: 0 0 30px;
  font-size: clamp(1.3rem, 3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
}

.hero-link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 5px;
}






.portfolio .about {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.writing-nav {
  display: none;
}

.portfolio:has(#articles) .writing-nav {
  display: inline;
}

#articles ul {
  padding: 0;
  list-style: none;
}

#articles li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

#articles .text-link {
  margin-top: 0;
  margin-right: 12px;
  overflow-wrap: anywhere;
}

#articles small {
  color: var(--muted);
}

@media (max-width: 680px) {
  .portfolio .hero,
  .portfolio .about {
    grid-template-columns: 1fr;
  }
}

.collection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px 54px;
}

.collection-heading p {
  max-width: 19em;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.empty-collection {
  align-self: start;
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.entry-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.entry-list li,
#articles .entry-list li {
  padding: 17px 20px;
  border: 1px solid var(--line);
  background: #fbfbf5;
  overflow-wrap: anywhere;
}

.entry-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.entry-list a:hover {
  color: var(--green);
  text-decoration: underline;
}

.entry-list p {
  margin: 8px 0;
  color: var(--muted);
}

.entry-list time {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .8rem;
}

#editor select {
  padding: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font: inherit;
}

@media (max-width: 720px) {
  .portfolio .top {
    height: auto;
    padding-block: 16px;
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .portfolio nav {
    flex-wrap: wrap;
    gap: 9px 15px;
  }

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

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  height: 3px;
  background: #789348;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.portfolio .top {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f7f7eff2;
  backdrop-filter: blur(12px);
}

.portfolio .skip {
  z-index: 6;
}

.portfolio .section {
  scroll-margin-top: 122px;
}

.portfolio nav a {
  padding-block: 5px;
  border-bottom: 2px solid transparent;
}

.portfolio nav a[aria-current="location"] {
  border-color: #789348;
  color: var(--green);
  font-weight: 700;
}







@keyframes enter-portfolio {
  from { opacity: .38; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}


@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .start-here,
  .section-arrived > h2,
  .section-arrived > .collection-heading,
  .section-arrived > .bio {
    animation: enter-portfolio 640ms cubic-bezier(.2,.72,.3,1) both;
  }

  .entry-list li {
    transition: transform 180ms ease, border-color 180ms ease;
  }

  .entry-list li:focus-within,
  .entry-list li:hover {
    transform: translateY(-3px);
    border-color: #879567;
  }
}


@media (max-width: 720px) {
  .portfolio .section {
    scroll-margin-top: 155px;
  }
}

.hero-copy h1 {
  font-size: clamp(2.35rem, 5.2vw, 5rem);
  letter-spacing: -.055em;
}

.hero-line {
  max-width: 18em;
  font-size: clamp(1.12rem, 2vw, 1.55rem);
  color: var(--muted);
  font-weight: 500;
}

.start-here {
  padding: clamp(22px, 4vw, 36px);
  background: linear-gradient(145deg, #eff1e3, #e3e9cf);
  border: 1px solid var(--line);
}

.start-here h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.start-here ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.start-here li {
  border-top: 1px solid #c9cfb7;
}

.start-here a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
}

.start-here a:hover {
  background: #ffffff70;
}

.start-here small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.bio p + p {
  margin-top: 1em;
}

.long-read h1 {
  line-height: 1.3;
}

.long-read h2 {
  margin-top: 2.6em;
  padding-top: .85em;
  border-top: 1px solid var(--line);
}

.long-read h3 {
  margin: 1.65em 0 .35em;
}

.long-read figure {
  margin: 2em 0;
}

.long-read figure img {
  display: block;
  width: 100%;
}

.long-read figcaption {
  margin-top: .65em;
  color: var(--muted);
  text-align: center;
  font-size: .88rem;
}

.article-toc {
  margin: 2em 0;
  padding-inline: 16px;
  background: #eef0e4;
}

.article-toc summary {
  display: list-item;
  list-style: revert;
}

.article-toc a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-table {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid var(--line);
}

.article-table table {
  width: 100%;
  min-width: 310px;
  border-collapse: collapse;
  font-size: .93rem;
}

.article-table th,
.article-table td {
  padding: .65em .85em;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: normal;
}

.article-table thead {
  background: #e9ecd9;
}

.article-table tbody tr:last-child > * {
  border-bottom: 0;
}

.portfolio .hero {
  position: relative;
  isolation: isolate;
  padding-inline: clamp(20px, 5vw, 64px);
  margin-block: 22px;
  overflow: hidden;
  border: 1px solid #d5ddbe;
  border-radius: 26px;
  background: #eef0df;
}

.hero-light {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse 310px 230px at var(--light-x, 18%) var(--light-y, 22%), #fff9d0, transparent),
    radial-gradient(ellipse at 90% 78%, #b6ca92, transparent 64%),
    repeating-linear-gradient(90deg, #43532212 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, #43532212 0 1px, transparent 1px 42px);
}

.portfolio .start-here {
  background: #fbfcf2c9;
  border: 1px solid #ffffffba;
  border-radius: 18px;
  box-shadow: 0 18px 45px #43532224;
  backdrop-filter: blur(10px);
}

.portfolio .about {
  align-items: start;
}

.about-role {
  color: var(--muted);
}

.collection-heading .collection-count {
  margin-top: 14px;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}

.portfolio .entry-list li {
  border-radius: 12px;
}

.entry-list time {
  padding: 2px 8px;
  background: #e9edd9;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}

.show-more {
  grid-column: 2;
  justify-self: start;
  border: 1px solid #a7b286;
  border-radius: 6px;
  background: transparent;
  color: var(--green);
  font: inherit;
  padding: 8px 14px;
  cursor: pointer;
}

.show-more:hover,
.show-more:focus-visible {
  background: var(--lime);
}

@keyframes hero-light-drift {
  from { transform: scale(1.02) translateX(-1%); }
  to { transform: scale(1.14) translateX(2%); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-light {
    animation: hero-light-drift 6s ease-in-out 2 alternate;
  }

  .section-arrived > .entry-list,
  .section-arrived > .empty-collection {
    animation: enter-portfolio 600ms ease-out 90ms both;
  }

  .start-here a span:last-child {
    transition: transform 200ms ease;
  }

  .start-here a:is(:hover, :focus-visible) span:last-child {
    transform: translate(3px, -3px);
  }
}

@media (max-width: 720px) {
  .show-more {
    grid-column: 1;
  }
}
