/* Homepage refinements; article styles stay independent. */
@font-face { font-family: 'Matrix Code'; src: url('fonts/matrix%20code%20nfi.otf') format('opentype'); font-display: swap; }
.home { --paper: #faf9f6; --ink: #343532; --quiet: #70716b; --line: #deded7; background: var(--paper); color: var(--ink); font-family: system-ui, sans-serif; line-height: 1.75; padding-inline: 1.5rem 3.5rem; }
.home a { color: inherit; text-underline-offset: .25em; }
.home a:hover { text-decoration: underline; }
.home a:focus-visible, .home summary:focus-visible { outline: 2px solid var(--quiet); outline-offset: 5px; border-radius: 2px; }
.home h1, .home h2, .home h3 { line-height: 1.3; }
.home > header, .home main, .home > footer { width: min(100%, 46rem); margin-inline: auto; }
.home > header { padding: 3.5rem 0 2.5rem; background: none; border-bottom: 1px solid var(--line); }
.home h1 { font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 2.7rem); font-weight: normal; letter-spacing: -.045em; }
.portrait { position: relative; width: min(76%, 19rem); aspect-ratio: 1.18; margin: 2.25rem auto 2.5rem; }
.portrait-window { height: 100%; overflow: hidden; border-radius: 43% 57% 61% 39% / 57% 40% 60% 43%; background: #e7e5df; }
.portrait::after { content: ''; position: absolute; inset: -5px -10px 4px 5px; border: 1px solid #aaa99f; border-radius: 48% 52% 55% 45% / 52% 43% 57% 48%; transform: rotate(-7deg); pointer-events: none; }
.home #profile-picture { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; margin: 0; transform: translateY(var(--portrait-offset, 0px)) scale(1.18); }
.home #introduction { max-width: 37rem; margin: 0 auto 1.75rem; }
.home nav ul { flex-wrap: wrap; gap: .75rem 1.5rem; margin: 0; }
.home nav ul li { margin: 0; }
.home nav a { font-size: .9rem; text-decoration: underline; text-decoration-color: #b5b5ac; }
.home #projects { position: static; width: auto; margin-top: 1.75rem; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font-size: .78rem; color: var(--quiet); }
.home #projects ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1rem; }
.home #projects li { margin: 0; }
.home #projects a { color: inherit; }
.home main > section { margin: 3rem 0; scroll-margin-top: 2rem; }
.home main > section > h2 { font-size: 1.2rem; font-weight: 500; margin-bottom: 1.5rem; }
.home #blog-status:empty { display: none; }
.home #blog-list article { margin: 0; padding: 1.6rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.home #blog-list article:last-child { border-bottom: 0; }
.home .blog-entry time { display: block; color: var(--quiet); font-size: .75rem; margin-bottom: .45rem; }
.home .blog-entry h3 { font-family: Georgia, serif; font-size: 1.4rem; font-weight: normal; margin: 0 0 .6rem; }
.home #blog-list article a { font-weight: inherit; }
.home .blog-entry p { font: inherit; color: #595b55; margin: 0; }
.home #personal-info { border-top: 1px solid var(--line); padding-top: 2rem; }
.home #personal-info p { margin-bottom: .45rem; font-size: .9rem; overflow-wrap: anywhere; }
.home #personal-info a, .home #resume > a { text-decoration: underline; text-decoration-color: #b5b5ac; }
.resume-preview { margin-top: 1rem; }
.resume-preview summary { cursor: pointer; width: fit-content; font-size: .9rem; color: var(--quiet); }
.resume-preview summary span { display: inline-block; margin-left: .5rem; }
.resume-preview[open] summary span { transform: rotate(90deg); }
.resume-preview iframe { display: block; border: 1px solid var(--line); margin-top: 1rem; max-height: 75vh; }
.home > footer { background: none; border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--quiet); font-size: .75rem; }
.home footer p { margin: 0; }
.skip-link { position: absolute; top: -5rem; padding: .5rem; background: var(--paper); z-index: 2; }
.skip-link:focus { top: .5rem; }

/* Keep the rain in a narrow gutter, clear of the reading column. */
#matrix-container { position: fixed; inset: 0 0 0 auto; width: clamp(2.5rem, 7vw, 5rem); height: 100%; pointer-events: none; user-select: none; mask-image: linear-gradient(transparent, #000 8%, #000 92%, transparent); }
.portrait-window { box-shadow: 5px 12px 22px -8px rgba(53, 49, 41, .22); }
.home #projects { margin: 3rem 0; font-size: .9rem; }
.home #projects h2 { font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.home #projects ul { justify-content: flex-start; gap: .5rem 1.5rem; }
.home #projects a { text-decoration: underline; text-decoration-color: #b5b5ac; }
#motion-toggle { border: 0; background: none; color: var(--quiet); font: inherit; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; margin-bottom: 1rem; padding: .4rem; }
#motion-toggle:focus-visible { outline: 2px solid var(--quiet); outline-offset: 3px; }
@media (max-width: 600px) {
  .home { padding-inline: 1.25rem 3rem; }
  .home > header { padding-top: 2.5rem; }
  .home #introduction { text-align: left; }
  .home .blog-entry h3 { font-size: 1.25rem; }
}
