* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body {
  margin: 0;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; }
.icon-link { text-decoration: none; }
.link-label {
  text-decoration-line: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
}
.icon-link:hover .link-label { text-decoration-color: var(--ink); }
.external, .up-arrow {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  vertical-align: .06em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--icon);
}
.icon-link:hover .external, .icon-link:hover .up-arrow { color: var(--secondary); }
.page { width: min(100%, 840px); margin: auto; padding: 56px 28px 42px; }
.page > header, .section-body { max-width: 664px; }
.introduction { margin-top: 40px; max-width: 600px; color: var(--ink); line-height: 1.7; }
.introduction p + p { margin-top: 6px; }
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.way-title, .project h3, .writing-list :is(h2, h3) { color: var(--ink); font: 400 var(--text-title)/1.4 var(--serif); }
.ways p { color: var(--secondary); font-size: var(--text-summary); line-height: 1.6; margin-top: 8px; }
.projects, .section { margin-top: 56px; padding-top: 36px; border-top: 1px dashed var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 32px; }
.section-label { color: var(--quiet); font: 400 var(--text-meta)/1.6 var(--sans); }
.section > h2 { margin-bottom: 32px; }
.project-list { padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 48px 32px; }
.project { min-width: 0; }
.project-meta { color: var(--quiet); font-size: var(--text-small); line-height: 1.65; margin-top: 8px; }
.project-mission { color: var(--secondary); margin-top: 8px; font-size: var(--text-summary); line-height: 1.7; text-wrap: pretty; }
.project--manuscript { --quiet: #6b6b6b; padding: 22px 24px 24px; background: var(--paper); }
.writing-more { color: var(--quiet); font: 400 var(--text-meta)/1.6 var(--sans); text-decoration: none; white-space: nowrap; }
.writing-more:hover { color: var(--ink); }
.writing-more .bracket { color: var(--bracket); }
.writing-list { padding: 0; list-style: none; }
.writing-list li + li { margin-top: 32px; }
.writing-list time, .reading-date { display: block; color: var(--secondary); font: 400 var(--text-meta)/1.6 var(--sans); }
.writing-list time { margin-top: 4px; }
.section-body { min-width: 0; }
.about-text { color: var(--body); font-size: var(--text-body); max-width: 600px; }
.about-text p + p { margin-top: 1em; }
.contact-copy { font-size: var(--text-body); color: var(--body); max-width: 590px; }
.contact-copy + .contact-copy { margin-top: 1em; }
.contact-switcher { margin-top: 32px; color: var(--secondary); font: 400 var(--text-meta)/1.6 var(--sans); }
.contact-methods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.contact-control, .contact-email, .elsewhere > a { padding: 3px 0; color: inherit; font: inherit; line-height: 1.6; }
.contact-control { border: 0; background: none; cursor: pointer; text-align: left; white-space: nowrap; }
.contact-control[aria-pressed="true"] { color: var(--ink); }
.contact-control:hover .link-label, .contact-control[aria-pressed="true"] .link-label { text-decoration-color: var(--ink); }
.contact-email { min-width: 0; overflow-wrap: anywhere; }
.contact-display { margin-top: 24px; }
.contact-panel { min-width: 0; }
/* Only the selected view participates in layout; a closed display takes no space. */
.contact-display[hidden], .contact-panel[hidden] { display: none; }
.contact-picture { width: 280px; max-width: 100%; }
.contact-picture > img { display: block; width: 100%; height: auto; }
.contact-qr-link { margin-top: 12px; }
.elsewhere { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.elsewhere + .elsewhere { margin-top: 16px; }
.elsewhere > a { white-space: nowrap; }
.rss-address { display: block; margin-top: 12px; }
.rss-address input { width: 100%; max-width: 360px; padding: 3px 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-decoration-color: var(--underline); text-decoration-thickness: 1px; text-underline-offset: 2.5px; }
.rss-address input:focus-visible { outline: 1px solid var(--underline); outline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Without JS every destination stays readable, with no non-working switches. */
.contact-switcher:not([data-enhanced]) .contact-control { display: none; }
.contact-switcher:not([data-enhanced]) .contact-panel + .contact-panel { margin-top: 24px; }
.footer { line-height: 1.6; display: flex; justify-content: space-between; gap: 20px; margin-top: 52px; padding-top: 22px; border-top: 1px dashed var(--line); color: var(--quiet); font-size: var(--text-xs); }
.skip-link { position: absolute; top: 10px; left: 16px; transform: translateY(-180%); padding: 4px 10px; background: white; }
.skip-link:focus { transform: none; }

@media (max-width: 600px) {
  .page { padding: 32px 24px 28px; }
  .introduction { margin-top: 30px; }
  .ways { margin-top: 34px; gap: 14px; }
  .ways p { font-size: var(--text-small); }
  .projects, .section { margin-top: 42px; padding-top: 28px; }
  .project-list { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
  .project-mission { max-width: 34em; }
  .contact-switcher { margin-top: 28px; }
  .contact-methods { gap: 8px 20px; }
  .project--manuscript { padding: 20px; }
  .footer { margin-top: 38px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Display the untouched 1260 × 2736 image through x=240, y=850, w=780, h=820. */
.whatsapp-qr-view { position: relative; width: 280px; max-width: 100%; aspect-ratio: 78 / 82; overflow: hidden; }
.whatsapp-qr-view img { position: absolute; width: 161.53846154%; max-width: none; height: auto; margin: 0; left: -30.76923077%; top: -103.65853659%; }
