:root {
  --text: #222222;
  --muted: #6f6a64;
  --soft: #8a8178;
  --border: #ded8cf;
  --background: #fbfaf7;
  --surface: #ffffff;
  --surface-soft: #f4f0ea;
  --link: #7a2e1f;
  --link-hover: #4f1d14;
  --max-width: 940px;
  --content-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  padding: 0;
  background:
    linear-gradient(to bottom, #f7f3ed 0, #fbfaf7 220px);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
}

.site {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.2rem 1.4rem 4rem;
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 4.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}

.site-title a {
  color: var(--text);
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.15rem;
  line-height: 1;
  letter-spacing: -0.035em;
}

.site-title a:hover {
  color: var(--link);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  font-size: 0.88rem;
  letter-spacing: 0.015em;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--link);
  border-bottom-color: var(--link);
}

.content {
  max-width: var(--content-width);
  min-height: 60vh;
}

.page,
.post {
  width: 100%;
}

.page-header,
.post-header {
  margin-bottom: 2.2rem;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.23;
  letter-spacing: -0.025em;
  color: #1d1b19;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 3.2rem);
  margin: 0 0 1.4rem;
}

h2 {
  font-size: 1.65rem;
  margin-top: 3.2rem;
  margin-bottom: 0.9rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.18rem;
  margin-top: 2rem;
  margin-bottom: 0.35rem;
}

p {
  margin: 1rem 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
}

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

ul, ol {
  padding-left: 1.35rem;
}

li {
  margin: 0.35rem 0;
}

.lead {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.45;
  color: #2a2724;
  margin-bottom: 1.6rem;
}

.small {
  font-size: 0.95rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.05rem;
  margin-top: 3rem;
}

.card {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: 0 10px 24px rgba(80, 60, 40, 0.045);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(80, 60, 40, 0.08);
  border-color: #c9bdae;
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 0.55rem;
  font-size: 1.28rem;
}

.card p {
  margin-bottom: 0.8rem;
}

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

.card a {
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
}

.card a::after {
  content: "";
}

.card a:hover {
  text-decoration: underline;
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
}

.card p {
  margin-bottom: 0.8rem;
}

.card a {
  font-size: 0.96rem;
  font-weight: 500;
  text-decoration: none;
}

.post-list {
  list-style: none;
  padding-left: 0;
  margin-top: 2rem;
}

.post-list li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--border);
}

.post-list a {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  text-decoration: none;
}

.post-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.back-link {
  margin-top: 3rem;
}

.portrait {
  float: right;
  width: 145px;
  max-width: 32%;
  height: auto;
  margin: 0.2rem 0 1.2rem 1.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  padding: 4px;
  background: var(--surface);
}

.clear {
  clear: both;
}

.site-footer {
  max-width: var(--content-width);
  margin-top: 5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

code {
  font-size: 0.9em;
  background: var(--surface-soft);
  padding: 0.12rem 0.25rem;
  border-radius: 4px;
}

@media (min-width: 720px) {
  .site-header {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .site-nav {
    justify-content: flex-end;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 17px;
  }

  .site {
    padding: 1.4rem 1rem 3rem;
  }

  .site-header {
    margin-bottom: 3rem;
  }

  .site-title a {
    font-size: 1.8rem;
  }

  .portrait {
    float: none;
    display: block;
    width: 135px;
    max-width: 135px;
    margin: 0 0 1.5rem 0;
  }
}
/* --- Typographic refinements --- */

.page-content > p,
.post-content > p,
.page-content > ul,
.page-content > ol,
.post-content > ul,
.post-content > ol {
  max-width: 720px;
}

.page-content h2,
.post-content h2 {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
}

.page-content h2:first-child,
.post-content h2:first-child {
  border-top: 0;
  padding-top: 0;
}

.page-content h3,
.post-content h3 {
  color: #332e2a;
}

.page-content strong,
.post-content strong {
  color: #1c1917;
}

.page-content em,
.post-content em {
  color: #403a35;
}

.page-content li + li,
.post-content li + li {
  margin-top: 0.5rem;
}
/* --- Bibliographic lists --- */

.page-content ol {
  counter-reset: item;
}

.page-content ol > li {
  margin-bottom: 1.25rem;
  padding-left: 0.2rem;
}

.page-content ol > li::marker {
  color: var(--soft);
  font-size: 0.9rem;
}

.page-content ol > li strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.page-content ol > li a {
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
}

.page-content ol > li a:hover {
  text-decoration: underline;
}
/* --- Home page refinements --- */

.home-intro {
  margin-bottom: 2rem;
}

.home-meta {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.55);
  border-left: 3px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.home-meta p {
  margin: 0.35rem 0;
}

/* --- Home refinements --- */

.home-intro {
  margin-bottom: 1.8rem;
}

.home-note {
  margin: 1.8rem 0 2rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--border);
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 0.96rem;
}

.home-note p {
  margin: 0.4rem 0;
}
/* =========================================================
   Final visual refinements
   ========================================================= */

:root {
  --background: #fbfaf7;
  --background-top: #f4efe7;
  --text: #24211f;
  --muted: #706963;
  --soft: #8b8178;
  --border: #ddd4ca;
  --surface: #fffdf9;
  --surface-soft: #f6f1ea;
  --link: #7a2e1f;
  --link-hover: #4d1d14;
  --shadow: rgba(92, 65, 42, 0.08);
  --max-width: 1040px;
  --content-width: 800px;
}

body {
  background:
    linear-gradient(to bottom, var(--background-top) 0, var(--background) 260px);
  color: var(--text);
}

/* Main frame */

.site {
  max-width: var(--max-width);
  padding-top: 2.4rem;
}

.content,
.site-footer {
  max-width: var(--content-width);
}

/* Header and navigation */

.site-header {
  margin-bottom: 4.2rem;
  border-bottom-color: var(--border);
}

.site-title a {
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  letter-spacing: -0.04em;
}

.site-nav {
  gap: 0.5rem 1rem;
  font-size: 0.86rem;
}

.site-nav a {
  padding-bottom: 0.15rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--link);
  border-bottom-color: var(--link);
}

