:root {
  --bg: #ffffff;
  --ink: #000000;
  --quiet: #767676;
  --mark: #d6d6d6;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --tc: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --side: 232px;
  --pad: 40px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #e6e6e6; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  padding: var(--pad);
  display: flex; flex-direction: column;
}
.name {
  font-family: var(--serif); font-weight: 400;
  font-size: 17px; line-height: 1; letter-spacing: -.005em;
}
.sidebar nav { margin-top: 56px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.sidebar nav a, .contact a {
  text-decoration: underline 1px transparent; text-underline-offset: 5px;
  transition: text-decoration-color .2s;
}
.sidebar nav a:hover, .sidebar nav a:focus-visible, .sidebar nav a[aria-current="page"],
.contact a:hover { text-decoration-color: currentColor; }
.sidebar nav a.tc { font-family: var(--tc); font-weight: 400; font-size: 15px; letter-spacing: .1em; }
.contact { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--quiet); font-size: 13px; }
.contact a:hover { color: var(--ink); }
.contact button {
  margin: 12px 0 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline 1px transparent; text-underline-offset: 5px; transition: text-decoration-color .2s;
}
.contact button:hover, .contact button:focus-visible { color: var(--ink); text-decoration-color: currentColor; outline: none; }

main { margin-left: var(--side); min-height: 100vh; padding: var(--pad) var(--pad) var(--pad) 0; display: flex; }
/* The open main area, held by four registration marks until its content is decided. */
.stage { position: relative; flex: 1; min-height: calc(100vh - 2 * var(--pad)); }
.stage i { position: absolute; width: 11px; height: 11px;
  background: linear-gradient(var(--mark), var(--mark)) 50% 50% / 100% 1px no-repeat,
              linear-gradient(var(--mark), var(--mark)) 50% 50% / 1px 100% no-repeat; }
.stage i:nth-child(1) { top: 0; left: 0; }
.stage i:nth-child(2) { top: 0; right: 0; }
.stage i:nth-child(3) { bottom: 0; left: 0; }
.stage i:nth-child(4) { bottom: 0; right: 0; }
.stage p { margin: 0; padding: 48px 56px; font-family: var(--serif); font-size: 19px; color: var(--quiet); }

@media (max-width: 680px) {
  :root { --pad: 22px; }
  .sidebar { position: static; width: auto; flex-direction: row; align-items: baseline; justify-content: space-between; padding-bottom: 0; }
  .sidebar nav { margin-top: 0; }
  .sidebar ul { flex-direction: row; gap: 18px; align-items: baseline; }
  .contact { display: none; }
  main { margin-left: 0; padding: var(--pad); min-height: calc(100vh - 62px); }
  .stage { min-height: 0; }
  .stage p { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
