/* =========================================================================
   Custom restyle for Madison Perry's site
   Loaded AFTER the theme's main.css (see _includes/head/custom.html).
   Goal: a clean, single-column serif look echoing tlpotter.com.
   Pure CSS so it builds reliably on GitHub Pages regardless of the SCSS
   pipeline. Fonts: Playfair Display (display/headings) + EB Garamond (body).
   ========================================================================= */

:root {
  --ink:        #1c1c1c;   /* near-black body text            */
  --ink-soft:   #444;      /* secondary text                  */
  --muted:      #6b6b6b;   /* captions / meta                 */
  --rule:       #e2e2e2;   /* hairline rules                  */
  --link:       #34618a;   /* restrained academic blue        */
  --link-hover: #1f3f5e;
  --bg:         #ffffff;
  --content-width: 44rem;  /* ~760px reading column           */
  --serif:   "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Playfair Display", Georgia, serif;
  --sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Base typography --------------------------------------------------- */
html { font-size: 18px; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

p, li { font-size: 1.16rem; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:visited { color: var(--link); }

strong { font-weight: 700; }

/* ---- Masthead / top navigation --------------------------------------- */
/* Hidden: the name already appears large in the banner, so the top bar is
   redundant and its only link (the name) just reloads the page. */
.masthead { display: none; }
.masthead__x-unused {
  border-bottom: 1px solid var(--rule);
  box-shadow: none;
  background: var(--bg);
}
.masthead__inner-wrap {
  max-width: 60rem;
  padding-top: 1.1em;
  padding-bottom: 1.1em;
}
/* Site name / brand */
.greedy-nav .masthead__menu-item--lg a,
.masthead__menu-item--lg a {
  font-family: var(--display) !important;
  font-weight: 700;
  font-size: 1.35rem !important;
  color: var(--ink) !important;
  letter-spacing: 0.01em;
}
/* Nav links: small-caps, letterspaced */
.greedy-nav a {
  font-family: var(--sans) !important;
  font-size: 0.72rem !important;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-soft) !important;
  font-weight: 600;
}
.greedy-nav a:hover { color: var(--link) !important; }
.greedy-nav .visible-links a:before { background: var(--link); height: 2px; }
.greedy-nav { background: transparent; }
/* No top-nav items (Potter-style), so hide the mobile hamburger toggle */
.greedy-nav button.greedy-nav__toggle,
.greedy-nav > button,
.greedy-nav .hidden-links { display: none !important; }

/* ---- Hero banner (homepage) ------------------------------------------ */
.page__hero--overlay {
  padding: 5.5em 0;
  min-height: 340px;
  align-items: flex-end;
  background-position: center 40%;
}
.page__hero--overlay .wrapper {
  max-width: 60rem;
  padding-left: 1.5em;
}
.page__hero--overlay .page__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 3rem;
  margin: 0 0 0.15em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.page__hero--overlay .page__lead {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  opacity: 0.97;
  text-shadow: 0 1px 5px rgba(0,0,0,0.35);
}

/* ---- Main content column --------------------------------------------- */
#main { max-width: 60rem; }
.page, .archive {
  width: 100%;
  padding-right: 0;
  float: none;
}
.page__inner-wrap { max-width: var(--content-width); }
.archive { max-width: var(--content-width); }
.page__content { font-size: 1rem; }
.page__content p, .archive p, .page__content li, .archive li { font-size: 1.16rem; }

/* Page titles on interior pages */
.page__title, .archive .page__title {
  font-family: var(--display);
  border: 0;
  margin-bottom: 0.6em;
}
.archive .page__title { font-size: 2rem; }

/* Hide theme UI we don't want */
.page__meta, .page__taxonomy, .page__share, .page__footer-follow .social-icons > li:first-child { }
.author__urls-wrapper .btn { display: none; } /* "Follow" button */

/* =========================================================================
   Homepage: bio row (text + headshot) and info block
   ========================================================================= */
.home-lead { display: flex; gap: 2.2em; align-items: flex-start; margin-top: 0.5em; }
.home-lead__text { flex: 1 1 auto; }
.home-lead__photo { flex: 0 0 210px; text-align: center; margin-top: 0.4em; }
.home-lead__photo img {
  width: 210px;
  height: 250px;
  object-fit: cover;
  object-position: 35% 30%; /* keeps her face framed in the portrait crop */
  border-radius: 8px;
  display: block;
}
.home-lead__photo figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5em; font-style: italic; }

/* Info block: Fields / Contact / CV etc. */
.info-block { margin: 1.6em 0 0.5em; }
.info-block dl { margin: 0; }
.info-block .info-row { margin: 0.35em 0; font-size: 1.12rem; }
.info-block .info-label { font-weight: 700; }
.info-links a { margin-right: 0.9em; white-space: nowrap; }
.info-links a i { margin-right: 0.25em; }

@media (max-width: 700px) {
  .home-lead { flex-direction: column-reverse; }
  .home-lead__photo { align-self: center; }
  .page__hero--overlay .page__title { font-size: 2.1rem; }
  .page__hero--overlay .page__lead { font-size: 1.15rem; }
}

/* =========================================================================
   Research / listing items (Potter-style)
   ========================================================================= */
.pub-list { margin: 0.5em 0 2em; }
.pub {
  padding: 1.1em 0;
  border-bottom: 1px solid var(--rule);
}
.pub:last-child { border-bottom: 0; }
.pub__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0 0 0.15em;
}
.pub__meta { color: var(--muted); font-style: italic; font-size: 1.02rem; margin: 0 0 0.4em; }
.pub__status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.15em 0.7em;
  margin-bottom: 0.4em;
}
.pub__abstract { font-size: 1.08rem; color: var(--ink-soft); margin: 0.3em 0 0; }
/* Native <details> abstract toggle */
.pub details summary {
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--link);
  list-style: none;
}
.pub details summary::-webkit-details-marker { display: none; }
.pub details[open] summary { margin-bottom: 0.4em; }

