/* ---------------------------
   Reset / Base
--------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --serif: Georgia, serif;
    --poem-serif: "EB Garamond", serif;
    --sans: "Alegreya Sans", sans-serif;
    --accent: #4f5a48; /* darker, still muted */
}

.sr-only {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: 0;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

::selection {
    background: #e6e8e1;
}

html {
    font-size: 18px;
}

body {
    margin: 0;
    font-family: var(--serif);
    line-height: 1.65;
    color: #111;
    background: #f5f5f3; /* warm neutral */
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------
   Page Frame
--------------------------- */

main.content {
    max-width: 900px;
    margin: 2rem auto 1rem;
    background: #ffffff;
    padding: 3.5rem 3rem 2rem;
    box-shadow:
            0 1px 2px rgba(0,0,0,0.04),
            0 8px 24px rgba(0,0,0,0.06);
}

/* ---------------------------
   Header
--------------------------- */

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center; /* ensures everything inside centers */
}

.site-header {
    margin-top: 2.5rem;
    margin-bottom: 1.75rem;
}

/* Title: literary, not UI */
.site-title {
    font-family: var(--sans);
    font-size: 2.4rem;
    font-weight: 400;
    letter-spacing: 0.005em;
    color: #222;
    margin: 0;
}

.site-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Tagline: explicitly centered + constrained */
.site-tagline {
    /*font-family: var(--serif);*/
    font-weight: 400;
    font-size: 1.1rem;
    color: #666;
    margin: 0.5rem auto 0;
    font-style: normal;
    text-align: center;
    max-width: 28rem; /* prevents it from stretching awkwardly */
}
.site-tagline.second {
    /*font-weight: 400;*/
    font-style: italic;
}
.site-header::after {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    background: #ddd;
    margin: 1.25rem auto 0;
}

.site-nav {
    margin-top: 1.75rem;
}

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    justify-content: center;
    gap: 1.75rem;
}

/* keep nav clearly "UI", not literary text */
.site-nav a {
    font-family: var(--sans);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.site-nav a.active {
    color: #222;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    font-weight: 500;
}

/* ---------------------------
   Intro Section
--------------------------- */

.page-intro {
    max-width: 640px;
    margin: 0 auto 4rem;
}

.page-intro p {
    margin: 0 0 1.4rem;
}

.page-intro blockquote {
    margin: 2rem 0;
    padding-left: 1.5rem;
    font-size: .9325rem;
    color: #222;
}

.section-break {
    height: 5rem;
    position: relative;
}

.section-break::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 80px;              /* shorter = more intentional */
    height: 1px;
    background: #e3e3e3;
    transform: translate(-50%, -50%);
}

/* move kicker out of the main text flow */
.poem-kicker {
    position: absolute;
    left: -7rem;
    top: 0.35rem;

    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #999;

    width: 6rem;
    text-align: right;
}

.poem-kicker::before {
    content: "";
    display: block;
    width: 24px;
    height: 1px;
    background: #ddd;
    margin-bottom: 0.75rem;
}

/* ---------------------------
   Poem Block
--------------------------- */

.section-divider {
    border: none;
    margin: 3rem auto 2.5rem;
    width: 60%;
    border-top: 1px solid rgba(0,0,0,0.15);
}

.poem {
    max-width: 640px;
    margin: 0 auto 4rem;
    padding-top: 1rem;
    position: relative;
}

/* controls the whole poem block alignment */
.poem-inner {
    position: relative;
    max-width: 36rem;
    margin-left: 1rem;
}

