/* ==========================================================================
   Johan Fredrikzon — fredrikzon.com
   Editorial aesthetic. Shared stylesheet for all pages.
   ========================================================================== */

:root {
  --ink: #1a1a1a;
  --body: #2a2a2a;
  --muted: #6b6b6b;
  --rule: #e5e5e5;
  --accent: #9b2c2c;
  --bg: #fafaf7;
  --link-underline: rgba(155, 44, 44, 0.3);
  --max-width: 720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 32px 120px;
}

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

header.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 64px;
  flex-wrap: wrap;
  gap: 16px;
}

.site-header .name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.site-header .name a {
  color: var(--ink);
  text-decoration: none;
}

nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: color 0.15s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

nav a:hover,
nav a.current {
  color: var(--accent);
}

nav a.current {
  border-bottom-color: var(--accent);
}

/* -------- Typography -------- */

h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 20px;
}

h2:first-child { margin-top: 0; }

h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
  margin-top: 32px;
  margin-bottom: 14px;
  color: var(--ink);
}

p {
  margin-bottom: 18px;
}

.lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 24px;
}

.body-text p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--body);
}

.body-text a,
.content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--link-underline);
  transition: border-color 0.15s;
}

.body-text a:hover,
.content a:hover {
  border-bottom-color: var(--accent);
}

em { font-style: italic; }
strong { font-weight: 600; }

/* -------- Hero / landing portrait -------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 40px;
  margin-bottom: 48px;
  align-items: start;
}

.portrait {
  width: 180px;
  height: 220px;
  background: linear-gradient(135deg, #d4d0c8 0%, #a8a59e 100%);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  color: #fff;
  font-size: 14px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* -------- Section labels -------- */

.section-label {
  font-family: 'Inter Tight', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 64px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.section-label:first-child,
.hero + .section-label,
.body-text + .section-label {
  margin-top: 56px;
}

/* -------- News list (landing page snippet) -------- */

.news-list {
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  align-items: baseline;
}

.news-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.news-title {
  font-size: 16px;
  line-height: 1.45;
}

.news-title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.news-title a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.see-all {
  margin-top: 24px;
  font-size: 14px;
}

.see-all a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.see-all a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* -------- News & Updates page (expanded entries) -------- */

.news-entry {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.news-entry:first-of-type { padding-top: 0; }

.news-entry .news-date {
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.news-entry h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 10px;
}

.news-entry p {
  font-family: 'Source Serif 4', serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  margin-bottom: 12px;
}

.news-entry p:last-child { margin-bottom: 0; }

/* -------- Publications / bibliography lists -------- */

.year-group { margin-top: 32px; }
.year-group:first-of-type { margin-top: 20px; }

.year-heading {
  font-family: 'Source Serif 4', serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}

.biblio-list {
  list-style: none;
}

.biblio-list li {
  font-family: 'Source Serif 4', serif;
  font-size: 17px;
  line-height: 1.55;
  padding: 12px 0;
  color: var(--body);
}

.biblio-list li + li {
  border-top: 1px solid #f0ede5;
}

.biblio-list .tag {
  display: inline-block;
  font-family: 'Inter Tight', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 8px;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  vertical-align: 1px;
}

.biblio-list .translation {
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

.biblio-list .venue {
  font-style: italic;
}

/* -------- Book entries -------- */

.book {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.book:last-child {
  border-bottom: none;
}

.book .book-title {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--ink);
}

.book .book-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

.book .book-description {
  font-family: 'Source Serif 4', serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
}

/* -------- Teaching list -------- */

.teaching-list {
  list-style: none;
}

.teaching-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
  align-items: baseline;
}

.teaching-list .term {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.teaching-list .course {
  font-family: 'Source Serif 4', serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--body);
}

.teaching-list .course em {
  color: var(--ink);
}

/* -------- Contact -------- */

.contact-block {
  font-family: 'Source Serif 4', serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 32px;
}

.contact-block .affil {
  margin-bottom: 24px;
}

.contact-block .emailrow {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 8px 0;
  font-size: 17px;
}

.contact-block .emailrow .label {
  color: var(--muted);
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 4px;
}

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

footer.site-footer {
  margin-top: 96px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

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

@media (max-width: 640px) {
  .wrap { padding: 40px 20px 80px; }
  header.site-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  nav ul { gap: 14px 18px; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .portrait { width: 140px; height: 170px; }
  h1 { font-size: 32px; }
  h2 { font-size: 22px; }
  .news-list li { grid-template-columns: 1fr; gap: 4px; }
  .news-date { font-size: 12px; }
  .teaching-list li { grid-template-columns: 1fr; gap: 4px; }
  .contact-block .emailrow { grid-template-columns: 1fr; gap: 2px; }
  .contact-block .emailrow .label { padding-top: 0; }
}

.accent { color: var(--accent); }

.news-entry img {
  max-width: 640px;    
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  margin: 16px 0;
}

