:root {
  --paper: #f3ede2;
  --paper-soft: #fffaf0;
  --ink: #20302f;
  --muted: #697069;
  --teal: #24595f;
  --teal-deep: #123b40;
  --moss: #72836f;
  --gold: #b88a3f;
  --line: #d9cfbd;
  --shadow: 0 26px 72px rgba(42, 37, 25, 0.16);
  --page: 980px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(184, 138, 63, 0.18), transparent 32rem),
    linear-gradient(180deg, #eee9df 0%, #f6f1e7 42%, #f8f3e8 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

body {
  margin: 0;
  min-width: 320px;
  padding: 26px 0 40px;
}

img,
iframe {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

a:focus-visible,
iframe:focus-visible {
  outline: 3px solid rgba(184, 138, 63, 0.5);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-150%);
  border-radius: 6px;
  background: var(--teal-deep);
  color: #fff6df;
  padding: 8px 12px;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(var(--page), calc(100% - 56px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(217, 207, 189, 0.68);
  border-radius: 8px;
  background: var(--paper-soft);
  box-shadow: var(--shadow);
}

.site-header {
  background: rgba(255, 250, 240, 0.96);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 50px;
  padding: 0 72px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 28px;
  letter-spacing: 0.12em;
}

.brand-text {
  padding-left: 0.12em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 48px;
  color: #3f4c49;
  font-size: 14px;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 28px;
  height: 2px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  background: var(--teal);
  transition: transform 160ms ease;
}

.site-nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.hero {
  position: relative;
  min-height: 278px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(255, 250, 240, 0.74) 64%, rgba(255, 250, 240, 0.98) 100%),
    var(--paper-soft);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 34px;
  background:
    radial-gradient(46px 18px at 7% 0, transparent 62%, var(--paper-soft) 64%),
    radial-gradient(68px 20px at 22% 5px, transparent 62%, var(--paper-soft) 64%),
    radial-gradient(88px 24px at 48% 4px, transparent 62%, var(--paper-soft) 64%),
    radial-gradient(72px 22px at 72% 2px, transparent 62%, var(--paper-soft) 64%),
    linear-gradient(var(--paper-soft), var(--paper-soft));
}

.hero-image {
  position: absolute;
  inset: 0 auto 0 0;
  width: 56%;
  background: url("./assets/hero-lake.png") center / cover no-repeat;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 62%, rgba(255, 250, 240, 0.92) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 44%;
  margin-left: auto;
  padding: 28px 72px 40px 0;
}

.kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(58px, 6.2vw, 82px);
  line-height: 0.95;
}

.hero-copy p:not(.kicker) {
  margin-bottom: 0;
  color: #394845;
  font-size: 16px;
  line-height: 1.75;
}

.hero-actions {
  display: none;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.hero-actions a,
.read-link,
.social-links a,
.back-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-bottom: 1px solid currentColor;
  color: var(--teal);
  font-weight: 650;
}

.section {
  padding: 10px 72px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 10px;
}

.section-heading h2,
.about-section h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.1;
}

.section-heading p {
  max-width: 350px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.section-heading h2::before,
.about-section .kicker::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 22px;
  margin-right: 12px;
  vertical-align: -3px;
  background: var(--gold);
}

.post-grid,
.site-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.post-card,
.site-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 250, 240, 0.82);
  transition: border-color 160ms ease, transform 160ms ease;
}

.post-card:hover,
.site-card:hover {
  border-color: rgba(184, 138, 63, 0.78);
  transform: translateY(-2px);
}

.post-media {
  display: block;
  height: 100px;
  border-bottom: 1px solid var(--line);
  background-size: cover;
  background-position: center;
}

.media-desk {
  background-image: url("./assets/post-desk.png");
}

.media-leaf {
  background-image: url("./assets/post-leaves.png");
}

.media-coast {
  background-image: url("./assets/post-coast.png");
}

.media-codeagent {
  background:
    linear-gradient(135deg, rgba(18, 59, 64, 0.88), rgba(36, 89, 95, 0.54)),
    url("./assets/site-star.png") center / cover no-repeat;
}

.post-body,
.site-body {
  padding: 12px 14px 12px;
}

.post-meta {
  margin-bottom: 8px;
  color: var(--moss);
  font-size: 12px;
}

.post-card h3,
.site-card h3 {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.35;
}

.post-card p,
.site-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.read-link {
  min-height: 30px;
  font-size: 13px;
}

.post-card .post-body > p:not(.post-meta) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.post-card .read-link {
  display: none;
}