/* Page titles */

.page-header h1,
.post-header h1 {
  margin-bottom: 0;
}

.page-header::after,
.post-header::after {
  content: "";
  display: block;
  width: 4rem;
  height: 1px;
  margin-top: 1.2rem;
  background: var(--border);
}

/* Typography */

.lead {
  max-width: 760px;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  color: #2b2723;
}

.page-content p,
.post-content p {
  max-width: 760px;
}

.page-content h2,
.post-content h2 {
  margin-top: 3.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--border);
}

.page-content h2:first-child,
.post-content h2:first-child {
  border-top: 0;
  padding-top: 0;
}

.page-content h3,
.post-content h3 {
  color: #342f2a;
}

strong {
  color: #1d1a18;
}

/* Links */

a {
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.08em;
}

/* Home portrait */

.portrait {
  width: 138px;
  max-width: 30%;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 4px;
  background: var(--surface);
  box-shadow: 0 8px 20px var(--shadow);
}

/* Home institutional note */

.home-note {
  margin: 1.8rem 0 2.3rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--border);
  background: rgba(255, 253, 249, 0.7);
  color: var(--muted);
  font-size: 0.96rem;
}

.home-note p {
  margin: 0.4rem 0;
}

/* Cards */

.cards {
  margin-top: 3rem;
  gap: 1.05rem;
}

.card {
  background: rgba(255, 253, 249, 0.78);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: 0 10px 26px rgba(92, 65, 42, 0.045);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.card:hover {
  transform: translateY(-2px);
  background: rgba(255, 253, 249, 0.95);
  border-color: #c9baaa;
  box-shadow: 0 15px 34px rgba(92, 65, 42, 0.075);
}

.card h2,
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.55rem;
}

.card p {
  color: #3f3933;
}

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

.card a {
  font-weight: 600;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

/* Bibliographic and long lists */

.page-content ol > li,
.post-content ol > li {
  margin-bottom: 1.35rem;
}

.page-content ol > li::marker,
.post-content ol > li::marker {
  color: var(--soft);
  font-size: 0.9rem;
}

.page-content ol > li strong,
.post-content ol > li strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

/* Avoid overflow from long links */

.content,
.page-content,
.post-content,
a {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Footer */

.site-footer {
  margin-top: 5.5rem;
}

/* Mobile */

@media (max-width: 640px) {
  html {
    font-size: 17px;
  }

  .site {
    padding: 1.35rem 1rem 3rem;
  }

  .site-header {
    margin-bottom: 3rem;
  }

  .site-nav {
    font-size: 0.83rem;
    line-height: 1.45;
    gap: 0.4rem 0.75rem;
  }

  h1 {
    font-size: 2.05rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .lead {
    font-size: 1.28rem;
  }

  .portrait {
    float: none;
    display: block;
    width: 128px;
    max-width: 128px;
    margin: 0 0 1.5rem 0;
  }

  .card {
    padding: 1rem;
  }

  .home-note {
    padding: 0.9rem 1rem;
  }
}
/* =========================================================
   Navigation theme
   ========================================================= */

.site-branding {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.site-nav a.active {
  color: var(--link);
  border-bottom-color: var(--link);
}

.site-nav a.active::before {
  content: "· ";
}

@media (max-width: 640px) {
  .site-subtitle {
    font-size: 0.74rem;
  }

  .site-nav a.active::before {
    content: "";
  }
}
/* =========================================================
   Recurring page motif
   ========================================================= */

.page,
.post {
  position: relative;
}

.page::before,
.post::before {
  content: "";
  position: absolute;
  left: -1.8rem;
  top: 0.35rem;
  width: 1px;
  height: 7rem;
  background: linear-gradient(to bottom, var(--link), transparent);
  opacity: 0.35;
}

@media (max-width: 900px) {
  .page::before,
  .post::before {
    display: none;
  }
}
/* =========================================================
   Hero
   ========================================================= */

.hero {
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--link);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.hero .lead {
  margin-top: 0;
}
/* =========================================================
   Card motif
   ========================================================= */

.card::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2px;
  margin-bottom: 0.85rem;
  background: var(--link);
  opacity: 0.55;
}

.card:hover::before {
  opacity: 0.85;
}
/* =========================================================
   Publications and bibliographic entries
   ========================================================= */

.page-content ol {
  padding-left: 1.4rem;
}

.page-content ol > li {
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(221, 212, 202, 0.65);
}

.page-content ol > li:last-child {
  border-bottom: 0;
}

.page-content ol > li strong {
  display: inline;
  color: #251f1b;
}

.page-content ol > li a {
  display: inline-block;
  margin-top: 0.25rem;
  margin-right: 0.25rem;
}
/* =========================================================
   Home contact block
   ========================================================= */

.home-contact {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.home-contact h2 {
  margin-top: 0;
}

.home-contact p {
  max-width: 680px;
}
