:root {
  --text: #3f4447;
  --heading: #1f2325;
  --muted: #73777a;
  --border: #e6e0dc;
  --link: #9b2f24;
  --bg: #fcfbfa;
  --panel: #ffffff;
  --soft: #f8f3f1;
  --max: 1360px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-150%);
  background: var(--heading);
  color: #fff;
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.masthead {
  border-top: 3px solid var(--link);
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.95rem 1.25rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--heading);
  font-weight: 700;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 0.32rem;
  height: 1.12rem;
  border-radius: 2px;
  background: var(--link);
}

.title-dot {
  color: var(--muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.92rem;
}

.nav-links a {
  padding-bottom: 0.18rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--heading);
  text-decoration: none;
}

.nav-links a.active {
  border-bottom-color: var(--link);
  font-weight: 700;
}

.page {
  display: grid;
  grid-template-columns: minmax(235px, 260px) minmax(0, 1fr) 240px;
  gap: 2.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.6rem 1.25rem 3rem;
}

.sidebar {
  min-width: 0;
}

.news-sidebar {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding-right: 1.35rem;
  border-right: 1px solid var(--border);
}

.profile-sidebar {
  grid-column: 3;
  grid-row: 1;
  padding-left: 1.35rem;
  border-left: 1px solid var(--border);
}

.profile {
  position: sticky;
  top: 1.5rem;
}

.profile-photo {
  display: block;
  width: 156px;
  height: 156px;
  margin: 0 0 1.2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  object-fit: cover;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.45rem;
  color: var(--heading);
  font-size: 1.34rem;
  line-height: 1.2;
}

