:root {
  --ink: #0b0b0b;
  --paper: #f4f4ef;
  --muted: #77776f;
  --line: rgba(11, 11, 11, .2);
  --accent: #6e28f0;
  --pad: clamp(1.2rem, 4vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; }
button { font: inherit; }
::selection { background: var(--ink); color: var(--paper); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 244, 239, .9);
  backdrop-filter: blur(14px);
}
.home-link {
  display: inline-flex;
  align-items: baseline;
  font-size: .8rem;
  letter-spacing: .08em;
  text-decoration: none;
}
.home-name { font-weight: 700; }
.home-project {
  margin-left: .38rem;
  font-family: "Instrument Sans", "Helvetica Neue", sans-serif;
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}
.header-actions { display: flex; align-items: center; gap: 1.15rem; }
.section-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  text-decoration: none;
}
.lang-switch { display: flex; align-items: center; gap: .25rem; }
.lang-switch button {
  border: 0;
  border-bottom: 1px solid transparent;
  padding: .3rem .12rem;
  background: transparent;
  color: inherit;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { border-color: currentColor; }

.letters-index {
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--pad) 7rem;
}
.index-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(13rem, .6fr);
  align-items: end;
  gap: 3rem;
  padding-bottom: clamp(4rem, 8vw, 7rem);
}
.index-intro h1 {
  max-width: 10ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .86;
}
.index-intro p { margin: 0 0 .5rem; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.letter-list { border-top: 1px solid var(--ink); }
.letter-card {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.letter-number, .letter-date {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.letter-date { display: block; margin-bottom: .75rem; color: var(--muted); }
.letter-card h2 {
  margin: 0 0 .8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
}
.letter-card p { max-width: 38rem; margin: 0; color: #34342f; }
.letter-arrow {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: transform .25s, background .25s, color .25s;
}
.letter-card:hover .letter-arrow { background: var(--ink); color: var(--paper); transform: translate(.25rem, -.25rem); }

.letter-shell {
  width: min(100%, 66rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) var(--pad) 8rem;
}
.back-link {
  display: inline-block;
  margin-bottom: clamp(3rem, 8vw, 6rem);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.letter-header { max-width: 54rem; margin-bottom: clamp(3rem, 7vw, 6rem); }
.letter-meta {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.letter-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 9vw, 7.5rem);
  font-weight: 400;
  letter-spacing: -.06em;
  line-height: .92;
}
.letter-body { width: min(100%, 45rem); margin: 0 auto; }
.letter-body p {
  margin: 0 0 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 2vw, 1.42rem);
  line-height: 1.6;
}
.letter-body .opening { font-size: clamp(1.35rem, 2.5vw, 1.7rem); }
.letter-body .breath { margin-top: 2.7rem; }
.letter-body .quoted-line {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
}
.letter-image {
  width: min(100%, 58rem);
  margin: clamp(3rem, 7vw, 5.5rem) auto;
}
.letter-image img { display: block; width: 100%; height: auto; border: 1px solid rgba(11,11,11,.08); }
.letter-image figcaption { margin-top: .7rem; color: var(--muted); font-size: .74rem; text-align: center; }
.signature { margin-top: 3rem !important; font-style: italic; }
.letter-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .site-header { min-height: 4rem; }
  .section-name { display: none; }
  .index-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .index-intro h1 { font-size: clamp(4rem, 25vw, 7rem); }
  .letter-card { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .letter-arrow { display: none; }
  .letter-header h1 { font-size: clamp(3.1rem, 17vw, 5.4rem); }
  .letter-body p { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
