/* ---- palette sampled from the banner: navy #102040, accent cyan #80f0f0 ---- */
:root {
  --content-width: 46rem;
  --hero-width: 62rem;
  --font-body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, Cambria, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --accent: #1f6a72;
  --accent-soft: rgba(31, 106, 114, .3);
  --bs-link-color-rgb: 31, 106, 114;
  --bs-link-hover-color-rgb: 17, 72, 78;
}
:root[data-bs-theme="dark"] {
  --accent: #7fd4dc;
  --accent-soft: rgba(127, 212, 220, .34);
  --bs-link-color-rgb: 127, 212, 220;
  --bs-link-hover-color-rgb: 173, 233, 239;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.01rem + 0.22vw, 1.15rem);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.navbar, .meta, .btn, .badge, footer, .cat-chip, .fn-ref,
h1, h2, h3, h4, h5, h6 { font-family: var(--font-ui); }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.019em; text-wrap: balance; }

/* ---- reading column ---- */
.content { max-width: var(--content-width); }
.content p { text-wrap: pretty; }
.content p, .content ul, .content ol, .content blockquote { margin-bottom: 1.3rem; }
.content li { margin-bottom: .35rem; }
.content li::marker { color: var(--accent); }
.content h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.3rem); line-height: 1.18; }
.content h2 { margin-top: 2.6rem; margin-bottom: .85rem; font-size: 1.4rem; line-height: 1.3; }
.content h3 { margin-top: 2rem; margin-bottom: .6rem; font-size: 1.12rem; line-height: 1.35; }
.content img { display: block; max-width: 100%; height: auto; border-radius: .5rem; }
.content figure, .content video, .content audio { max-width: 100%; }
.content pre {
  white-space: pre-wrap; word-wrap: break-word;
  background: var(--bs-tertiary-bg); font-size: .9rem;
  border-color: var(--bs-border-color) !important;
}
.content table { font-family: var(--font-ui); font-size: .92rem; }
.content blockquote {
  font-style: italic; color: var(--bs-secondary-color);
  border-left: 3px solid var(--accent-soft) !important; margin-left: 0;
}
.content .pull-quote {
  margin: 2.5rem 0;
  padding: 0 0 0 clamp(1.25rem, 4vw, 2rem);
  border-left: 1px solid currentColor !important;
  color: var(--bs-emphasis-color);
  font-family: var(--font-ui);
  font-style: normal;
  font-size: clamp(1.4rem, 1.05rem + 1.3vw, 1.85rem);
  font-weight: 400;
  line-height: 1.5;
}
.pull-quote-mark {
  display: block;
  height: .8em;
  margin-bottom: .15em;
  font-family: Arial, sans-serif;
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
}
.content .pull-quote > :last-child { margin-bottom: 0; }
.content hr { margin: 2.5rem 0; opacity: .18; }

/* ---- links: muted accent with a hairline underline, not browser blue ---- */
a { color: rgb(var(--bs-link-color-rgb)); }
.content a, .post-list-item h2 a, footer a, .meta a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: .17em;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.content a:hover, .post-list-item h2 a:hover, footer a:hover {
  color: rgb(var(--bs-link-hover-color-rgb));
  text-decoration-color: currentColor;
}
::selection { background: var(--accent-soft); }

/* ---- footnotes ---- */
.fn-ref { font-size: .72em; font-weight: 600; }
.fn-ref a { text-decoration: none; padding: 0 .12em; }
.footnotes { font-size: .9rem; color: var(--bs-secondary-color); }
.footnotes ol { padding-left: 1.1rem; }
.footnotes li { margin-bottom: .5rem; }
.fn-back { text-decoration: none; }

/* ---- CV: year / entry rows, hairline separated ---- */
.cv-list {
  display: grid; grid-template-columns: 6.5rem 1fr; column-gap: 1.5rem;
  font-family: var(--font-ui); margin: 0 0 .5rem;
}
.cv-list dt {
  font-size: .82rem; letter-spacing: .04em; font-variant-numeric: tabular-nums;
  color: var(--bs-secondary-color); white-space: nowrap;
}
.cv-list dd { margin: 0; font-size: .95rem; line-height: 1.5; }
.cv-list dt, .cv-list dd {
  border-top: 1px solid var(--bs-border-color); padding: .6rem 0;
}
.cv-list dt:first-of-type, .cv-list dd:first-of-type { border-top: 0; padding-top: 0; }
.content .cv-note { font-size: .92rem; color: var(--bs-secondary-color); margin-top: 2.6rem; }
@media (max-width: 34rem) {
  .cv-list { grid-template-columns: 1fr; column-gap: 0; }
  .cv-list dt { padding: .75rem 0 0; }
  .cv-list dd { border-top: 0; padding: .1rem 0 0; }
  .cv-list dt:first-of-type { padding-top: 0; }
}

/* ---- talks: title + muted meta line, hairline separated ---- */
.content .talk-year {
  font-family: var(--font-ui); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--bs-secondary-color);
  margin-top: 2.2rem; margin-bottom: .7rem;
}
.content .talk-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.content .talk-list li { margin: 0; padding: .7rem 0; border-top: 1px solid var(--bs-border-color); }
.content .talk-list li:first-child { border-top: 0; padding-top: 0; }
.talk-title { display: block; line-height: 1.45; }
.talk-meta {
  display: block; font-family: var(--font-ui); font-size: .8rem; line-height: 1.5;
  color: var(--bs-secondary-color); margin-top: .15rem;
}

