/* Minimalist black/white literary theme */
:root {
    --bg: #ffffff;
    --fg: #0a0a0a;
    --muted: #6b6b6b;
    --line: #111111;
}

* { box-sizing: border-box; }
html { font-size: 22px; }
@media (max-width: 760px) { html { font-size: 20px; } }
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: "EB Garamond", ui-serif, Georgia, serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrap {
    max-width: 68rem; /* wider for full, screen-filling feel */
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
}

.site-header {
    position: sticky;
    top: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    z-index: 10;
}
.site-header .wrap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.brand {
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    color: var(--fg);
}
.site-nav a {
    color: var(--fg);
    text-decoration: none;
    margin-left: 1rem;
    border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--fg); }

h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0 0 0.75rem; }
.about .lede { font-size: 1.15rem; }
.inline-links { color: var(--muted); }
.inline-links a { color: inherit; }
.inline-links a:hover { color: var(--fg); }

/* Homepage About layout and type scale */
.about { min-height: 85vh; }
.about p { font-size: 1.25rem; }
.about .lede { font-size: 1.6rem; }
.about .inline-links { margin-top: 1rem; }
.about-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr; /* widen text column, keep image width and gap */
    gap: 5rem; /* increased spacing between text and image */
    align-items: start;
}
.about-portrait { align-self: start; }
.about-portrait img {
    width: 85%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    filter: grayscale(100%);
}
.about-portrait { text-align: right; }
.about-portrait .epigraph { display: inline-block; width: 85%; text-align: left; }
.about-portrait .epigraph blockquote { font-size: 1rem; }
.epigraph { margin-top: 0.75rem; }
.epigraph blockquote { margin: 0; font-size: 0.95rem; color: var(--muted); }
.epigraph figcaption { margin-top: 0.25rem; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .about p { font-size: 1.15rem; }
    .about .lede { font-size: 1.35rem; }
}

/* Content link styling (make hyperlinks grey, not blue) */
main a { color: var(--muted); text-decoration: none; border-bottom: 1px solid currentColor; }
main a:hover { color: var(--fg); }
main a:visited { color: var(--muted); }

.selected { padding-top: 1rem; border-top: 1px solid var(--line); margin-top: 2rem; }
.selected h2 { font-size: 1.2rem; text-transform: lowercase; letter-spacing: 0.03em; }
.pub-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.pub-list li { padding: 0.6rem 0; border-bottom: 1px solid #eaeaea; }
.pub-title { display: block; }
.pub-meta { color: var(--muted); font-size: 0.9rem; }
.more { margin-top: 1rem; }
.more a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--fg); }
.more a:hover { opacity: 0.7; }

.site-footer { border-top: 1px solid var(--line); padding-top: 1rem; }
.site-footer p { margin: 0; color: var(--muted); }
.site-footer a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.site-footer a:hover { color: var(--fg); }

.visually-hidden {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important; width: 1px !important;
    overflow: hidden;
    white-space: nowrap;
}

/* Shared page elements */
.page h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page .subtle { color: var(--muted); margin-top: 0; }
.section { margin-top: 2rem; }
.section h2 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 0.65rem 0; border-bottom: 1px solid #efefef; }

/* Bibliography layout */
.bib { margin-top: 1rem; }
.bib-item { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid #efefef; }
.bib-year { color: var(--muted); font-variant-numeric: tabular-nums; }
.bib-main { display: grid; grid-template-rows: auto auto auto; row-gap: 0.2rem; }
.bib-title { font-weight: 600; }
.bib-authors { color: var(--muted); }
.bib-venue { color: var(--muted); font-size: 0.95rem; }

/* Publications page side quote */
.pub-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.epigraph-side { position: sticky; top: 5rem; align-self: start; }
@media (max-width: 900px) {
  .pub-grid { grid-template-columns: 1fr; }
  .epigraph-side { position: static; }
}

/* Grid tiles (reading/writing) */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.tile {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 0 0 var(--line); /* base bottom line */
    transition: transform 180ms ease, box-shadow 180ms ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 10px 0 0 var(--line); }
.tile .title { position: absolute; font-weight: 600; max-width: 80%; }
.tile .meta { position: absolute; bottom: 1rem; left: 1rem; right: 1rem; color: var(--muted); font-size: 0.9rem; }
.tile .author { color: var(--muted); }
.tile .status { font-size: 0.85rem; color: var(--muted); }

/* Make entire tiles clickable without link underlines */
.grid a.tile { display: block; color: inherit; text-decoration: none; border-bottom: 0; }
.grid a.tile:visited { color: inherit; }

/* Floating title positions for variety */
.grid .tile:nth-child(4n+1) .title { top: 12%; left: 10%; }
.grid .tile:nth-child(4n+2) .title { top: 14%; right: 10%; }
.grid .tile:nth-child(4n+3) .title { bottom: 16%; left: 10%; }
.grid .tile:nth-child(4n) .title { bottom: 14%; right: 10%; }

/* Writing pieces */
.pieces { margin-top: 1rem; }
.piece { padding: 0.75rem 0; border-bottom: 1px solid #efefef; }
.piece .title { font-weight: 600; }
.piece .meta { color: var(--muted); font-size: 0.9rem; }
.piece a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--fg); }
.piece a:hover { opacity: 0.7; }

/* Homepage portrait alignment overrides */
.about-portrait { display: flex; flex-direction: column; align-items: flex-end; }
.about-portrait img { width: 96%; max-width: 520px; margin-left: auto; }
.about-portrait .epigraph { display: block; width: 96%; margin-left: auto; text-align: center; }
.about-portrait .epigraph blockquote { font-size: 1rem; }

