:root {
  --bg: #f7f2ea;
  --ink: #171615;
  --muted: #6e6860;
  --line: rgba(23, 22, 21, 0.16);
  --paper: #fffaf2;
  --accent: #2d6f73;
  --accent-2: #bb5037;
  --shadow: 0 22px 70px rgba(42, 34, 25, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(45, 111, 115, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(45, 111, 115, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 234, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-size: 13px;
}

.site-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 14px;
}

.site-nav a {
  text-decoration: none;
}

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 72px) 52px;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(54px, 9vw, 116px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
}

.hero-actions,
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.preview-stack {
  position: relative;
  min-height: 560px;
}

.browser-frame {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(23, 22, 21, 0.28);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.browser-frame::before {
  content: "";
  display: block;
  height: 30px;
  border-bottom: 1px solid rgba(23, 22, 21, 0.13);
  background:
    radial-gradient(circle at 16px 15px, #c75641 0 4px, transparent 5px),
    radial-gradient(circle at 32px 15px, #d7a645 0 4px, transparent 5px),
    radial-gradient(circle at 48px 15px, #5c9b73 0 4px, transparent 5px),
    #f1eee7;
}

.browser-frame iframe {
  display: block;
  width: 100%;
  height: calc(100% - 30px);
  border: 0;
  background: #fff;
  pointer-events: none;
}

.frame-main {
  inset: 0 8% auto auto;
  width: min(650px, 92%);
  height: 420px;
}

.frame-side {
  left: 0;
  bottom: 0;
  width: min(360px, 54%);
  height: 330px;
  transform: rotate(-2.5deg);
}

.frame-small {
  right: 0;
  bottom: 18px;
  width: min(310px, 46%);
  height: 300px;
  transform: rotate(2deg);
}

.section {
  padding: 74px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.7fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 36px;
}

.section h2,
.article h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.work-list,
.writing-list {
  border-top: 1px solid var(--line);
}

.work-item,
.writing-item {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 0.42fr);
  gap: 28px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.work-item h3,
.writing-item h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.12;
}

.work-item p,
.writing-item p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.meta span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.62);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.archive-note {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 32px;
  align-items: start;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.72);
}

.archive-note strong {
  font-size: 26px;
  line-height: 1.2;
}

.archive-note p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 13px;
}

.article-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 20px 90px;
}

.article {
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.76);
  box-shadow: 0 18px 60px rgba(42, 34, 25, 0.08);
}

.article time {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 14px;
}

.article h1 {
  margin-bottom: 28px;
}

.article h2 {
  margin-top: 34px;
  font-size: 24px;
}

.article p,
.article li {
  color: #302c27;
  font-size: 18px;
}

.article blockquote {
  margin: 24px 0;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.article-note {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 13px;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .section-head,
  .work-item,
  .writing-item,
  .archive-note {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .preview-stack {
    min-height: 520px;
  }

  .links {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .hero-copy h1 {
    font-size: 52px;
  }

  .preview-stack {
    min-height: 430px;
  }

  .frame-main {
    width: 100%;
    height: 300px;
    right: 0;
  }

  .frame-side,
  .frame-small {
    width: 58%;
    height: 220px;
  }

  .work-item,
  .writing-item {
    padding: 24px 0;
  }
}
