/* === CSS Custom Properties === */
:root {
  --bg: #f7f3ee;
  --bg-card: #ffffff;
  --text: #1c1917;
  --text-muted: #6b5e54;
  --text-subtle: #756760;
  --border: #e3d9d0;
  --border-mid: #d4c9bf;
  --accent: #8b1a1a;
  --accent-bg: #fef5f5;
  --accent-hover: #701414;
  --header-bg: #1c1917;
  --header-text: #f0ebe5;
  --header-nav: #a89b8f;
  --header-nav-hover: #f0ebe5;
  --header-border: #3a3330;
  --header-border-hover: #666;
  --cv-section-bg: #f0ece7;
  --footer-text: #7a6f6a;
  --footer-text-dim: #918680;
  --footer-link: #b0a8a3;
  --accent-shadow: rgba(139, 26, 26, 0.08);
  --accent-hover-bg: rgba(139, 26, 26, 0.025);
  --selection-bg: #f5c6c6;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(:target) {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  main {
    animation: none;
  }
  .profile-photo img {
    transition: box-shadow 0.3s; /* suppress transform (lift), keep box-shadow */
  }
  .social-links a {
    transition: color 0.2s; /* suppress background-size slide, keep color */
  }
  .pub-abstract summary::before {
    transition: none; /* suppress chevron rotation */
  }
  .pub-abstract[open] .abstract-body {
    transition: none;
  }
}

body {
  font-family: "Source Serif 4", "Georgia", "Times New Roman",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑",
               "Hiragino Kaku Gothic ProN", "Yu Gothic",
               "Noto Sans SC", "Noto Sans CJK SC",
               serif;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

::selection {
  background: var(--selection-bg);
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Skip Link (Accessibility) === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 6px 6px;
  font-size: 0.9rem;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* === Focus Styles (Accessibility) === */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* === Header — dark ink bar === */
.site-header {
  background: var(--header-bg);
  border-bottom: none;
  padding: 14px 0;
  min-height: 53px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--header-text);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.site-title:hover {
  text-decoration: none;
  color: #fff;
}

.site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.site-header nav a {
  color: var(--header-nav);
  font-size: 0.9rem;
  padding: 4px 10px;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}

.lang-switcher {
  flex-shrink: 0;
}

.lang-switcher .icon {
  width: 14px;
  height: 14px;
}

.lang-switcher a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--header-nav);
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid var(--header-border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.lang-switcher a:hover {
  color: #fff;
  border-color: var(--header-border-hover);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--header-nav-hover);
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.site-header nav a.active {
  color: #fff;
  background: var(--accent);
}

/* === Main Content === */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

main {
  padding: 60px 0 80px;
  min-height: calc(100vh - 200px);
  animation: fadeIn 0.4s ease-out;
}

/* === Profile (Homepage) === */
.profile {
  display: flex;
  gap: 44px;
  align-items: flex-start;
  padding-top: 20px;
}

.profile-photo img {
  width: 190px;
  height: 190px;
  border-radius: 10px;
  object-fit: cover;
  border: none;
  box-shadow:
    0 0 0 1px var(--border),
    0 4px 24px rgba(0, 0, 0, 0.10),
    4px 4px 0 var(--border-mid);
  transition: transform 0.3s, box-shadow 0.3s;
}

.profile-photo img:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px var(--border-mid),
    0 8px 32px rgba(0, 0, 0, 0.13),
    4px 4px 0 var(--border-mid);
}

.profile-info h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.name-ja {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 10px;
}

.profile-info .position {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.profile-info .institution {
  font-size: 0.92rem;
  color: var(--text-subtle);
  margin-bottom: 18px;
}

.institution a {
  color: var(--text-subtle);
  text-decoration: underline;
  text-decoration-color: var(--border-mid);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.institution a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.profile-info p {
  margin-bottom: 10px;
}


.social-links {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.88rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: color 0.2s, background-size 0.3s;
  padding-bottom: 1px;
}

.social-links a:hover {
  color: var(--accent);
  background-size: 100% 1px;
  text-decoration: none;
}

.social-links .sep {
  margin: 0 10px;
  color: var(--border-mid);
}

/* === Profile Bio === */
.profile-bio {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text);
}

/* Lead paragraph — slightly larger, retains weight */
.profile-bio > p:first-child {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.75;
}

.profile-bio p {
  margin-bottom: 14px;
}

.profile-bio ol {
  margin: 12px 0;
  padding-left: 24px;
}

.profile-bio ol li {
  margin-bottom: 10px;
}

.profile-info .profile-tags {
  margin-top: 18px;
  margin-bottom: 0;
}

.profile-bio hr.bio-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* === Tags / Pills === */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.tag {
  display: inline-block;
  background: var(--border);
  color: var(--text-muted);
  font-size: 0.79rem;
  padding: 3px 11px;
  border-radius: 3px;
  border: none;
  line-height: 1.5;
  letter-spacing: 0.01em;
  cursor: default;
}

/* === Pages (Publications, CV) === */
.page h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 28px;
  padding-top: 20px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--text);
  padding-left: 0;
  border-left: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  letter-spacing: -0.01em;
  scroll-margin-top: 70px;
}

