/* ---------- Classic & warm palette ---------- */
:root {
  --paper: #faf6ef;
  --paper-deep: #f3ecdf;
  --ink: #3a3226;
  --ink-soft: #6b6152;
  --accent: #9c5a32;      /* warm terracotta */
  --accent-soft: #c8926b;
  --rule: #ddd2bf;
  --max-width: 42rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 1.06rem;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */
header {
  padding: 4.5rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(var(--paper-deep), var(--paper));
}

header.compact { padding: 2.5rem 0 1.8rem; }

header h1 {
  font-size: 2.6rem;
  font-weight: normal;
  letter-spacing: 0.02em;
}

header.compact h1 { font-size: 1.9rem; }

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

header .tagline {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1.1rem;
}

/* ---------- Nav ---------- */
nav {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

header.compact nav { margin-top: 1.4rem; }

nav a {
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

nav a:hover { border-bottom-color: var(--accent-soft); }

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

/* ---------- Sections ---------- */
section { padding: 3rem 0; }

section + section { border-top: 1px solid var(--rule); }

main.page { padding: 3rem 0 2rem; }

h2 {
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--accent-soft);
  margin-top: 0.5rem;
}

h3 {
  font-weight: normal;
  font-size: 1.15rem;
  color: var(--accent);
}

main.page h3 { margin-top: 1.8rem; }

p + p { margin-top: 1rem; }

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

ul.plain {
  margin: 0.8rem 0 0 1.2rem;
}

ul.plain li { margin-top: 0.4rem; }

/* ---------- Portrait ---------- */
.portrait {
  float: right;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 0 1rem 1.5rem;
  border: 3px solid var(--paper-deep);
  box-shadow: 0 0 0 1px var(--rule);
}

@media (max-width: 480px) {
  .portrait {
    width: 130px;
    height: 130px;
    margin: 0 0 0.8rem 1rem;
  }
}

/* ---------- "More" links on the landing page ---------- */
.more {
  display: inline-block;
  margin-top: 1rem;
  font-style: italic;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
}

.more:hover { border-bottom-color: var(--accent); }

/* ---------- Cards (blog & projects) ---------- */
.card {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  margin-top: 1rem;
}

.card .meta {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 0.4rem;
}

/* ---------- Publication list ---------- */
.pub-list { list-style: none; }

.pub-list li {
  padding: 0.9rem 0;
  border-bottom: 1px dotted var(--rule);
}

.pub-list .authors { color: var(--ink-soft); }

.pub-list .title { font-style: italic; }

.pub-list .venue { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Contact list ---------- */
.contact-list {
  list-style: none;
  margin-top: 0.5rem;
}

.contact-list li { padding: 0.35rem 0; }

.contact-list .label {
  display: inline-block;
  width: 6.5rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Archived blog posts ---------- */
.archive-note {
  font-style: italic;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.8rem;
  margin-bottom: 1.8rem;
}

main.page img,
main.page iframe {
  max-width: 100%;
  height: auto;
}

.backlink { margin-top: 2.5rem; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
}

@media (max-width: 480px) {
  header h1 { font-size: 2rem; }
  body { font-size: 1rem; }
}