/* Title feels like an object label */
.poem h2, .poem-title {
    font-family: var(--poem-serif);
    font-size: 1.75rem;
    font-weight: 500;
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/*special title formatting rules*/
.poem-title .title-right {
    margin-left: 25%;
    /*line-height: 1;*/
}

.poem-title .title-block{
    display: block;
}

.poem-title .title-larger {
    font-size: 2rem;
}

.poem-title .title-stretched {
    letter-spacing: 0.25em;
}

.poem-author {
    font-family: var(--poem-serif);
    line-height: 1.7;
    font-size: 1rem;
    color: #444;
    margin: 1.5rem 0 1.75rem;
}

.poem-author::before {
    content: "— ";
    color: #888;
}

.poem-body {
    margin: 0;          /* important */
    white-space: pre-wrap;
    line-height: 1.7;
    font-family: var(--poem-serif);
    font-size: 1.1rem;
}

main .poem-body pre {
    font-family: var(--poem-serif);
    margin: 0.5rem 0 0;
    padding: 0;
    line-height: 1.7;
}

main .endymion .poem-body pre{
    font-family: Palatino, var(--poem-serif);
}

/*poem body special formatting rules*/
.poem-body .poem-block {
    display: block;
}

.poem-body .poem-right {
    text-align: right;
}

.poem-body .poem-small {
    font-size: 0.85em;
}

.poem-body .poem-larger {
    font-size: 1.15rem;
}

.poem-body .poem-stretched {
    letter-spacing: 0.2em;
}
poem-body .poem-indent5,
.poem-body .poem-indent7
.poem-body .poem-indent10,
.poem-body .poem-indent12,
.poem-body .poem-indent15,
.poem-body .poem-indent20,
.poem-body .poem-indent25,
.poem-body .poem-indent30,
.poem-body .poem-indent35,
.poem-body .poem-indent40,
.poem-body .poem-indent42,
.poem-body .poem-indent45,
.poem-body .poem-indent50,
.poem-body .poem-indent55,
.poem-body .poem-indent60 {
    display: inline-block;
}

.poem-body .poem-indent5 {
    margin-left: 5%;
}

.poem-body .poem-indent7 {
    margin-left: 7%;
}

.poem-body .poem-indent10 {
    margin-left: 10%;
}

.poem-body .poem-indent12 {
    margin-left: 12%;
}

.poem-body .poem-indent15 {
    margin-left: 15%;
}

.poem-body .poem-indent20 {
    margin-left: 20%;
}

.poem-body .poem-indent25 {
    margin-left: 25%;
}

.poem-body .poem-indent30 {
    margin-left: 30%;
}

.poem-body .poem-indent35 {
    margin-left: 35%;
}

.poem-body .poem-indent40 {
    margin-left: 40%;
}

.poem-body .poem-indent42 {
    margin-left: 42%;
}

.poem-body .poem-indent45 {
    margin-left: 45%;
}

.poem-body .poem-indent50 {
    margin-left: 50%;
}

.poem-body .poem-indent55 {
    margin-left: 55%;
}

.poem-body .poem-indent60 {
    margin-left: 60%;
}

.poem-body .poem-separator {
    margin: 1.5em 0 0 5%;
}

.poem-body .poem-separator span {
    font-size: 2.5rem;
}

/* Poem Index */

/* container aligned with poem pages */
.index-inner {
    max-width: 44rem;
    margin: 0 auto;
}

/* page title */
.index-title {
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* author sections */
.author-group {
    margin: 1.25rem 0;
}

.author-name {
    color: #222;
    margin: 0 0 0.2rem;
    font-size: 1.15rem;
    font-weight: 500;
}

/* poem list */
.poem-list {
    padding: 0;
    list-style: none;
    margin-top: 0;
    margin-left: 1.25rem;
}

.poem-list li {
    margin: 0.25rem 0;
}

/* links should feel like text, not UI */
.poem-list a {
    /*font-family: var(--serif);*/
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid transparent;
}

.poem-list a:hover, .poem-list a:focus {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.poem-list a:focus {
    outline: 1px dotted #999;
}

.poem-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.poem-nav a {
    text-decoration: none;
}

.back-link {
    margin-top: 5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.15);
}

.back-link a {
    text-decoration: none;
    opacity: 0.7;
}

.back-link a:hover {
    opacity: 1;
}

/* ---------------------------
   Footer
--------------------------- */

footer {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 0;
    padding: .5rem 1rem 1rem;
    color: #666;
}

footer p {
    margin: 0.25rem auto;
}

footer a {
    text-decoration: none;
}

footer .pw:after {
    content: "\2022";
    margin: 0 5px;
}

footer a:hover {
    text-decoration: underline;
}

/* ---------------------------
   Subtle Enhancements
--------------------------- */

/* Better paragraph measure */
p {
    max-width: 65ch;
}

/* Slightly tighter poems on small screens */
@media (max-width: 640px) {
    main.content {
        margin: 1.5rem .5rem;
        padding: 2rem 1.5rem 2.5rem;
    }

    .page-intro {
        margin-bottom: 3rem;
    }
}

/*.jester-mark {*/
/*    !*width: 180px;*!*/
/*    !*height: auto;*!*/


/*    width: 10vw;*/
/*    max-width: 160px;*/
/*    min-width: 100px;*/
/*    height: auto;*/
/*}*/

.poem-imprint-mark {
    margin: 5rem auto 1rem;
    text-align: center;
}

.poem-imprint-mark img {
    display: inline-block;
    height: auto;
}

.poem-imprint-mark--elizabeth img {
    width: clamp(100px, 9vw, 120px);
}

.poem-imprint-mark--jlw img {
    width: clamp(85px, 9vw, 100px);
}

.poem-artwork {
    margin: 1rem auto;
    /*text-align: center;*/
}

.poem-artwork img {
    display: block;
    max-width: min(100%, 420px);
    height: auto;
    margin: 0 0 0 -3px;
}
