:root {
  color-scheme: light;
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.004 28.2);
  --ink: oklch(0.19 0.018 28.2);
  --muted: oklch(0.47 0.018 28.2);
  --primary: oklch(0.58 0.22 28.2);
  --primary-dark: oklch(0.39 0.16 25);
  --accent: oklch(0.27 0.075 245);
  --rule: oklch(0.88 0.008 28.2);
  --white: oklch(1 0 0);
  --max-width: 1180px;
  --gutter: clamp(20px, 5vw, 72px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: MiSans, "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
  transition: transform 180ms var(--ease-out);
}

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

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

.site-header,
.hero,
.writing-section,
.featured-note,
.moments,
.about,
.site-footer {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max-width));
  margin-inline: auto;
}

.site-header {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.wordmark-mark {
  width: 14px;
  height: 14px;
  background: var(--primary);
  transform: rotate(45deg);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 46px);
}

.site-header nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease-out);
}

.site-header nav a:hover {
  color: var(--ink);
}

.site-header nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  min-height: min(780px, calc(100vh - 96px));
  padding-block: clamp(64px, 10vw, 128px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(52px, 8vw, 118px);
}

.hero-copy {
  animation: hero-in 800ms var(--ease-out) both;
}

.intro-line {
  margin-bottom: 24px;
  color: var(--primary-dark);
  font-weight: 650;
}

.hero h1 {
  max-width: 9em;
  font-size: clamp(3.3rem, 7.1vw, 5.75rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 850;
}

.hero-summary {
  max-width: 38em;
  margin-top: 34px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.13rem);
  line-height: 1.9;
}

.primary-link {
  width: fit-content;
  margin-top: 40px;
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  gap: 42px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms var(--ease-out);
}

.primary-link:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.hero-place {
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-place span {
  margin-right: 5px;
  color: var(--primary);
  font-size: 0.62rem;
}

.hero-art {
  align-self: stretch;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: art-in 920ms 80ms var(--ease-out) both;
}

.hero-art img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-art figcaption {
  padding-top: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.74rem;
}

.writing-section {
  padding-block: clamp(92px, 13vw, 168px);
  border-top: 1px solid var(--rule);
}

.section-heading {
  margin-bottom: clamp(48px, 7vw, 78px);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.section-heading h2,
.moments h2 {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-heading p,
.moments-heading p {
  max-width: 22em;
  color: var(--muted);
}

.post-list {
  border-top: 2px solid var(--ink);
}

.post-row {
  min-height: 190px;
  padding-block: 34px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  align-items: start;
  gap: clamp(22px, 5vw, 66px);
  border-bottom: 1px solid var(--rule);
}

.post-date {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 0.75rem;
}

.post-date time {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 780;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.post-body h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.post-body p {
  max-width: 48em;
  margin-top: 13px;
  color: var(--muted);
}

.text-link {
  justify-self: end;
  margin-top: 5px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.text-link span {
  display: inline-block;
  transition: transform 180ms var(--ease-out);
}

.text-link:hover span {
  transform: translateX(4px);
}

.featured-note {
  width: 100%;
  max-width: none;
  padding: clamp(86px, 13vw, 170px) max(var(--gutter), calc((100vw - var(--max-width)) / 2));
  background: var(--primary);
  color: var(--white);
}

.featured-meta {
  margin-bottom: 46px;
  font-size: 0.8rem;
  font-weight: 700;
}

.featured-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 0.75fr);
  gap: clamp(52px, 10vw, 150px);
  align-items: start;
}

.featured-content h2 {
  font-size: clamp(2.7rem, 5.7vw, 5.2rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.prose {
  max-width: 36em;
  font-size: 1.04rem;
  line-height: 2;
}

.prose p + p {
  margin-top: 1.4em;
}

.moments {
  width: 100%;
  max-width: none;
  padding: clamp(92px, 13vw, 168px) max(var(--gutter), calc((100vw - var(--max-width)) / 2));
  background: var(--accent);
  color: var(--white);
}

.moments-heading {
  margin-bottom: clamp(56px, 8vw, 96px);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.moments-heading p {
  color: oklch(0.82 0.025 245);
}

.moment-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid oklch(0.45 0.05 245);
}

.moment-list li {
  padding-block: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 34px;
  border-bottom: 1px solid oklch(0.45 0.05 245);
}

.moment-list time {
  color: oklch(0.74 0.04 245);
  font-size: 0.8rem;
}

.moment-list p {
  max-width: 45em;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.7;
}

.about {
  padding-block: clamp(96px, 14vw, 180px);
  display: grid;
  grid-template-columns: 0.55fr minmax(0, 1fr);
  gap: clamp(40px, 8vw, 120px);
}

.about-label {
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
}

.about h2 {
  max-width: 18em;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.about div > p {
  max-width: 42em;
  margin-top: 28px;
  color: var(--muted);
  font-size: 1.04rem;
}

.email-link {
  display: inline-block;
  margin-top: 34px;
  color: var(--primary-dark);
  font-weight: 700;
}

.site-footer {
  min-height: 130px;
  padding-block: 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.76rem;
}

.site-footer p:nth-child(2) {
  text-align: center;
}

.site-footer a {
  justify-self: end;
  color: var(--muted);
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes art-in {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0);
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 78px;
  }

  .wordmark {
    font-size: 0.7rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 0;
  }

  .hero-art img {
    aspect-ratio: 16 / 11;
  }

  .post-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .post-row .text-link {
    grid-column: 2;
    justify-self: start;
    margin-top: -2px;
  }

  .featured-content,
  .about {
    grid-template-columns: 1fr;
  }

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

  .site-footer p:nth-child(2) {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-block: 18px;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 58px;
    gap: 52px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14.5vw, 4rem);
  }

  .section-heading,
  .moments-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .post-date {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }

  .post-date time {
    font-size: 1rem;
  }

  .post-row .text-link {
    grid-column: 1;
    margin-top: 4px;
  }

  .featured-content {
    gap: 42px;
  }

  .moment-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
  }

  .site-footer a {
    justify-self: start;
  }
}

@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;
  }
}
