/*
Theme Name: Marginalia 2.0
Theme URI: https://example.com
Author: 
Description: A quiet, single-page theme for academic profiles. One page: a photo, a short bio, and a publications list styled like catalog-card citations. No blog, no post archive — just a scholar's homepage.
Version: 2.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marginalia-2
*/

:root {
  --paper: #0B0C0E;
  --paper-raised: #16181B;
  --ink: #F5F4F0;
  --ink-soft: #A7ACA6;
  --rule: #2E3230;
  --accent: #8FBBA3;
  --accent-soft: #1E2622;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --max-width: 760px;
  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover { color: var(--ink); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Eyebrow / top strip ---------- */

.site-eyebrow {
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
}

.site-eyebrow .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-eyebrow__mark {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-eyebrow__nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-left: 20px;
  text-decoration: none;
}

.site-eyebrow__nav a:hover { color: var(--accent); }

/* ---------- Profile / hero ---------- */

.profile {
  padding: clamp(40px, 7vw, 80px) 0 clamp(32px, 6vw, 56px);
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.profile__photo {
  width: 380px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
}

.profile__photo img {
  width: 100%;
  height: auto;
  display: block;
}

.profile__photo--placeholder {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
  padding: 12px;
  letter-spacing: 0.04em;
}

.profile__name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
  margin: 0 0 6px;
  color: var(--ink);
}

.profile__role {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 18px;
}

.profile__bio {
  color: var(--ink-soft);
  max-width: 56ch;
}

.profile__bio p { margin: 0 0 1em; }
.profile__bio p:last-child { margin-bottom: 0; }

.profile__links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.profile__links a { text-decoration: none; }

/* ---------- Section heading ---------- */

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 6px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin: 0;
  color: var(--ink);
}

.section-heading__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.section-heading__rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ---------- Publications: catalog-card list ---------- */

.publications {
  padding: clamp(24px, 5vw, 44px) 0 clamp(56px, 8vw, 90px);
}

.pub-year-group {
  margin-top: 26px;
}

.pub-year-group:first-child {
  margin-top: 22px;
}

.pub-year-heading {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.pub-list {
  margin-top: 10px;
}

.pub-item {
  padding: 12px 0 12px 18px;
  border-left: 2px solid var(--accent-soft);
  margin-bottom: 10px;
}

.pub-item:last-child {
  margin-bottom: 0;
}

.pub-item__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 4px;
  color: var(--ink);
}

.pub-item__title a { color: inherit; text-decoration-color: var(--rule); }
.pub-item__title a:hover { color: var(--accent); }

.pub-item__venue {
  font-size: 14.5px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

.pub-empty {
  padding: 24px 0;
  color: var(--ink-soft);
  font-size: 15px;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 22px 0 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .profile {
    grid-template-columns: 1fr;
  }
  .profile__photo {
    width: 100%;
    max-width: 320px;
  }
  .pub-item {
    padding-left: 14px;
  }
}

/* ---------- Print ---------- */

@media print {
  :root {
    --paper: #FFFFFF;
    --ink: #111111;
    --ink-soft: #444444;
    --accent: #444444;
    --accent-soft: #DDDDDD;
    --rule: #CCCCCC;
  }

  body { font-size: 12pt; }

  .site-eyebrow__nav,
  .site-footer,
  #marginalia-colors {
    display: none;
  }

  .profile {
    grid-template-columns: 140px 1fr;
    gap: 24px;
  }

  .profile__photo {
    width: 140px;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .pub-item {
    break-inside: avoid;
  }

  .publications {
    padding-bottom: 20px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
