/* =========================================================
   林知远 · 个人主页
   Palette: paper / forest / sage / clay
   ========================================================= */

:root {
  --paper: #f6f3ea;
  --paper-2: #efe9dc;
  --paper-3: #e7dfd0;
  --white: #fcfaf4;
  --ink: #14251f;
  --forest: #1e4d3b;
  --forest-deep: #12352a;
  --sage: #a9c0a4;
  --sage-light: #dce7d7;
  --clay: #c97b5a;
  --muted: #5f6f66;
  --line: rgba(20, 37, 31, 0.14);
  --line-strong: rgba(20, 37, 31, 0.24);
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Consolas", "Liberation Mono", monospace;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(169, 192, 164, 0.16), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(201, 123, 90, 0.07), transparent 32rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--forest);
  color: var(--paper);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 4px;
  border-radius: 3px;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 18px;
  z-index: 2100;
  background: var(--forest);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12px;
  transition: top 0.25s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(var(--container), calc(100% - 56px));
  margin-inline: auto;
}

.section {
  padding: clamp(80px, 11vw, 138px) 0;
  scroll-margin-top: 92px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 4px rgba(201, 123, 90, 0.12);
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(246, 243, 234, 0.84);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--forest);
  border-radius: 50%;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.brand:hover .brand-mark {
  background: var(--forest);
  color: var(--paper);
}

.brand-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-name span {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 38px);
  margin-left: auto;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--forest);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 17px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  color: var(--forest);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.nav-cta span {
  font-size: 13px;
  line-height: 1;
}

.nav-cta:hover {
  background: var(--forest);
  color: var(--paper);
  transform: translateY(-1px);
}

.menu-toggle {
  position: relative;
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1px;
  margin-left: -8px;
  margin-top: -0.5px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle span:nth-child(1) {
  transform: translateY(-5px);
}

.menu-toggle span:nth-child(2) {
  transform: translateY(0);
}

.menu-toggle span:nth-child(3) {
  transform: translateY(5px);
}

body.nav-open .menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
}

body.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

body.nav-open .menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 148px 0 88px;
  overflow: hidden;
  scroll-margin-top: 0;
}

