* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: #111; font-family: "Times New Roman", Times, serif; font-size: 16px; line-height: 1.5; }
main { max-width: 720px; padding: 57px 28px 90px 54px; }
p { margin: 0 0 19px; }
.name { margin-bottom: 35px; }
a { color: #0000ee; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:visited { color: #0000ee; }
a:hover { color: #0000aa; }
.contact { margin-top: 29px; }
.contact p { margin-bottom: 0; }
.writing-link { margin-top: 34px; }
.back { margin-bottom: 37px; }
.category { font-weight: bold; margin: 30px 0 9px; }
.piece { margin: 0 0 7px; }
.publication { color: #111; }
@media (max-width: 600px) { main { padding: 34px 24px 65px; } .name { margin-bottom: 28px; } }

/* Classic blue links for work titles on the writing page only. */
.writing-page .piece a { color: #0000ee; }
.writing-page .piece a:visited { color: #0000ee; }
.writing-page .piece a:hover { color: #0000aa; }
.return-home { margin-top: 42px; }

/* Compact, archive-style writing list. Homepage spacing unchanged. */
.writing-page { line-height: 1.3; }
.writing-page .piece { margin: 0 0 2px; }
.writing-page .category { margin: 20px 0 5px; }
.writing-page section:first-of-type .category { margin-top: 0; }
.writing-page .return-home { margin-top: 27px; }

/* Quiet navigation links in black; article/contact links remain blue. */
.writing-link a, .writing-link a:visited,
.writing-page .return-home a, .writing-page .return-home a:visited { color: #111; }
.writing-link a:hover, .writing-page .return-home a:hover { color: #555; }

/* Slightly more compact homepage rhythm. */
body:not(.writing-page) { line-height: 1.4; }
body:not(.writing-page) p { margin-bottom: 13px; }
body:not(.writing-page) .name { margin-bottom: 23px; }
body:not(.writing-page) .contact { margin-top: 18px; }
body:not(.writing-page) .contact p { margin-bottom: 0; }
body:not(.writing-page) .writing-link { margin-top: 24px; }
@media (max-width: 600px) { body:not(.writing-page) .name { margin-bottom: 20px; } }

/* Minimal homepage links: underline only on hover or keyboard focus. */
body:not(.writing-page) .contact a,
body:not(.writing-page) .writing-link a { text-decoration: none; }
body:not(.writing-page) .contact a:hover,
body:not(.writing-page) .contact a:focus-visible,
body:not(.writing-page) .writing-link a:hover,
body:not(.writing-page) .writing-link a:focus-visible { text-decoration: underline; }

/* Keep Selected writing visibly underlined; other homepage contact links underline on hover. */
body:not(.writing-page) .writing-link a { text-decoration: underline; }

/* Small, unframed personal photo above the writing link. */
body:not(.writing-page) .portrait { margin: 22px 0 14px; }
body:not(.writing-page) .portrait img { display: block; width: 210px; max-width: 100%; height: auto; }
body:not(.writing-page) .writing-link { margin-top: 0; }

/* Natural-language writing link under portrait. */
body:not(.writing-page) .work-sentence { margin-top: 0; }
body:not(.writing-page) .work-sentence a { color: #0000ee; text-decoration: underline; }
body:not(.writing-page) .work-sentence a:visited { color: #0000ee; }

/* Contact links below the portrait, after the writing link. */
body:not(.writing-page) .contact { margin-top: 15px; }
body:not(.writing-page) .work-sentence { margin-top: 19px; margin-bottom: 12px; }
body:not(.writing-page) .portrait { margin: 0 0 14px; }
