:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #30312e;
    background: #faf9f6;
    font-size: 16px;
    line-height: 1.7;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable both-edges; }
body { max-width: 1000px; margin: 0 auto; padding: 56px 28px 32px; }
html.home-loading body { visibility: hidden; }
a { color: #295e89; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #153b59; }
a:focus-visible, button:focus-visible { outline: 2px solid #295e89; outline-offset: 5px; }
p { margin: 0 0 18px; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; color: #252622; font-weight: 400; line-height: 1.25; }
h1 { font-size: 34px; margin: 0 0 24px; }
h2 { font-size: 23px; margin: 0 0 14px; }
h2 a { text-decoration: none; }
h2 a:hover { text-decoration: underline; }
.site-header { display: flex; justify-content: center; margin-bottom: 64px; }
nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; font-size: 14px; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
nav a[aria-current="page"], nav a[aria-current="location"] { color: #30312e; text-decoration: underline; }
.home-section { margin-top: 38px; }
.home-photo { margin: 32px 0 0; }
.home-photo img { display: block; width: auto; height: 400px; max-width: 100%; margin: 0 auto; object-fit: contain; }
.site-footer { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 64px; padding-top: 20px; border-top: 1px solid #deded6; font-size: 13px; }
.site-footer a { color: #666760; }
.project { margin-top: 32px; }
.essay-list { list-style: none; margin: 0; padding: 0; }
.essay-intro > :last-child { margin-bottom: 32px; }
.essay-list li + li { margin-top: 16px; }
.essay-content { overflow-wrap: break-word; }
.essay-content h2, .essay-content h3 { margin-top: 32px; }
.essay-content img { max-width: 100%; height: auto; }
.essay-content pre { overflow-x: auto; padding: 16px; background: #efeee9; }
.essay-content blockquote { margin: 24px 0; padding-left: 20px; border-left: 2px solid #deded6; }
.app-screenshots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; align-items: start; }
.app-screenshots img { display: block; width: 100%; height: auto; border: 1px solid #deded6; border-radius: 8px; }
.skip-link { position: absolute; top: 8px; left: 16px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.gallery-description { margin-bottom: 32px; }
.gallery-description > :last-child { margin-bottom: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 8px; gap: 12px; }
.photo-tile { display: block; align-self: start; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.photo-tile img { display: block; width: 100%; height: auto; }
.photo-lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(20, 21, 19, .96); }
.photo-lightbox.is-open { display: flex; }
.lightbox-figure { margin: 0; }
.lightbox-img { display: block; max-width: 88vw; max-height: 84dvh; width: auto; height: auto; object-fit: contain; }
.lightbox-close, .lightbox-nav { position: fixed; border: 0; border-radius: 4px; color: white; background: #30312e; cursor: pointer; font: 32px/1 sans-serif; width: 44px; height: 44px; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-nav.is-disabled { opacity: .3; pointer-events: none; }
body.lightbox-open { overflow: hidden; }
@media (max-width: 600px) {
    body { padding: 28px 22px; }
    .site-header { margin-bottom: 44px; }
    h1 { font-size: 30px; }
    .site-footer { margin-top: 48px; }
    .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .app-screenshots { gap: 10px; }
    .lightbox-img { max-width: 96vw; max-height: 80dvh; }
    .lightbox-nav { top: auto; bottom: 16px; transform: none; }
}