.bio {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.profile-name {
  margin-bottom: 0.2rem;
  color: var(--heading);
  font-size: 0.95rem;
  line-height: 1.35;
}

.profile-list {
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  list-style: none;
}

.profile-list li,
.profile-list a {
  display: flex;
  align-items: flex-start;
  gap: 0.62rem;
}

.profile-list li + li {
  margin-top: 0.62rem;
}

.profile-list a {
  width: fit-content;
  color: var(--text);
}

.profile-list a:hover {
  color: var(--link);
  text-decoration: none;
}

.profile-list a:hover .icon {
  border-color: var(--link);
  color: var(--link);
  background: #fff;
  box-shadow: 0 2px 8px rgba(155, 47, 36, 0.12);
}

.profile-list a:hover span:last-child {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.news {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.news-sidebar .news {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 1.5rem);
  height: calc(100dvh - 1.5rem);
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.news h2 {
  margin-bottom: 0.72rem;
  color: var(--heading);
  font-size: 0.95rem;
  line-height: 1.25;
}

.news-list {
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1.38;
  list-style: none;
}

.news-sidebar .news-list {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  margin-right: -0.55rem;
  padding-right: 0.45rem;
  border-right: 1px solid rgba(155, 47, 36, 0.16);
  background:
    linear-gradient(var(--bg) 30%, rgba(252, 251, 250, 0)),
    linear-gradient(rgba(252, 251, 250, 0), var(--bg) 70%) 0 100%,
    linear-gradient(rgba(31, 35, 37, 0.12), rgba(31, 35, 37, 0)),
    linear-gradient(rgba(31, 35, 37, 0), rgba(31, 35, 37, 0.13)) 0 100%;
  background-attachment: local, local, scroll, scroll;
  background-repeat: no-repeat;
  background-size: 100% 1.15rem, 100% 1.15rem, 100% 0.65rem, 100% 0.65rem;
  scrollbar-color: rgba(155, 47, 36, 0.58) rgba(155, 47, 36, 0.08);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.news-sidebar .news-list::-webkit-scrollbar {
  width: 0.48rem;
}

.news-sidebar .news-list::-webkit-scrollbar-track {
  background: rgba(155, 47, 36, 0.08);
  border-radius: 999px;
}

.news-sidebar .news-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(155, 47, 36, 0.55);
}

.news-sidebar .news-list::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 47, 36, 0.72);
}

.news-list li {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.48rem 0;
  border-top: 1px solid rgba(230, 224, 220, 0.72);
}

.news-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.news-list time {
  color: var(--link);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.news-list span {
  color: var(--text);
}

.news-list a {
  color: var(--heading);
  text-decoration: underline;
  text-decoration-color: rgba(155, 47, 36, 0.28);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.news-list a:hover {
  color: var(--link);
  text-decoration-color: currentColor;
}

.icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: -0.05rem;
  border: 1px solid rgba(155, 47, 36, 0.2);
  border-radius: 7px;
  background: #fff;
  color: var(--link);
  box-shadow: 0 1px 0 rgba(31, 35, 37, 0.04);
}

.icon svg {
  width: 0.96rem;
  height: 0.96rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content {
  grid-column: 2;
  grid-row: 1;
  max-width: 760px;
  min-width: 0;
}

.section {
  padding-bottom: 1.8rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: 0;
}

h2 {
  margin-bottom: 0.85rem;
  color: var(--heading);
  font-size: 1.62rem;
  line-height: 1.25;
}

.year-heading {
  margin: 1.9rem 0 0.65rem;
  color: var(--heading);
  font-size: 1.05rem;
  line-height: 1.25;
}

h2 + .year-heading {
  margin-top: 0.6rem;
}

p {
  margin-bottom: 1rem;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

li + li {
  margin-top: 0.45rem;
}

.paper-list {
  padding-left: 0;
  list-style: none;
}

.paper-list li {
  padding: 0.9rem 0 0.9rem 0.95rem;
  border-left: 2px solid var(--border);
  border-top: 0;
}

.paper-list li:first-child {
  padding-top: 0;
}

.paper-list li:hover {
  border-left-color: var(--link);
}

.paper-title {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--heading);
  font-weight: 700;
}

a.paper-title {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(155, 47, 36, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a.paper-title:hover {
  color: var(--link);
  text-decoration-color: currentColor;
}

.paper-authors,
.paper-meta {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.paper-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.55rem;
  padding: 0.08rem 0.5rem;
  border: 1px solid rgba(155, 47, 36, 0.28);
  border-radius: 999px;
  background: var(--soft);
  color: var(--link);
  line-height: 1.2;
}

.paper-links a::before {
  content: "";
  width: 0.78rem;
  height: 0.78rem;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E") center / contain no-repeat;
}

.paper-links a:hover {
  border-color: var(--link);
  background: #fff;
  text-decoration: none;
}

.service-list {
  padding-left: 0;
  list-style: none;
}

.service-list li {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.42rem 0;
  border-top: 1px solid rgba(230, 224, 220, 0.75);
}

.service-list li:first-child {
  border-top: 0;
}

.service-year {
  color: var(--link);
  font-size: 0.9rem;
  font-weight: 700;
}

.talk-list .paper-meta {
  margin-top: 0.1rem;
}

.more-link {
  margin-top: 0.8rem;
  color: var(--muted);
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--soft);
  color: var(--heading);
  font-weight: 700;
}

.button-link:hover {
  border-color: var(--link);
  color: var(--link);
  text-decoration: none;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 2.2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 780px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .nav-links {
    gap: 0.85rem;
  }

  .page {
    display: flex;
    flex-direction: column;
    padding-top: 1.7rem;
  }

  .profile {
    position: static;
  }

  .profile-sidebar {
    order: 1;
    padding: 0 0 1.7rem;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .news-sidebar {
    order: 2;
    padding: 1.7rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .news-sidebar .news {
    position: static;
    height: min(32rem, calc(100vh - 3.4rem));
    height: min(32rem, calc(100dvh - 3.4rem));
  }

  .profile-photo {
    width: 118px;
    height: 118px;
    border-radius: 6px;
  }

  .content {
    order: 3;
    max-width: none;
  }
}