.site-card iframe {
  display: block;
  width: 100%;
  height: 86px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fffaf0;
}

.site-card .site-body {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
}

.site-card .post-meta,
.site-card .site-body p {
  display: none;
}

.site-card h3 {
  margin: 0;
}

.site-card .read-link {
  min-height: 28px;
  margin-left: auto;
  border-bottom: 0;
  font-size: 0;
}

.site-card .read-link::after {
  content: "↗";
  font-size: 16px;
}

.about-section {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin: 20px 72px 24px;
}

.avatar {
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: url("./assets/avatar.png") center / cover no-repeat;
}

.about-section p:not(.kicker) {
  max-width: 620px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.social-links a {
  min-height: 30px;
  border-bottom: 0;
  font-size: 13px;
}

.site-footer {
  background:
    radial-gradient(circle at 30% 50%, rgba(184, 138, 63, 0.16), transparent 17rem),
    linear-gradient(180deg, #173f45, #10343a);
  color: #f4ead3;
}

.footer-inner {
  min-height: 66px;
}

.footer-inner a {
  color: #fff1ca;
}

.article-main {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.article-main .kicker {
  margin-bottom: 18px;
}

.article-main h1 {
  font-size: clamp(42px, 7vw, 72px);
}

.article-main p,
.article-main li {
  color: #4c5552;
  font-size: 17px;
}

.article-main blockquote {
  margin: 34px 0;
  border-left: 4px solid var(--gold);
  padding: 4px 0 4px 18px;
  color: var(--teal);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 22px;
}

.article-main h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
}

.source-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 34px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(184, 138, 63, 0.12), transparent 48%),
    rgba(255, 250, 240, 0.78);
  padding: 18px 20px;
}

.source-panel h2,
.embedded-heading h2 {
  margin-bottom: 0;
}

.source-label {
  margin-bottom: 2px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 650;
}

.embedded-article {
  margin-top: 38px;
}

.embedded-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.embedded-heading p {
  max-width: 300px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.embedded-article iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf0;
}

.back-link {
  margin-top: 32px;
}

@media (max-width: 900px) {
  body {
    padding: 0;
  }

  .page-shell {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .header-inner,
  .footer-inner {
    padding: 0 20px;
  }

  .hero {
    min-height: 360px;
  }

  .hero-image {
    width: 100%;
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(255, 250, 240, 0.08), rgba(255, 250, 240, 0.9) 72%, var(--paper-soft) 100%),
      var(--paper-soft);
  }

  .hero-copy {
    width: min(560px, calc(100% - 40px));
    margin: 0;
    padding: 134px 0 54px;
    justify-self: center;
  }

  .section {
    padding: 34px 20px 0;
  }

  .post-grid,
  .site-grid {
    grid-template-columns: 1fr;
  }

  .post-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
  }

  .post-media {
    height: auto;
    min-height: 100%;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .site-card iframe {
    height: 128px;
  }

  .about-section {
    margin: 28px 20px 32px;
  }

  .article-main {
    padding: 48px 0;
  }

  .source-panel,
  .embedded-heading {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .embedded-article iframe {
    height: 620px;
  }
}

@media (max-width: 620px) {
  .header-inner {
    min-height: 48px;
  }

  .brand {
    font-size: 24px;
  }

  .site-nav {
    margin-left: auto;
  }

  .site-nav a {
    display: none;
  }

  .site-nav::after {
    content: "☰";
    color: #263636;
    font-size: 25px;
    line-height: 1;
  }

  .hero {
    min-height: 322px;
  }

  .hero-copy {
    padding-top: 112px;
  }

  h1 {
    font-size: clamp(56px, 18vw, 76px);
  }

  .hero-copy p:not(.kicker) {
    font-size: 15px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .section-heading h2,
  .about-section h2 {
    font-size: 27px;
  }

  .post-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .post-body,
  .site-body {
    padding: 11px 12px;
  }

  .post-card h3,
  .site-card h3 {
    font-size: 16px;
  }

  .site-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .site-card iframe {
    height: 76px;
  }

  .site-card .post-meta,
  .site-card p,
  .site-card .read-link {
    display: none;
  }

  .site-card h3 {
    margin: 0;
    font-size: 14px;
  }

  .about-section {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
  }

  .avatar {
    width: 64px;
  }

  .footer-inner {
    min-height: 64px;
    justify-content: center;
    text-align: center;
  }

  .footer-inner span {
    display: none;
  }
}