.page h2:target {
  color: var(--accent);
}

.page h3 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.22rem;
  font-weight: 500;
  margin-top: 22px;
  margin-bottom: 8px;
  color: var(--text);
  scroll-margin-top: 70px;
}

.page h3:has(+ .cv-section) {
  font-style: normal;
  font-weight: 600;
  background: var(--cv-section-bg);
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  margin-top: 22px;
  margin-bottom: 12px;
}

.page h3 + .cv-section {
  margin-left: 20px;
}

.page h3 + .cv-section + .link-preview {
  margin-left: 20px;
}

.page p {
  margin-bottom: 12px;
}

.page ul, .page ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.page li {
  margin-bottom: 8px;
}

/* === Section Divider === */
.page h2 + .cv-section,
.page h2 + .pub-entry,
.page h2 + .pub-year {
  margin-top: 4px;
}

.cv-section + h2 {
  margin-top: 48px;
  padding-top: 0;
  border-top: none;
}

.page > h2:first-of-type {
  margin-top: 40px;
  padding-top: 0;
  border-top: none;
}

/* === Publication Nav === */
.pub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 14px 0;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
}

.pub-nav a {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 3px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.pub-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
  text-decoration: none;
}

/* === Publication Year Headers === */
h3.pub-year {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  display: inline-block;
  padding: 0;
  border-bottom: 2px solid var(--accent);
  margin-top: 24px;
  margin-bottom: 14px;
  padding-bottom: 3px;
  min-width: 4ch;
}

h3.pub-year:target {
  background: var(--accent-bg);
  padding: 0 8px;
  border-radius: 3px;
}

/* Publication entry styling */
.pub-entry {
  margin-bottom: 18px;
  padding: 16px 16px 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-mid);
  border-radius: 0 6px 6px 0;
  transition: border-left-color 0.25s, box-shadow 0.25s;
}

