:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #262626;
  --muted: #61615d;
  --line: #28282022;
  --case-red: #b43a30;
  --case-green: #2f624b;
  --case-blue: #2456a6;
  --case-violet: #73558d;
  --case-amber: #986217;
  --sans: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --display: var(--sans);
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 28px; }
body {
  margin: 0;
  min-width: 280px;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}
/* The drawing stays decorative; the central wash keeps copy readable. */
body::before, body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background: url('assets/desert-drawing.png') center center / cover no-repeat;
  opacity: .38;
}
body::after {
  background: linear-gradient(90deg, transparent, #faf9f6d9 28%, #faf9f6e6 50%, #faf9f6d9 72%, transparent);
}
a { color: var(--case-blue); text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
.summary a, .bookshelf-invitation a, .section-link, .social-link, .back-top { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--case-blue); outline-offset: 5px; border-radius: 2px; }
::selection { color: #111; background: #ddd9ce; }
p, h1, h2, h3 { margin: 0; }
.page { width: min(1180px, calc(100% - 96px)); margin: auto; }
.portfolio-page .page { width: min(620px, calc(100% - 48px)); }
.skip-link { position: absolute; left: 20px; top: -100px; z-index: 10; padding: 12px; background: var(--paper); }
.skip-link:focus { top: 10px; }
.masthead { padding: 76px 0 36px; text-align: center; }
h1 { font: 700 2rem/1.2 var(--display); letter-spacing: -.025em; overflow-wrap: break-word; }
.identity { color: #111; text-decoration: none; }
.masthead nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 22px; margin-top: 5px; font-size: 1.125rem; }
.masthead nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.masthead nav a:hover, .masthead nav a:focus-visible { color: var(--case-blue); text-decoration: underline; }
.summary { padding-bottom: 32px; font-size: 1rem; line-height: 1.6; }
.bookshelf-invitation { margin-top: 28px; }
.bookshelf-invitation a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 20px; }
.section-heading h2 { color: #111; font: 700 1.125rem/1.4 var(--display); letter-spacing: -.01em; }
.section-link { font-size: .8125rem; }
.project-grid, .essay-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.project, .essay { min-width: 0; padding: 0; font-family: var(--sans); }
.work-copy { display: flex; flex-direction: column; min-width: 0; }
.work-meta { order: 3; display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; margin-top: 4px; font-size: .75rem; color: var(--muted); }
.status::before { content: '·'; margin-right: 7px; }
h3 { color: var(--ink); font: 400 1.1rem/1.4 var(--display); letter-spacing: 0; overflow-wrap: break-word; }
h3 a { color: inherit; text-decoration: underline; text-decoration-color: #26262680; }
h3 a:hover, h3 a:focus-visible { color: var(--case-blue); }
.work-copy > p { color: var(--ink); font-size: 1rem; line-height: 1.6; margin-top: 5px; }
.writing { margin-top: 36px; }
footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px 24px; padding: 22px 0 36px; margin-top: 22px; border-top: 1px solid var(--line); }
.social-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.social-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; }
.back-top { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; color: var(--muted); }
@media (max-width: 1050px) {
  .page { width: calc(100% - 56px); }
}
@media (max-width: 760px) {
  .page { width: calc(100% - 40px); }
  .masthead { padding: 44px 0 28px; }
  .masthead h1 { font-size: 1.75rem; }
  body::before { background-position: 44% center; opacity: .22; }
  body::after { background: #faf9f680; }
  .summary { padding-bottom: 28px; }
  :is(.section-link, .back-top) > span[aria-hidden='true'] { display: none; }
  footer { gap: 6px 20px; padding-bottom: 24px; }
}
@media (max-width: 360px) {
  .portfolio-page .page { width: calc(100% - 36px); }
  .masthead nav { gap: 4px 18px; }
  .social-nav { gap: 4px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