/* =========================================================================
   Homepage tab bar (Potter-style: swaps content in place)
   ========================================================================= */
.tabs { margin-top: 2.8em; }
.tab-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
}
.tab-btn {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.7em 1.5em;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease;
}
.tab-btn:not(:first-child) { border-left: 1px solid var(--rule); }
.tab-btn:hover { color: var(--ink); }
.tab-btn.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel { display: none; padding-top: 0.6em; }
.tab-panel.is-active { display: block; }
.tab-panel > .pub-list:first-of-type { margin-top: 0.5em; }
/* When JS is disabled, show everything so content is never hidden */
.no-js .tab-panel { display: block; }
.no-js .tab-bar { display: none; }

/* Section headers within a page */
.section-head {
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4em;
  margin: 2.2em 0 0.8em;
}

/* =========================================================================
   Resources page cards (mock-up)
   ========================================================================= */
.mock-banner {
  background: #fbf7ee;
  border: 1px solid #ecdfc4;
  border-radius: 8px;
  padding: 0.9em 1.2em;
  font-size: 1.02rem;
  color: #7a5c1e;
  margin-bottom: 1.6em;
}
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1em; margin: 1em 0; }
.card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.1em 1.2em;
  background: #fff;
}
.card h3 { margin: 0 0 0.3em; font-size: 1.15rem; }
.card p { font-size: 1.02rem; color: var(--ink-soft); margin: 0.3em 0; }
.card .card__tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-family: var(--sans); }
@media (max-width: 700px) { .card-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   Footer
   ========================================================================= */
.page__footer { background: #fafafa; border-top: 1px solid var(--rule); color: var(--muted); }
.page__footer a { color: var(--ink-soft); }
.page__footer-copyright { font-family: var(--sans); font-size: 0.78rem; }
.page__footer-follow .social-icons { font-family: var(--sans); font-size: 0.8rem; }
