:root {
  --fg: #1a1a1a;
  --muted: #6a6a6a;
  --link: #2b8fd6;          /* light blue accent */
  --accent: #2b8fd6;
  --accent-soft: #eaf4fc;   /* pale blue background */
  --border: #ececec;
  --bg: #ffffff;
  --maxw: 860px;
}

* { box-sizing: border-box; }

html {
  font-family: "Charter", "Georgia", "Crimson Pro", serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 2.5rem 1.25rem 4rem;
  line-height: 1.7;
  font-size: 1.18rem;
}

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

h1, h2, h3 { line-height: 1.25; }
h2.section {
  font-size: 1.5rem;
  margin: 2.4rem 0 1rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}

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

/* ---------- Top navigation ---------- */
.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 1rem;
  margin-bottom: 2rem;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

/* ---------- Home header ---------- */
.profile-header { margin-bottom: 1rem; }
.profile-header .name {
  font-size: 2.8rem;
  font-weight: 400;
  margin: 0 0 .25rem;
  letter-spacing: -.5px;
}
.profile-header .name .name-first { font-weight: 700; }
.profile-header .role { color: var(--muted); margin: 0 0 .7rem; font-size: 1.2rem; }

/* ---------- Intro ---------- */
.intro {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
  margin: .5rem 0 1.25rem;
}
.intro-main { min-width: 0; }
.intro-side {
  width: 220px;
  padding-top: 68px;
  text-align: center;
}
.avatar {
  width: 220px;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 4px;
}
.email-line {
  margin: .9rem 0 0;
  font-family: "Courier New", monospace;
  font-size: .92rem;
  color: var(--muted);
}

/* Blue emphasis inside the bio (like the reference) */
.bio strong { color: var(--accent); font-weight: 700; }
.bio em { color: var(--accent); font-style: italic; }
.bio code {
  font-family: -apple-system, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: .82em;
  font-weight: 600;
  letter-spacing: .1px;
  color: #1a66ac;
  background: var(--accent-soft);
  padding: .08em .4em;
  border-radius: 5px;
}
.bio-lead p { margin: .55rem 0; }
.bio-background {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.1rem 0 .4rem;
  border-top: 1px solid var(--border);
}
.bio-background-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.bio-background-label {
  padding-top: .18rem;
  color: var(--muted);
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}
.bio-background p { margin: 0; }
.bio-note {
  margin-top: .65rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Icon link row ---------- */
.icon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 1.45rem;
}
.icon-links a { color: var(--muted); transition: color .15s ease; }
.icon-links a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Bio / News ---------- */
.bio p { margin: .6rem 0; }

.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: flex; gap: 1rem; padding: .35rem 0; }
.news-list .date {
  color: var(--muted);
  white-space: nowrap;
  min-width: 5.5rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Publications ---------- */
.pub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.75rem;
  align-items: center;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}
.pub:last-of-type { border-bottom: 0; }
.pub-body { min-width: 0; }
.pub-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 230px;
  min-height: 120px;
}
.pub-thumb img {
  display: block;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}
.pub-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: .5rem .6rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.3;
}
.pub-title { font-weight: 600; font-size: 1.08rem; }
.pub-authors { font-size: 1rem; }
.pub-venue { color: var(--muted); font-style: italic; font-size: .97rem; }
.pub-links { margin-top: .35rem; font-size: .92rem; }
.pub-links a {
  display: inline-block;
  margin-right: .6rem;
  padding: .05rem .5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ---------- List pages (writings/readings) ---------- */
.post-list { list-style: none; padding: 0; }
.post-list li { margin: .5rem 0; }
.post-list .meta { color: var(--muted); font-size: .92rem; }

/* Writings index — "Month Year » Title" with blue title links */
.writings-index li {
  margin: .55rem 0;
  font-size: 1.08rem;
  line-height: 1.5;
}
.writings-index .meta { margin-right: .15rem; font-size: 1.08rem; }
.writings-index .sep { color: var(--muted); margin: 0 .1rem; }
.writings-index a { color: var(--link); }
.writings-index a:hover { text-decoration: underline; }

.subscribe {
  margin-top: 3rem;
  max-width: 480px;
}
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f5f6f7;
}
.subscribe-form label { font-weight: 600; }
.subscribe-form p { margin: -.15rem 0 .1rem; color: var(--muted); font-size: .92rem; }
.subscribe-form input {
  padding: .6rem .7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.subscribe-form input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 1px;
}
.subscribe-form button {
  padding: .6rem .9rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: .833em;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
}
.subscribe-form button:hover { filter: brightness(.92); }
.subscribe-form small { color: var(--muted); text-align: center; }
.subscribe-form small a { color: inherit; }

footer.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
}
footer.site-footer a { color: inherit; text-decoration: none; }
footer.site-footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .profile-header .name { font-size: 2.2rem; }
  .intro { grid-template-columns: 1fr; justify-items: center; gap: 1.25rem; }
  .intro-main { width: 100%; }
  .intro-side { width: 100%; padding-top: 0; }
  .avatar { width: 200px; height: auto; }
  .icon-links { justify-content: flex-start; }
  .bio-background-row { grid-template-columns: 1fr; gap: .25rem; }
  .pub { grid-template-columns: 1fr; gap: 1rem; }
  .pub-thumb { order: -1; width: 100%; max-width: 360px; min-height: 0; }
}
