:root { color-scheme: light; --paper: #fdf9f0; --ink: #62625e; }
* { box-sizing: border-box; }
html { background: var(--paper); }
@view-transition { navigation: auto; }
::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root),
::view-transition-old(site-header), ::view-transition-new(site-header) { animation: none !important; }
::view-transition-old(page-content) { animation: content-out 100ms ease-out both; }
::view-transition-new(page-content) { animation: content-in 300ms cubic-bezier(.2,.7,.2,1) both; }
::view-transition-group(home-mark) { animation-duration: 680ms; animation-timing-function: cubic-bezier(.2,.75,.25,1); }
::view-transition-old(home-mark) { animation: home-mark-out 180ms ease-in both; }
::view-transition-new(home-mark) { animation: home-mark-in 420ms ease-out 100ms both; }
@keyframes content-out { to { opacity: 0; } }
@keyframes content-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes home-mark-out { to { opacity: 0; transform: scale(.72); } }
@keyframes home-mark-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(page-content), ::view-transition-new(page-content) { animation: none !important; } }
body { margin: 0; color: var(--ink); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.page { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(24px, 4vw, 64px); gap: 40px; }
header, footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
header { border-bottom: 1px solid #9995; padding-bottom: 24px; }
header.site-header { view-transition-name: site-header; position: sticky; top: 0; z-index: 5; align-self: start; background: var(--paper); justify-content: flex-end; height: 76px; min-height: 76px; padding: 0 0 14px; }
.identity { font-size: 16px; letter-spacing: -.025em; text-decoration: none; color: inherit; }
.identity:focus-visible { outline: 1px solid var(--ink); outline-offset: 8px; }
.discipline, .clock-label { font-size: 13px; line-height: 1.5; letter-spacing: .02em; }
main { display: grid; place-items: center; min-height: 220px; view-transition-name: page-content; }
.wordmark { position: relative; width: min(64vw, 720px); aspect-ratio: 642 / 110; margin: 0; overflow: hidden; }

footer { align-items: end; justify-content: flex-end; }
.clock { text-align: right; }
.clock-label { display: block; margin-bottom: 8px; }
.clock-reading { display: flex; gap: 14px; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; }
#time { font: 16px/1.4 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-variant-numeric: tabular-nums; letter-spacing: .035em; }
#zone { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .page { padding: 28px 24px; gap: 32px; }
  header { align-items: start; }
  .discipline { max-width: 120px; text-align: right; }
  .wordmark { width: 84vw; max-width: 100%; }
  footer { align-items: start; flex-direction: column; gap: 28px; }
  .clock { text-align: left; }
  .clock-reading { justify-content: flex-start; }
}
@media (max-height: 450px) and (min-width: 601px) { .page { gap: 24px; } main { min-height: 140px; } }



.brand { display: grid; justify-items: center; width: 100%; text-align: center; transform: translateY(-3svh); mix-blend-mode: normal; }
.tagline { width: 100%; margin: 24px auto 0; font-size: 16px; line-height: 1.5; letter-spacing: .02em; text-align: center; }
.home-section-links { display:flex; justify-content:center; align-items:center; gap:36px; margin:38px auto 0; }
.home-section-links a { display:inline-flex; align-items:center; gap:12px; padding:8px 0; color:inherit; font-size:14px; text-decoration:none; border-bottom:1px solid #9996; transition:border-color 180ms ease,color 180ms ease; }
.home-section-links a:hover { border-color:currentColor; }
.home-section-links a span { font-size:12px; opacity:.65; }

header { align-items: start; }
header .clock { text-align: right; }
header .clock-reading { justify-content: flex-end; }
.bottom-space { height: 49px; }
@media (max-width: 600px) { header .clock { max-width: 65%; } header .clock-reading { gap: 4px 12px; } }

.wordmark img { display: block; width: 100%; height: auto; }
.wordmark img { view-transition-name: home-mark; }

/* A quiet, one-time entrance for the identity and wordmark. */
@keyframes reveal-brand {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-header {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  header { animation: reveal-header 900ms ease-out both; }
  .wordmark { animation: reveal-brand 1400ms cubic-bezier(.22, 1, .36, 1) 150ms both; }
  .tagline { animation: reveal-brand 1100ms cubic-bezier(.22, 1, .36, 1) 550ms both; }
}

/* Color is clipped to the vector letters, leaving the paper untouched. */
.wordmark::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%, transparent 32%,
    #809bb9 42%, #a696bb 50%, #c7a287 58%,
    transparent 68%, transparent 100%);
  background-size: 300% 100%;
  background-position: 100% 50%;
  opacity: .85;
  -webkit-mask: url("assets/wordmark.svg") center / 100% 100% no-repeat;
  mask: url("assets/wordmark.svg") center / 100% 100% no-repeat;
}
@keyframes color-wave {
  from { background-position: 100% 50%; }
  to { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: no-preference) {
  .wordmark::after { animation: color-wave 12s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark::after { display: none; }
}

:root[data-theme="dark"] { color-scheme: dark; --paper: #2b2d2f; --ink: #c2c1b9; }
.header-tools { display: flex; align-items: center; gap: 28px; }
.site-header .header-tools { gap: 18px; }
.site-header .clock-label { margin-bottom: 2px; font-size: 11px; }
.site-header .clock-reading { gap: 10px; }
.site-header #time { font-size: 15px; }
.site-header #zone { font-size: 11px; }
.theme-toggle { appearance: none; font: inherit; font-size: 13px; color: var(--ink); background: transparent; border: 1px solid #8886; border-radius: 24px; min-height: 44px; padding: 0 16px; cursor: pointer; white-space: nowrap; }
.theme-toggle:hover { border-color: currentColor; }
.theme-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.theme-toggle[hidden] { display: none; }
:root[data-theme="dark"] .wordmark img { filter: brightness(1.25); }
@media (max-width: 600px) {
 .header-tools { flex-direction: row; align-items: center; justify-content: flex-end; gap: 14px; max-width: 100%; }
 header .header-tools .clock { max-width: 100%; }
}

/* Accessible sun/moon switch with a sliding thumb. */
.theme-toggle { position: relative; display: inline-flex; align-items: center; justify-content: space-around; flex-shrink: 0; width: 88px; height: 44px; padding: 0 3px; isolation: isolate; }
.theme-toggle::before { content: ""; position: absolute; z-index: -1; left: 3px; top: 3px; width: 36px; height: 36px; border-radius: 50%; background: #dedbd2; }
.theme-toggle span { display: grid; place-items: center; width: 36px; font-size: 19px; line-height: 1; }
:root[data-theme="dark"] .theme-toggle::before { transform: translateX(44px); background: #454640; }
@media (prefers-reduced-motion: no-preference) { .theme-toggle::before { transition: transform 240ms ease, background-color 240ms ease; } }

.contact-footer { justify-content: center; min-height: 49px; }
.contact-trigger { border: 0; border-bottom: 1px solid #9996; padding: 12px 0; min-height: 44px; background: none; color: var(--ink); font: 13px/1.5 'Helvetica Neue', Helvetica, Arial, sans-serif; cursor: pointer; }
.contact-trigger span { display: inline-block; margin-left: 16px; }
.contact-trigger:hover { border-color: currentColor; }
.contact-trigger:focus-visible, #contact-dialog a:focus-visible, #contact-dialog button:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
#contact-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 76px 0 0; border: 0; background: transparent; color: var(--ink); overflow-y: auto; }
#contact-dialog::backdrop { background: #1d20254d; backdrop-filter: blur(5px); }
.contact-peek { position: absolute; top: 0; left: calc(50% - 64px); width: 128px; height: 100px; overflow: hidden; pointer-events: none; }
.contact-peek img { width: 128px; transform: rotate(-10deg); }
.contact-card { position: relative; padding: 48px 30px 30px; border: 1px solid #9995; border-radius: 24px; background: var(--paper); text-align: center; }
.contact-close { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 24px; cursor: pointer; }
.contact-close:hover { background: #9992; }
.contact-eyebrow { font-size: 9px; letter-spacing: .14em; margin: 0 0 20px; }
#contact-title { font-size: clamp(25px, 6vw, 32px); line-height: 1.2; font-weight: 400; letter-spacing: -.035em; margin: 0 0 16px; }
#contact-description { font-size: 14px; line-height: 1.8; margin: 0 0 25px; }
.contact-email { display: inline-flex; justify-content: center; align-items: center; gap: 32px; min-height: 48px; padding: 12px 24px; background: var(--ink); color: var(--paper); border-radius: 30px; text-decoration: none; font-size: 14px; }
.contact-email[hidden], .contact-note[hidden] { display: none; }
.contact-note { font-size: 11px; line-height: 1.6; margin: 18px 0 0; }
body.contact-is-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
 .companion.is-waving .companion-figure { animation: companion-wave 1.4s ease-in-out; }
 #contact-dialog[open] .contact-peek img { animation: contact-peek 500ms ease-out both; }
 .contact-trigger span { transition: transform 180ms ease; }
 .contact-trigger:hover span { transform: translate(3px,-3px); }
}
@keyframes contact-peek { from { transform: translateY(45px) rotate(0); } to { transform: translateY(0) rotate(-10deg); } }

/* An envelope opens the same contact card. */
.contact-trigger { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; font-size: 25px; line-height: 1; }
.contact-trigger span { margin-left: 0; }
.contact-trigger:hover { background: #9992; }
.contact-trigger:hover span { transform: none; }

.contact-trigger { position: relative; }
.contact-trigger .contact-tooltip { position: absolute; bottom: calc(100% + 8px); left: 50%; margin: 0; padding: 7px 11px; transform: translateX(-50%); border: 1px solid #9995; border-radius: 12px; background: var(--paper); color: var(--ink); font: 12px/1.4 'Helvetica Neue', Helvetica, Arial, sans-serif; white-space: nowrap; visibility: hidden; pointer-events: none; }
.contact-trigger:hover .contact-tooltip, .contact-trigger:focus-visible .contact-tooltip { visibility: visible; transform: translateX(-50%); }

/* Center the envelope at every screen size. */
.contact-footer { flex-direction: row; align-items: center; justify-content: center; }
.contact-courier { position: fixed; left: 0; top: 0; width: 96px; height: 96px; z-index: 2; pointer-events: none; }
.contact-courier[hidden], .contact-local-email[hidden] { display: none; }
.contact-courier img { display: block; width: 100%; height: 100%; }
.contact-courier span { position: absolute; left: 37px; top: 56px; font-size: 27px; line-height: 1; transform: rotate(-12deg); }
body.contact-is-open .companion, body.contact-is-open .companion-restore { visibility: hidden; }
#contact-dialog.is-delivering .contact-peek { visibility: hidden; }
#contact-dialog.is-delivering .contact-peek img { animation: none; }
.contact-local-email { display: block; width: fit-content; margin: 18px auto 0; color: var(--ink); font-size: 12px; line-height: 1.5; text-underline-offset: 4px; padding: 10px 4px; }

.journal-link { color: inherit; text-decoration: none; font-size: 14px; white-space: nowrap; padding: 8px 0 7px; border-bottom: 1px solid transparent; transition: color 180ms ease, border-color 180ms ease; }
.journal-link span { margin-left: 8px; }
.journal-link:hover { border-color: currentColor; }
.journal-link[aria-current="page"] { border-color: currentColor; }
.journal-link:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
@media(max-width:600px) { .header-tools { display: grid; grid-template-columns: auto auto; align-items: center; gap: 12px 18px; } .header-tools .clock { grid-column: 1 / -1; grid-row: 1; } }

.section-links { display:flex; align-items:center; gap:20px; }
.section-links a[aria-current="page"] { color:var(--ink); border-color:currentColor; }
@media(max-width:600px) { .header-tools .section-links { grid-column:1 / -1; justify-content:flex-end; gap:24px; } .header-tools .theme-toggle { grid-column:2; justify-self:end; } }