.pub-entry:hover {
  border-left-color: var(--accent);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.pub-entry .pub-title {
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.pub-entry .pub-authors {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.pub-entry .pub-authors strong {
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0 4px;
  border-radius: 3px;
}

.pub-entry .pub-venue {
  color: var(--text-subtle);
  font-size: 0.9rem;
  margin-top: 2px;
}

/* Publication Abstract toggle */
.pub-abstract {
  margin-top: 10px;
  margin-bottom: 4px;
}

.pub-abstract summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-subtle);
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.pub-abstract summary::-webkit-details-marker { display: none; }

.pub-abstract summary::before {
  content: '▸';
  font-size: 0.68rem;
  display: inline-block;
  transition: transform 0.2s;
}

.pub-abstract[open] summary::before {
  transform: rotate(90deg);
}

.pub-abstract summary:hover,
.pub-abstract[open] summary {
  color: var(--accent);
}

.pub-abstract .abstract-body {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--text);
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 0 0 4px 4px;
  transition: opacity 0.25s ease;
}

@starting-style {
  .pub-abstract[open] .abstract-body {
    opacity: 0;
  }
}

.pub-abstract .abstract-body p {
  margin-bottom: 10px;
}

.pub-abstract .abstract-body p:last-child {
  margin-bottom: 0;
}

/* Bold section labels (Background / Methods / Results etc.) */
.pub-abstract .abstract-body strong {
  color: var(--accent);
  font-weight: 600;
}

/* Bilingual language labels */
.pub-abstract .abstract-lang {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 18px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  display: block;
}

.pub-abstract .abstract-lang:first-child {
  margin-top: 0;
}

.pub-entry .pub-links {
  margin-top: 8px;
}

.pub-entry .pub-links a {
  font-size: 0.82rem;
  margin-right: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 1px 9px;
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.pub-entry .pub-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* Inline descriptive paragraph inside cv-item (e.g. symposium description) */
.cv-item-desc {
  margin: 8px 0 0;
  font-size: 0.92rem;
}

/* CV specific */
.cv-section {
  margin-bottom: 28px;
}

.cv-item {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-left: 2px solid var(--border);
  background: transparent;
  transition: border-color 0.2s, background 0.2s;
  border-radius: 0 4px 4px 0;
}

.cv-item:hover {
  border-left-color: var(--accent);
  background: var(--accent-hover-bg);
}

.cv-item .cv-date {
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.cv-item .cv-title {
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.cv-item .cv-org {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Link Preview Card */
.link-preview {
  display: block;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.link-preview:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-shadow);
  text-decoration: none;
}

.link-preview-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.link-preview-desc {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.link-preview-url {
  display: block;
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* === Back to Top === */
.back-to-top {
  text-align: center;
  padding: 16px 0;
}

.back-to-top a {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--footer-link);
  padding: 4px 14px;
  border: 1px solid var(--header-border);
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.back-to-top a:hover {
  color: #fff;
  border-color: var(--header-border-hover);
  text-decoration: none;
}

/* Inside footer, the footer's own padding-top already provides separation */
.site-footer .back-to-top {
  padding-top: 0;
}

/* === Footer — dark ink, matching header === */
.site-footer {
  background: var(--header-bg);
  border-top: none;
  padding: 16px 0 32px;
  text-align: center;
  color: var(--footer-text);
  font-size: 0.85rem;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.site-footer .footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--footer-link);
  font-size: 0.85rem;
  padding: 4px 14px;
  border: 1px solid var(--header-border);
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.site-footer .footer-links a:hover {
  color: #fff;
  border-color: var(--header-border-hover);
  text-decoration: none;
}

.site-footer .footer-links .sep {
  display: none;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.site-footer p {
  color: var(--footer-text-dim);
}

/* === Responsive === */
@media (max-width: 640px) {
  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  /* Hide niche links on mobile; they remain in the footer */
  .social-links .sl-secondary {
    display: none;
  }

  .tag-list {
    justify-content: center;
  }

  .page h1 {
    font-size: 2rem;
    margin-bottom: 28px;
  }

  .site-header {
    padding: 8px 0;
    min-height: 63px;
  }

  .site-header .container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 0;
    align-items: center;
  }

  .site-title {
    grid-row: 1;
    grid-column: 1;
    font-size: 1.1rem;
  }

  .lang-switcher {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
  }

  .site-header nav {
    grid-row: 2;
    grid-column: 1 / -1;
    gap: 2px;
  }

  .site-header nav a {
    font-size: 0.82rem;
    padding: 3px 8px;
  }

  .lang-switcher a {
    font-size: 0.82rem;
    padding: 2px 8px;
  }

  .link-preview {
    padding: 10px 12px;
  }

  .link-preview-title {
    font-size: 0.85rem;
  }

  .link-preview-desc {
    font-size: 0.78rem;
  }

  .pub-nav {
    justify-content: center;
  }

  .pub-entry {
    padding: 12px 12px 12px 16px;
  }

  .cv-item {
    padding: 12px;
  }

  .profile-photo img {
    width: 160px;
    height: 160px;
  }
}

/* === Dark Mode — warm ink tones, not cold navy === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1510;
    --bg-card: #221d17;
    --text: #e8e2d8;
    --text-muted: #a89b8f;
    --text-subtle: #a89b8f;
    --border: #2e2721;
    --border-mid: #3d3630;
    --accent: #cc6666;
    --accent-bg: rgba(204, 102, 102, 0.08);
    --accent-hover: #e07575;
    --header-bg: #0f0c09;
    --header-text: #d4cfc8;
    --header-nav: #7d7570;
    --header-nav-hover: #d4cfc8;
    --cv-section-bg: #1e1a14;
    --header-border: #2a2520;
    --header-border-hover: #555;
    --footer-text: #6b5e54;
    --footer-text-dim: #918680;
    --footer-link: #a89b8f;
    --accent-shadow: rgba(204, 102, 102, 0.10);
    --accent-hover-bg: rgba(204, 102, 102, 0.025);
    --selection-bg: rgba(204, 102, 102, 0.25);
  }

  ::selection {
    background: var(--selection-bg);
    color: var(--accent-hover);
  }

  .site-header {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  }

  .profile-photo img {
    box-shadow:
      0 0 0 1px var(--border),
      0 4px 24px rgba(0, 0, 0, 0.25),
      4px 4px 0 var(--border);
  }

  .profile-photo img:hover {
    box-shadow:
      0 0 0 1px var(--border-mid),
      0 8px 32px rgba(0, 0, 0, 0.45),
      4px 4px 0 var(--border-mid);
  }

  /* year header: softer border in dark mode */
  h3.pub-year {
    border-bottom-color: var(--border);
  }

  .pub-entry:hover {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.28);
  }

}

/* === 404 Error Page === */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  text-align: center;
  padding: 40px 20px;
}

.error-code {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--border-mid);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.error-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}

.error-title-lang {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-left: 0.5em;
}

.error-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.error-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.error-links + .error-links {
  margin-top: 12px;
}

.error-links a {
  font-size: 0.9rem;
  padding: 8px 20px;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}

.error-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.error-links a.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.error-links a.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

/* === Print Styles === */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .social-links,
  .pub-nav,
  .link-preview,
  .lang-switcher {
    display: none;
  }

  .pub-links a::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #444;
    font-weight: normal;
  }

  main {
    padding: 0;
    animation: none;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .profile {
    gap: 24px;
  }

  .profile-photo img {
    width: 120px;
    height: 120px;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .page h1 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    padding-top: 0;
  }

  .page h2 {
    font-size: 1.3rem;
    border-left: none;
    border-bottom: 1px solid #000;
    margin-top: 20px;
    padding-bottom: 4px;
  }

  .pub-entry {
    border: none;
    border-bottom: 1px solid #eee;
    border-left: none;
    border-radius: 0;
    padding: 10px 0;
    margin-bottom: 8px;
    page-break-inside: avoid;
  }

  .pub-entry .pub-authors strong {
    background: none;
    color: #000;
  }

  h3.pub-year {
    background: transparent;
    color: #333;
    border-bottom: 1px solid #999;
    font-size: 1rem;
    display: inline-block;
  }

  .cv-item {
    border-left: 1px solid #999;
    page-break-inside: avoid;
  }

  .tag {
    background: none;
    border: 1px solid #999;
    color: #333;
  }
}
