:root {
  color-scheme: light dark;
  --paper: #f5efe4;
  --paper-raised: #fbf7ef;
  --ink: #1c1a17;
  --ink-soft: #46423b;
  --muted: #7b7368;
  --rule: #dfd6c5;
  --ember: #b9522f;
  --glow: rgba(224, 160, 96, .42);
  --tone-trl: #2c6070;
  --tone-grain: #8b6717;
  --tone-linkedin: #3d5289;
  --shadow: rgba(40, 28, 14, .28);
  --grain-opacity: .14;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Book Antiqua", Cambria, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --gx: 74vw;
  --gy: 22vh;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161412;
    --paper-raised: #1f1c19;
    --ink: #f1ebe0;
    --ink-soft: #d3cbbd;
    --muted: #978f83;
    --rule: #3a352f;
    --ember: #e2734d;
    --glow: rgba(214, 120, 70, .22);
    --tone-trl: #82bccd;
    --tone-grain: #dbb45a;
    --tone-linkedin: #9cb0ea;
    --shadow: rgba(0, 0, 0, .6);
    --grain-opacity: .1;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; background: var(--paper); }
body {
  display: grid;
  min-height: 100svh;
  margin: 0;
  padding: 48px 24px;
  place-items: center;
  color: var(--ink);
  background: var(--paper);
}
::selection { background: color-mix(in srgb, var(--ember) 28%, var(--paper)); color: var(--ink); }

/* Background: a warm light that drifts toward the pointer, over a faint paper grain. */
.glow, .grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.glow {
  z-index: 0;
  background: radial-gradient(circle 520px at var(--gx) var(--gy), var(--glow), transparent 70%);
}
.grain {
  z-index: 1;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .4 0 0 0 .38 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) {
  .grain { mix-blend-mode: screen; }
}

.page {
  position: relative;
  z-index: 2;
  width: min(100%, 580px);
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}
.mark rect { fill: var(--ember); }
.mark path { fill: none; stroke: var(--paper); stroke-width: 2.6; stroke-linecap: round; }

.share {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
.share svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.share:hover, .share:focus-visible { color: var(--ink); border-color: var(--ink-soft); background: var(--paper-raised); }
.share:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.share:active { transform: scale(.94); }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 6.5vw, 56px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.022em;
}
.lead {
  max-width: 24em;
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: clamp(21px, 2.3vw, 24px);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -.008em;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.about {
  max-width: 54ch;
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

.links {
  display: grid;
  margin-top: 40px;
  border-top: 1px solid var(--rule);
}
.link {
  --tone: var(--ember);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.link-trl { --tone: var(--tone-trl); }
.link-grain { --tone: var(--tone-grain); }
.link-linkedin { --tone: var(--tone-linkedin); }
.link::before {
  content: "";
  position: absolute;
  inset: 7px -18px;
  z-index: -1;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 9%, transparent);
  opacity: 0;
  transition: opacity 220ms ease;
}
.link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--tone);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 460ms var(--ease);
}
.link-copy { display: grid; gap: 6px; min-width: 0; transition: transform 320ms var(--ease); }
.link-title {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -.012em;
  transition: color 180ms ease;
}
.link-description { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.link-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--muted);
  overflow: hidden;
  transition: color 200ms ease, background-color 220ms ease, border-color 220ms ease;
}
.link-arrow svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 320ms var(--ease); }

.link:focus-visible { outline: 2px solid var(--tone); outline-offset: 4px; border-radius: 4px; }
.link:focus-visible::before, .link:hover::before { opacity: 1; }
.link:focus-visible::after, .link:hover::after { transform: scaleX(1); }
.link:focus-visible .link-title, .link:hover .link-title { color: var(--tone); }
.link:focus-visible .link-copy, .link:hover .link-copy { transform: translateX(6px); }
.link:focus-visible .link-arrow, .link:hover .link-arrow { color: var(--paper); background: var(--tone); border-color: var(--tone); }
.link:focus-visible .link-arrow svg, .link:hover .link-arrow svg { transform: translate(1px, -1px); }
/* The hit area never moves. Only the contents respond. */
.link:active .link-copy { transform: translateX(8px); transition-duration: 60ms; }
.link:active .link-arrow { transform: scale(.92); }

/* Share dialog */
.share-dialog {
  width: min(100% - 32px, 380px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper-raised);
  box-shadow: 0 30px 80px var(--shadow);
}
.share-dialog::backdrop { background: rgba(18, 14, 10, .5); }
/* Without JavaScript, the share link still opens the dialog through the URL fragment. */
.share-dialog:target:not([open]) {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10;
  transform: translate(-50%, -50%);
}
.share-body { display: grid; gap: 14px; padding: 28px; text-align: center; }
.share-body h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: -.012em; }
.share-body p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.qr {
  justify-self: center;
  width: 236px;
  padding: 24px;
  margin-top: 4px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.qr svg { display: block; width: 100%; height: auto; }
.qr path { stroke-width: 1; }
.share-url { font-family: var(--serif); font-size: 18px; color: var(--ink) !important; letter-spacing: .01em; }
.share-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.button {
  display: inline-grid;
  place-items: center;
  min-width: 96px;
  padding: 11px 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.button:hover { background: var(--paper); border-color: var(--ink-soft); }
.button:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.button-primary { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.button-primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.clipboard-field { position: fixed; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
.button[data-state="done"] { color: var(--paper); background: var(--tone-grain); border-color: var(--tone-grain); animation: settle 1.4s ease forwards; }
@keyframes settle { from, to { opacity: 1; } }

/* 404 */
.not-found .lead { margin-top: 22px; }
.home-link {
  display: inline-block;
  margin-top: 28px;
  padding-block: 10px;
  color: var(--ink);
  text-underline-offset: 6px;
  text-decoration-color: var(--ember);
}
.home-link:hover { color: var(--ember); }
.home-link:focus-visible { outline: 2px solid var(--ember); outline-offset: 6px; }

@media (max-width: 540px) {
  body { padding: 40px 22px; }
  .top { margin-bottom: 32px; }
  .lead { margin-top: 22px; font-size: 20px; }
  .about { font-size: 15px; }
  .links { margin-top: 38px; }
  .link { gap: 14px; padding: 20px 0; }
  .link::before { inset-inline: -12px; }
  .link-title { font-size: 22px; }
  .link-description { font-size: 13.5px; }
  .link-arrow { width: 36px; height: 36px; }
  .link:hover .link-copy, .link:focus-visible .link-copy { transform: none; }
  .glow { background: radial-gradient(circle 360px at var(--gx) var(--gy), var(--glow), transparent 70%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
  .link-copy, .link-arrow, .link-arrow svg { transform: none !important; }
}
@media (forced-colors: active) {
  .glow, .grain { display: none; }
  .link, .share, .link-arrow, .button, .share-dialog { border-color: CanvasText; }
  .link:focus-visible, .share:focus-visible, .button:focus-visible { outline-color: Highlight; }
  .mark rect { fill: CanvasText; }
  .mark path { stroke: Canvas; }
}
@media print {
  body { display: block; padding: 24px; background: white; color: black; }
  .glow, .grain, .share, .share-dialog { display: none; }
  .page { width: 100%; max-width: 580px; }
  .link::before, .link::after { display: none; }
  .link-arrow { display: none; }
}