.hero::before {
  content: "";
  position: absolute;
  width: 48vw;
  height: 48vw;
  top: -12vw;
  right: -14vw;
  border: 1px solid rgba(30, 77, 59, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(30px, 6vw, 82px);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 28px 0 30px;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6.6vw, 5.8rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.hero-line {
  white-space: nowrap;
}

.hero h1 .accent {
  position: relative;
  display: inline-block;
  color: var(--forest);
  padding: 0 0.04em;
  background-image: linear-gradient(transparent 66%, rgba(169, 192, 164, 0.62) 66%, rgba(169, 192, 164, 0.62) 88%, transparent 88%);
}

.hero-intro {
  max-width: 31em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
  line-height: 1.95;
}

.hero-intro strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 38px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn-primary svg {
  transition: transform 0.35s var(--ease);
}

.btn-primary:hover {
  background: var(--forest-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(18, 53, 42, 0.18);
}

.btn-primary:hover svg {
  transform: translate(3px, -3px);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.btn-text span {
  color: var(--forest);
  font-size: 13px;
}

.btn-text:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.hero-tags li {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 580px;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(30, 77, 59, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  width: 118%;
  aspect-ratio: 1;
  top: -5%;
  left: -9%;
}

.orbit-two {
  width: 88%;
  aspect-ratio: 1;
  right: -13%;
  bottom: -11%;
  border-style: dashed;
  opacity: 0.72;
}

.portrait-wrap {
  position: relative;
  z-index: 2;
  width: min(100%, 414px);
  aspect-ratio: 4 / 5;
}

.portrait-outline {
  position: absolute;
  inset: -13px;
  border: 1px solid rgba(30, 77, 59, 0.28);
  border-radius: 220px 220px 28px 28px;
  pointer-events: none;
}

.portrait-frame {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 210px 210px 24px 24px;
  background: var(--forest);
  box-shadow: 0 34px 80px rgba(18, 53, 42, 0.2);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(246, 243, 234, 0.16);
  border-radius: inherit;
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.portrait-wrap:hover .portrait-frame img {
  transform: scale(1.025);
}

.portrait-badge {
  position: absolute;
  right: -24px;
  bottom: 42px;
  z-index: 3;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest);
  text-align: center;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.55;
  letter-spacing: 0.12em;
  transform: rotate(7deg);
  box-shadow: 0 12px 34px rgba(20, 37, 31, 0.08);
}

.portrait-badge em {
  color: var(--clay);
  font-style: normal;
}

.vertical-note {
  position: absolute;
  left: -42px;
  bottom: 4px;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

/* =========================================================
   Ticker
   ========================================================= */

.ticker {
  overflow: hidden;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(239, 233, 220, 0.55);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 34s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-group {
  display: flex;
  align-items: center;
}

.ticker-group span {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-group span::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clay);
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* =========================================================
   Section headings
   ========================================================= */

.section-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 22px;
  padding-top: 20px;
  margin-bottom: clamp(42px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.section-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.section-en {
  display: inline-block;
  margin-left: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  vertical-align: middle;
}

.section-note {
  max-width: 250px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
  text-align: right;
}

/* =========================================================
   About
   ========================================================= */

.about-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(40px, 7vw, 104px);
}

.about-lead {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.4vw, 2.9rem);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -0.03em;
}

.about-lead em {
  color: var(--forest);
  font-style: normal;
  background-image: linear-gradient(transparent 72%, rgba(169, 192, 164, 0.55) 72%, rgba(169, 192, 164, 0.55) 92%, transparent 92%);
}

.about-copy {
  max-width: 580px;
}

.about-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}

.about-copy > p:first-of-type::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 3.1em;
  line-height: 0.8;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fact-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fact-value {
  color: var(--ink);
  font-size: 12px;
}

.now {
  margin-top: 30px;
  padding-left: 16px;
  border-left: 2px solid var(--sage);
}

.now-label {
  margin: 0 0 8px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.now ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.now li {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.now li span {
  flex: 0 0 34px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  line-height: 2.4;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.skills span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

/* =========================================================
   Work
   ========================================================= */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}

.project:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 54px rgba(20, 37, 31, 0.08);
}

.project-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
}

.project-visual {
  position: relative;
  min-height: 285px;
  overflow: hidden;
}

.project-featured .project-visual {
  min-height: 420px;
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project h3 {
  margin: 18px 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.project h3 span {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.project p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.project-tags span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

/* Project visual 01: bookshop browser */
.visual-shiguang {
  display: grid;
  place-items: center;
  padding: 7%;
  background:
    radial-gradient(circle at 78% 18%, rgba(252, 250, 244, 0.55), transparent 28%),
    linear-gradient(135deg, #dbe7d5, #c6d7be);
}

.browser {
  width: 88%;
  overflow: hidden;
  border: 1px solid rgba(20, 37, 31, 0.16);
  border-radius: 11px;
  background: var(--white);
  box-shadow: 0 24px 44px rgba(20, 37, 31, 0.13);
  transform: rotate(-2deg);
  transition: transform 0.7s var(--ease);
}

.project:hover .browser {
  transform: rotate(0) translateY(-4px);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(20, 37, 31, 0.09);
  background: #f1ece1;
}

.browser-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}

.dot-red { background: #c97b5a; }
.dot-amber { background: #d8ad6a; }
.dot-green { background: #7fa080; }

.browser-url {
  margin-left: auto;
  color: rgba(20, 37, 31, 0.44);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.browser-content {
  padding: 21px 22px;
}

.mini-kicker {
  margin: 0 0 12px;
  color: rgba(20, 37, 31, 0.5);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.mini-heading {
  margin: 0;
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 29px);
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.book-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin: 19px 0 18px;
}

.book {
  width: 21%;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: flex-end;
  padding: 6px;
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 8px;
  line-height: 1.2;
  box-shadow: 3px 4px 0 rgba(20, 37, 31, 0.09);
}

.book-a {
  background: var(--forest);
  transform: rotate(-4deg);
}

.book-b {
  background: var(--clay);
  transform: translateY(-7px);
}

.book-c {
  background: var(--sage);
  color: var(--forest-deep);
  transform: rotate(3deg);
}

.mini-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 9px;
  border-top: 1px solid rgba(20, 37, 31, 0.12);
  color: rgba(20, 37, 31, 0.48);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.mini-search b {
  color: var(--forest);
  font-size: 12px;
  font-weight: 400;
}

.visual-index {
  position: absolute;
  right: 20px;
  bottom: 5px;
  color: rgba(20, 37, 31, 0.12);
  font-family: var(--serif);
  font-size: 82px;
  line-height: 1;
}

/* Project visual 02: weather */
.visual-weather {
  display: grid;
  place-items: center;
  padding: 8%;
  background:
    radial-gradient(circle at 80% 12%, rgba(169, 192, 164, 0.18), transparent 30%),
    var(--forest-deep);
}

.weather-card {
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(246, 243, 234, 0.17);
  border-radius: 13px;
  background: rgba(246, 243, 234, 0.035);
  color: var(--paper);
}

.weather-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.weather-label {
  display: block;
  margin-bottom: 4px;
  color: rgba(246, 243, 234, 0.55);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.weather-head strong {
  display: block;
  font-family: var(--serif);
  font-size: 60px;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.weather-state {
  color: rgba(246, 243, 234, 0.62);
  font-size: 10px;
  white-space: nowrap;
}

.weather-chart {
  width: 100%;
  height: 132px;
  margin: 12px 0 8px;
  overflow: visible;
}

.chart-area {
  fill: url(#weatherGrad);
}

.chart-line {
  fill: none;
  stroke: var(--sage);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.chart-dot {
  fill: var(--paper);
  stroke: var(--forest-deep);
  stroke-width: 2;
}

.weather-days {
  display: flex;
  justify-content: space-between;
  color: rgba(246, 243, 234, 0.45);
  font-family: var(--mono);
  font-size: 7px;
}

/* Project visual 03: type */
.visual-type {
  display: grid;
  place-items: center;
  padding: 7%;
  background:
    linear-gradient(rgba(30, 77, 59, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 77, 59, 0.025) 1px, transparent 1px),
    #e8d9c8;
  background-size: 18px 18px;
}

.type-poster {
  position: relative;
  width: 100%;
  min-height: 258px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px;
  border: 1px solid rgba(30, 77, 59, 0.3);
  background: rgba(246, 243, 234, 0.35);
}

.type-top {
  display: flex;
  justify-content: space-between;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.type-big {
  align-self: center;
  color: var(--forest);
  font-family: var(--serif);
  font-size: clamp(94px, 11vw, 142px);
  font-weight: 400;
  line-height: 0.85;
}

.type-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.type-bottom p {
  margin: 0;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.type-lines {
  display: flex;
  gap: 4px;
  width: 36%;
}

.type-lines i {
  flex: 1;
  height: 1px;
  background: rgba(30, 77, 59, 0.35);
}

.type-caption {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(30, 77, 59, 0.38);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

/* =========================================================
   Quote
   ========================================================= */

.quote-band {
  position: relative;
  overflow: hidden;
  padding: clamp(78px, 11vw, 132px) 0;
  background: var(--forest-deep);
  color: var(--paper);
}

.quote-band::before {
  content: "";
  position: absolute;
  width: 64vw;
  aspect-ratio: 1;
  top: -42%;
  right: -20%;
  border: 1px solid rgba(246, 243, 234, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.quote-band::after {
  content: "";
  position: absolute;
  width: 30vw;
  aspect-ratio: 1;
  bottom: -25%;
  left: -10%;
  border: 1px dashed rgba(169, 192, 164, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.quote-inner {
  position: relative;
  z-index: 2;
  max-width: 980px;
}

.quote-mark {
  display: block;
  height: 52px;
  color: var(--sage);
  font-family: var(--serif);
  font-size: 86px;
  line-height: 1;
  opacity: 0.5;
}

.quote-inner blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 5vw, 4.7rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.quote-inner blockquote em {
  color: var(--sage);
  font-style: italic;
}

.quote-by {
  margin: 32px 0 0;
  color: rgba(246, 243, 234, 0.5);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* =========================================================
   Contact
   ========================================================= */

.contact {
  padding-bottom: clamp(72px, 10vw, 110px);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: end;
  gap: clamp(36px, 7vw, 100px);
}

.contact-title {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 6.4vw, 6rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.contact-title em {
  color: var(--forest);
  font-style: italic;
}

.contact-copy {
  max-width: 430px;
}

.contact-copy > p:first-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}

.email-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 18px;
}

.email-link {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--forest);
  color: var(--forest);
  font-family: var(--serif);
  font-size: clamp(1.22rem, 2vw, 1.58rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.copy-btn {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.copy-btn:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.copy-btn.is-copied {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--paper);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.social-links a {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}

.social-links a:hover {
  border-color: var(--forest);
}

.contact-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.contact-note span {
  color: var(--clay);
}

/* =========================================================
   Update note + footer
   ========================================================= */

.update-note {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 4px rgba(30, 77, 59, 0.1);
}

.site-footer {
  padding: 4px 0 34px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--forest);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.footer-inner a:hover {
  border-color: var(--forest);
}

/* =========================================================
   Reveal
   ========================================================= */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1080px) {
  .hero h1 {
    font-size: clamp(3rem, 7.8vw, 5.4rem);
  }

  .vertical-note {
    display: none;
  }

  .portrait-wrap {
    width: min(100%, 380px);
  }

  .hero-visual {
    min-height: 520px;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 126px 0 78px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 74px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    justify-content: flex-start;
    min-height: 0;
    padding-left: 5%;
  }

  .portrait-wrap {
    width: min(78vw, 390px);
  }

  .portrait-badge {
    right: -10px;
  }

  .orbit-one {
    width: 105%;
    left: -7%;
    top: -7%;
  }

  .orbit-two {
    width: 80%;
    right: -4%;
    bottom: -8%;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-copy {
    max-width: 680px;
  }

  .contact-copy {
    max-width: 520px;
  }

  .section-head {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .section-note {
    grid-column: 2;
    max-width: 420px;
    margin-top: 5px;
    text-align: left;
  }

  .project-featured {
    grid-template-columns: 1fr;
  }

  .project-featured .project-visual {
    min-height: 340px;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .project-visual {
    min-height: 300px;
  }

  .visual-shiguang .browser {
    width: min(92%, 470px);
  }
}

@media (max-width: 820px) {
  .container {
    width: min(var(--container), calc(100% - 40px));
  }

  .header-inner {
    height: 70px;
  }

  .brand-name span {
    display: none;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 90px max(24px, 8vw) 48px;
    background:
      radial-gradient(circle at 75% 20%, rgba(169, 192, 164, 0.24), transparent 35%),
      var(--paper);
    transform: translateY(-102%);
    transition: transform 0.55s var(--ease);
  }

  body.nav-open .site-nav {
    transform: translateY(0);
  }

  .site-nav a {
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:hover,
  .site-nav a.is-active {
    color: var(--forest);
  }

  .nav-cta {
    display: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 95;
    display: block;
  }

  .brand {
    position: relative;
    z-index: 95;
  }

  .section-head {
    margin-bottom: 38px;
  }

  .update-note {
    width: calc(100% - 40px);
  }
}

@media (max-width: 600px) {
  .container {
    width: calc(100% - 40px);
  }

  .hero {
    padding-top: 112px;
  }

  .hero h1 {
    margin-top: 24px;
    font-size: clamp(2.65rem, 13vw, 3.85rem);
  }

  .hero-intro {
    font-size: 14px;
  }

  .hero-actions {
    gap: 18px;
    margin-top: 30px;
  }

  .btn-primary {
    padding: 13px 19px;
  }

  .hero-tags {
    margin-top: 32px;
  }

  .hero-visual {
    padding-left: 0;
  }

  .portrait-wrap {
    width: min(86vw, 350px);
  }

  .portrait-outline {
    inset: -9px;
  }

  .portrait-badge {
    width: 88px;
    height: 88px;
    right: -6px;
    bottom: 24px;
    font-size: 7px;
  }

  .section {
    padding: 72px 0;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 7px;
    padding-top: 16px;
  }

  .section-note {
    grid-column: auto;
    margin-top: 3px;
  }

  .section-title {
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }

  .section-en {
    margin-left: 8px;
  }

  .about-lead {
    font-size: clamp(1.7rem, 7.5vw, 2.3rem);
  }

  .about-facts {
    gap: 16px;
  }

  .project-visual,
  .project-featured .project-visual {
    min-height: 270px;
  }

  .project-info {
    padding: 22px;
  }

  .project h3 span {
    display: block;
    margin: 5px 0 0;
  }

  .weather-head strong {
    font-size: 50px;
  }

  .weather-chart {
    height: 112px;
  }

  .type-poster {
    min-height: 234px;
  }

  .quote-band {
    padding: 76px 0;
  }

  .quote-mark {
    height: 42px;
    font-size: 72px;
  }

  .contact-title {
    font-size: clamp(2.65rem, 12.5vw, 4rem);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .update-note {
    width: calc(100% - 40px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
