@font-face {
  font-family: "Newsreader";
  src: url("./assets/fonts/newsreader.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f4f4f4;
  --ink: #303b46;
  --body: #626d77;
  --muted: #66717a;
  --line: #dce2df;
  /* Shared with the teal tiles and lime blend in flame-art.js. */
  --green: #12666d; /* Darker teal for readable text on the hover wash. */
  --flame-lime: #85e04a;
  --flame-teal: #25b9a4;
  --wash: #e7f3ee;
  --accent-gradient: linear-gradient(110deg, var(--flame-lime), var(--flame-teal));
  --accent-text: linear-gradient(110deg, #426e20, var(--green));
  --accent-wash: linear-gradient(110deg, color-mix(in srgb, var(--flame-lime) 24%, var(--paper)), color-mix(in srgb, var(--flame-teal) 20%, var(--paper)));
  --shadow: rgba(47, 57, 40, .12);
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { min-width: 280px; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased;  }
body.dialog-open, body.intro-running { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
::selection { color: #15392f; background: var(--flame-lime); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: .45; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; border-radius: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 12px 20px; z-index: 20; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 12px; }
.skip-link:hover { color: var(--paper); background: var(--accent-text); }
.page-shell { --page-gutter: clamp(28px, 7.4vw, 140px); position: relative; isolation: isolate; overflow: clip; min-height: 100svh; display: flex; flex-direction: column; }
[data-intro="pending"] .page-shell, .page-shell.is-concealed { opacity: 0; visibility: hidden; pointer-events: none; }
.page-shell.is-revealing { animation: page-reveal 900ms cubic-bezier(.22,.61,.36,1) both; }
.intro-stage { position: fixed; inset: 0; z-index: 10; overflow: hidden; background: var(--paper); opacity: 1; }
#intro-pattern { display: block; width: 100%; height: 100%; transition: transform 900ms cubic-bezier(.4,0,.2,1); }
.intro-stage.is-leaving { opacity: 0; pointer-events: none; transition: opacity 900ms cubic-bezier(.4,0,.2,1); }
@keyframes page-reveal { from { opacity: 0; } to { opacity: 1; } }
.site-header { position: relative; z-index: 2; width: calc(100% - 2 * var(--page-gutter)); margin: 0 auto; padding-top: clamp(36px, 6.2vh, 64px); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0 -40px -36px; background: linear-gradient(to bottom, var(--paper) 30%, rgba(244,244,244,.94) 62%, rgba(244,244,244,0)); }
.wordmark { font-size: 20px; line-height: 1.45; letter-spacing: -.3px; white-space: nowrap; }
nav { display: flex; align-items: center; gap: 26px; font-size: 14px; color: var(--body); }
nav a { position: relative; padding: 12px 0; }
main { position: relative; z-index: 1; pointer-events: none; width: 100%; flex: 1; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.35fr); align-items: center; gap: 24px; padding: 24px var(--page-gutter); outline: none; }
.introduction { position: relative; isolation: isolate; pointer-events: auto; width: min(100%, 370px); margin: 0; padding: 16px 0 34px; }
.introduction::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -110px -120px; background: radial-gradient(ellipse, rgba(244,244,244,.98) 25%, rgba(244,244,244,.92) 48%, rgba(244,244,244,0) 74%); }
.intro-heading-row { display: flex; align-items: center; gap: 12px; }
h1 { font-size: 20px; line-height: 1.45; letter-spacing: -.3px; font-weight: 400; margin: 0; }
.intro-copy { max-width: 370px; font-size: 16px; line-height: 1.8; letter-spacing: 0; color: var(--body); margin: 18px 0 0; }
.typing-character { opacity: 0; }
.typing-character.is-visible { opacity: 1; }
.typing-character.is-caret { position: relative; }
.typing-character.is-caret::after { content: ""; position: absolute; width: 1px; height: .88em; top: .18em; right: -2px; background: var(--green); }
.personal-note { max-width: 350px; font-size: 16px; line-height: 1.8; margin: 16px 0 0; color: var(--muted); }
.home-location { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--body); font-size: 13px; line-height: 1.5; }
.bridge-emoji { flex: none; width: 24px; font-size: 20px; line-height: 24px; text-align: center; }
.home-location { opacity: 0; transition: opacity 360ms ease-out; }
.introduction.is-typed .home-location { opacity: 1; }
.social-links { display: flex; align-items: center; gap: 21px; font-size: 14px; line-height: 1.5; color: var(--body); margin-top: 24px; }
.social-links a { position: relative; padding: 4px 0; }
.social-links a:first-child { color: var(--ink); }
.social-separator { opacity: .35; font-size: 14px; margin: 0 -7px; }
.pattern-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
#pattern { display: block; width: 100%; height: 100%; touch-action: auto; }
.site-footer { position: relative; z-index: 2; width: calc(100% - 2 * var(--page-gutter)); min-height: 72px; margin: 0 auto; padding: 0 0 28px; display: flex; justify-content: flex-end; align-items: center; color: var(--muted); }
dialog { overflow: clip; color: var(--ink); background: var(--paper); border: 1px solid var(--line); width: min(720px, calc(100% - 40px)); max-height: min(820px, calc(100svh - 64px)); padding: 0; border-radius: 6px; box-shadow: 0 16px 100px var(--shadow); }
dialog[open] { display: flex; flex-direction: column; animation: dialog-enter 230ms cubic-bezier(.2,.7,.3,1); }
dialog::backdrop { background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(6px); }
.dialog-topline { flex: none; padding: 23px 38px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-brand { font-size: 21px; letter-spacing: -.4px; }
.dialog-close { width: 36px; height: 36px; border-radius: 50%; color: var(--body); font: 27px Georgia, serif; line-height: 1; }
.dialog-close:is(:hover, :focus-visible) { background: var(--accent-wash); }
.dialog-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 35px 44px 16px; }
.dialog-heading-row { position: relative; }
.dialog-heading-row h2 { padding-right: 120px; }
.section-ascii { position: absolute; right: 0; top: -10px; width: 112px; height: 78px; pointer-events: none; }
dialog[data-section="books"] .section-ascii { top: -14px; width: 128px; height: 88px; }
.dialog-heading-row h2 { margin: 12px 0 10px; font-weight: 400; font-size: 39px; line-height: 1.1; letter-spacing: -.8px; outline: none; }
.dialog-heading-row > p { font-size: 19px; line-height: 1.5; color: var(--body); margin: 0 0 32px; max-width: 500px; }
.content-item { padding: 22px 0; border-top: 1px solid var(--line); }
.book-item { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 22px; }
.book-cover { display: block; width: 60px; height: 90px; object-fit: contain; object-position: top center; }
.book-copy { min-width: 0; }
.item-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.content-item :is(h3, h4) { font-size: 24px; font-weight: 400; margin: 0; letter-spacing: -.3px; }
.item-status { font-family: ui-monospace, "SFMono-Regular", monospace; font-size: 9px; line-height: 1.4; text-transform: uppercase; letter-spacing: .75px; white-space: nowrap; color: var(--muted); }
.content-item p { color: var(--body); font-size: 18px; line-height: 1.5; margin: 8px 0; }
.item-heading.has-role { display: block; }
.content-item .item-author { color: var(--muted); font-size: 16px; margin: 4px 0 9px; }
.content-item .item-link { display: inline-block; color: var(--green); font-size: 16px; margin-top: 10px; }
.content-item details { margin-top: 13px; }
.content-item summary { display: block; list-style: none; cursor: pointer; color: var(--muted); font-size: 16px; width: fit-content; }
.content-item summary { min-height: 32px; padding-block: 5px; }
.ask-picker button[aria-disabled="true"] { cursor: wait; opacity: .65; }
.writing-preview { display: block; border-radius: 3px; }
.content-item summary::-webkit-details-marker { display: none; }
.content-item summary::marker { content: ""; }
.content-item details p { font-size: 17px; margin-top: 13px; }
.work-item { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 28px; }
.work-copy { min-width: 0; grid-column: 1; grid-row: 1; }
.work-media { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; grid-column: 2; grid-row: 1; }
.work-preview { display: block; width: 120px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #fff; }
.work-preview img { display: block; width: 100%; height: 84px; object-fit: contain; }
.work-preview--website img { object-fit: cover; object-position: top; }
.work-preview:is(:hover, :focus-visible), .personal-project-preview:is(:hover, :focus-visible) { border-color: transparent; background: var(--accent-gradient); box-shadow: 0 0 0 2px var(--green); }
.work-media .item-status { white-space: normal; text-align: right; }
.work-feature { margin-top: 17px; }
.work-feature-link { color: var(--green); font-size: 16px; }
.work-feature-source { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.tools-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.tools-grid > li { min-width: 0; border-top: 1px solid var(--line); }
.tool-link { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 16px; min-height: 78px; height: 100%; padding: 14px 8px; border-radius: 5px; }
.tool-icon { display: block; width: 40px; height: 40px; object-fit: contain; border-radius: 5px; }
.tool-copy { min-width: 0; }
.tool-copy h3 { margin: 0; font-size: 20px; font-weight: 400; line-height: 1.3; text-wrap: balance; }
.tool-link:is(:hover, :focus-visible) { background: var(--accent-wash); }
/* Keep text gradients dark enough to read on the paper background. */
:is(.wordmark, .dialog-brand, .site-header nav a, .social-links a, .content-item .item-link,
  .work-feature-link, .content-item summary, .back-to-home, .mobile-section-nav a, .library-link,
  .postcard-turn, .postcard-source, .ask-open-link):is(:hover, :focus-visible),
.tool-link:is(:hover, :focus-visible) h3 {
  background-image: var(--accent-text);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
@media (max-width: 540px) {
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-link { min-height: 82px; padding-block: 16px; }
  .work-item { display: flow-root; }
  .work-copy { display: contents; }
  .work-media { float: right; width: 82px; margin: 0 0 12px 18px; }
  .work-item .item-heading { display: block; }
  .work-preview { width: 82px; }
  .work-preview img { height: 61px; }
  .work-media .item-status { font-size: 8px; letter-spacing: .4px; }
}
.personal-project-preview { display: block; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.personal-project-preview img { display: block; width: 100%; height: auto; }
.memory-photo { width: 100%; max-height: 280px; object-fit: cover; object-position: center; display: block; border-radius: 3px; margin-top: 17px; }
.dialog-bottomline { flex: none; padding: 18px 38px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; align-items: center; gap: 20px; color: var(--muted); font-size: 14px; }
dialog[data-section="books"] .dialog-topline, dialog[data-section="outside"] .dialog-topline { padding: 14px 32px; }
dialog[data-section="books"] .dialog-scroll, dialog[data-section="outside"] .dialog-scroll { padding: 24px 32px 12px; }
dialog[data-section="books"] .dialog-heading-row h2, dialog[data-section="outside"] .dialog-heading-row h2 { font-size: 32px; margin: 0 0 8px; }
dialog[data-section="books"] .dialog-heading-row > p, dialog[data-section="outside"] .dialog-heading-row > p { font-size: 17px; margin-bottom: 18px; }
dialog[data-section="books"] .dialog-bottomline, dialog[data-section="outside"] .dialog-bottomline { padding: 10px 32px; }
.back-to-home { font-size: 15px; padding: 6px 0; color: var(--ink); }
.noscript-message { padding: 24px; text-align: center; }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-height: 740px) and (min-width: 701px) {
  .site-header { padding-top: 28px; }
  main { padding-top: 16px; padding-bottom: 16px; }
  .site-footer { min-height: 52px; padding-bottom: 16px; }
}
@media (max-width: 700px) {
  .page-shell { --page-gutter: 28px; }
  .site-header { padding-top: 30px; flex-wrap: wrap; row-gap: 17px; }
  nav { gap: 22px; font-size: 14px; }
  main { grid-template-columns: 1fr; align-content: start; gap: 8px; padding-top: 52px; padding-bottom: 0; }
  .introduction { padding: 0; width: min(100%, 390px); }
  h1 { font-size: 20px; }
  .intro-copy { margin-top: 18px; }
  .personal-note { margin-top: 18px; }
  .desktop-break { display: none; }
  .social-links { gap: 22px; margin-top: 22px; }
  .introduction::before { inset: -90px -45px; }
  html[data-art="flame"] .introduction::before { bottom: -24px; }
  .site-footer { min-height: 74px; padding: 8px 0 22px; gap: 10px; }


  dialog { width: calc(100% - 24px); max-height: calc(100svh - 28px); }
  .dialog-topline { padding: 14px 22px; }
  .dialog-scroll { padding: 29px 26px 16px; }
  .dialog-heading-row h2 { padding-right: 86px; }
  .section-ascii { top: -6px; width: 78px; height: 54px; }
  dialog[data-section="books"] .section-ascii { top: -12px; width: 88px; height: 60px; }
  dialog[data-section="books"] .dialog-scroll, dialog[data-section="outside"] .dialog-scroll { padding: 24px 22px 12px; }
  .dialog-bottomline { padding: 13px 22px; }
  .dialog-bottomline { justify-content: flex-end; }
  .item-heading { flex-direction: column; gap: 5px; }
}
@media (max-width: 420px) {
  .site-header { align-items: flex-start; }
  nav { width: 100%; gap: 25px; }
  nav a { padding: 3px 0; }
  main { padding-top: 42px; }
  .book-item { grid-template-columns: 52px minmax(0, 1fr); gap: 16px; }
  .book-cover { width: 52px; height: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  dialog[open] { animation: none; }
  .intro-stage.is-leaving, #intro-pattern, .home-location { transition: none; }
  .page-shell.is-revealing { animation: none; }
}

@media (max-width: 700px) {
  .page-shell { --page-gutter: max(24px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .site-header { padding-top: max(22px, env(safe-area-inset-top)); row-gap: 8px; }
  .site-header nav { flex-wrap: wrap; gap: 10px 14px; }
  .site-header nav a, .social-links a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding: 10px 0; }
  .social-links { gap: 18px; }
  html:is([data-art="flame"], [data-art="globe"]) main { flex: none; padding-top: 30px; padding-bottom: 12px; }
  html:is([data-art="flame"], [data-art="globe"]) .pattern-art { position: relative; inset: auto; flex: none; height: clamp(260px, 86vw, 360px); margin: 12px 0; }
  .site-footer { margin-top: auto; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .dialog-close { width: 44px; height: 44px; }
  .back-to-home { min-width: 44px; min-height: 44px; }
  .dialog-topline, dialog[data-section] .dialog-topline { padding: 8px 20px; }
  .dialog-bottomline, dialog[data-section] .dialog-bottomline { padding: 6px 20px; }
  .dialog-scroll { padding: 24px 22px 12px; }
  .content-item summary { min-height: 44px; padding-block: 12px; }
  .content-item .item-link, .work-feature-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0; }
  .work-feature { margin-top: 7px; }
  .work-feature-source { margin-top: 0; }
  .work-item details { margin-top: 4px; }
}
@media (max-width: 360px) {
  .work-media { width: 72px; margin-left: 12px; }
  .work-preview { width: 72px; }
  .work-preview img { height: 54px; }
}
@media (pointer: coarse) {
  .site-header nav a, .social-links a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
  .dialog-close { width: 44px; height: 44px; }
  .back-to-home { min-width: 44px; min-height: 44px; }
  .content-item summary { min-height: 44px; padding-block: 12px; }
  .content-item .item-link, .work-feature-link { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (pointer: coarse) and (max-height: 500px) {
  dialog { max-height: calc(100svh - 16px); }
  .dialog-topline, dialog[data-section] .dialog-topline,
  .dialog-bottomline, dialog[data-section] .dialog-bottomline { padding: 4px 20px; }
  .dialog-scroll, dialog[data-section] .dialog-scroll { padding-top: 18px; }
}