/* ---- chrome ---- */
.navbar { font-size: .95rem; }
.navbar-brand { font-weight: 600; letter-spacing: -.022em; }
.navbar .nav-link { color: var(--bs-body-color); opacity: .68; }
.navbar .nav-link:hover, .navbar .nav-link.active { opacity: 1; color: var(--accent); }
.btn-primary {
  --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: rgb(var(--bs-link-hover-color-rgb));
  --bs-btn-hover-border-color: rgb(var(--bs-link-hover-color-rgb));
}
:root[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0d1b2a; --bs-btn-hover-color: #0d1b2a; }

/* ---- hero ---- */
.hero { max-width: var(--hero-width); margin: 0 auto 3rem; }
.hero img { width: 100%; height: auto; display: block; border-radius: .75rem; }
.hero-portrait { display: none; }
.home-layout { display: block; }
.home-main { margin-top: 1rem; margin-bottom: 3rem; }
.home-content { max-width: 42rem; margin: 0 auto; }
.recent-post-title {
  display: block;
  margin-bottom: .3rem;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.35;
}
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1.6rem 0 0;
}
.profile-links .btn { white-space: nowrap; }
@media (min-width: 768px) {
  .home-main { margin-top: 1.5rem; }
}
@media (min-width: 1200px) {
  :root { --content-width: 50rem; }
  .hero-landscape { display: none; }
  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 48rem) minmax(15rem, 18rem);
    justify-content: center;
    align-items: start;
    gap: clamp(2rem, 4vw, 3.5rem);
    margin: 2rem auto 0;
  }
  .hero-portrait {
    display: block;
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 1.5rem;
  }
  .hero-portrait-copy {
    position: absolute;
    top: clamp(1.3rem, 3vw, 2rem);
    right: 1.15rem;
    left: 1.15rem;
    color: #80f0f0;
    font-family: var(--font-ui);
    font-size: clamp(1.2rem, 1.55vw, 1.65rem);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.03;
    text-align: center;
    text-shadow: 0 1px 12px rgba(3, 18, 38, .65);
  }
  .hero-portrait-copy small {
    display: block;
    margin-top: .75rem;
    color: rgba(255, 255, 255, .94);
    font-size: .48em;
    font-weight: 400;
    letter-spacing: .015em;
    line-height: 1.35;
  }
  .hero-portrait img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: .75rem;
  }
  .home-content { grid-column: 1; grid-row: 1; max-width: 48rem; }
}
@media (max-width: 575.98px) {
  .profile-links {
    gap: 0;
    margin-top: 1.35rem;
    font-family: var(--font-ui);
    font-size: .95rem;
  }
  .profile-links .btn {
    --bs-btn-padding-x: 0;
    --bs-btn-padding-y: .15rem;
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: transparent;
    --bs-btn-color: rgb(var(--bs-link-color-rgb));
    --bs-btn-hover-color: rgb(var(--bs-link-hover-color-rgb));
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: .95rem;
    line-height: 1.5;
    text-decoration: underline;
    text-decoration-color: var(--accent-soft);
    text-decoration-thickness: 1px;
    text-underline-offset: .17em;
  }
  .profile-links .btn:not(:last-child)::after {
    content: "/";
    display: inline-block;
    margin: 0 .55rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
  }
  :root[data-bs-theme="dark"] .profile-links .btn {
    --bs-btn-color: rgb(var(--bs-link-color-rgb));
    --bs-btn-hover-color: rgb(var(--bs-link-hover-color-rgb));
  }
}

/* ---- column note: a quiet pointer to the Multilingual column ---- */
.column-note {
  margin: 2.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
  font-family: var(--font-ui);
  font-size: .88rem;
  line-height: 1.6;
  color: var(--bs-secondary-color);
}
.column-note .column-note-kicker {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: .15rem;
}
.column-note a {
  color: rgb(var(--bs-link-color-rgb));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: .17em;
  transition: color .15s ease, text-decoration-color .15s ease;
  white-space: nowrap;
}
.column-note a:hover {
  color: rgb(var(--bs-link-hover-color-rgb));
  text-decoration-color: currentColor;
}

/* ---- post list ---- */
.post-list-item { padding: 1.6rem 0; border-bottom: 1px solid var(--bs-border-color); }
.post-list-item:first-of-type { padding-top: .5rem; }
.post-list-item h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: .3rem; line-height: 1.35; }
.post-list-item h2 a { color: var(--bs-body-color); text-decoration-color: transparent; }
.post-list-item h2 a:hover { color: var(--accent); }
.post-list-item p { margin-bottom: 0; }

.meta {
  font-size: .74rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--bs-secondary-color);
}
.meta .badge { text-transform: none; letter-spacing: 0; font-weight: 500; }
.badge.text-bg-light { background: var(--bs-tertiary-bg) !important; color: var(--bs-secondary-color) !important; }
.cat-chip { font-size: .8rem; }
.cat-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
:root[data-bs-theme="dark"] .cat-chip.active { color: #0d1b2a; }
footer { font-size: .88rem; }
