:root {
  --forest: #243b53;
  --forest-dark: #172b3a;
  --forest-soft: #edf1f5;
  --brick: #a0523c;
  --ink: #20252a;
  --muted: #657079;
  --line: #d6dce1;
  --paper: #fdfcf9;
  --white: #fff;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --page-width: 1140px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--forest);
  text-underline-offset: 4px;
}

button { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 7px 12px;
  color: var(--white);
  background: var(--forest);
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-top: 4px solid var(--forest);
  border-bottom: 1px solid var(--line);
  background: rgba(253, 253, 251, .97);
}

.header-inner {
  display: flex;
  width: min(calc(100% - 40px), var(--page-width));
  min-height: 70px;
  align-items: center;
  margin: 0 auto;
}

.brand {
  display: flex;
  min-width: 300px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-right: 11px;
  color: var(--white);
  background: var(--forest);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  gap: 27px;
  margin-left: auto;
}

.desktop-nav a {
  color: #4d5652;
  font-size: 14px;
  text-decoration: none;
}

.desktop-nav a:hover { color: var(--forest); }

.header-actions {
  display: flex;
  margin-left: 25px;
}

.language-switch,
.menu-toggle {
  border: 1px solid #bfc8c4;
  color: var(--forest);
  background: transparent;
  cursor: pointer;
}

.language-switch {
  min-width: 45px;
  height: 32px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 32px;
  margin-left: 7px;
  padding: 6px 9px;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1px;
  margin: 4px 0;
  background: var(--ink);
}

.mobile-nav {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto;
  padding: 4px 0 14px;
}

.mobile-nav a {
  display: block;
  padding: 6px 0;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.page-layout {
  display: grid;
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto;
  padding: 58px 0 88px;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 76px;
}

.profile-column {
  position: sticky;
  top: 106px;
  align-self: start;
}

.profile-portrait {
  display: block;
  width: 218px;
  height: 274px;
  border: 1px solid var(--forest-dark);
  background: var(--forest);
  object-fit: cover;
  object-position: 50% 42%;
}

.profile-column h1 {
  margin: 20px 0 5px;
  color: var(--forest-dark);
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1.25;
}

.profile-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.profile-unit {
  max-width: 245px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.profile-summary {
  max-width: 240px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.profile-details {
  margin: 23px 0 0;
  padding-top: 17px;
  border-top: 2px solid var(--forest);
}

.profile-details div { margin-bottom: 13px; }

.profile-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.profile-details dd {
  margin: 2px 0 0;
  font-size: 14px;
}

.profile-links-block {
  margin-top: 19px;
}

.profile-links-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
}

.profile-links:empty { display: none; }

.profile-links a {
  font-size: 13px;
  font-weight: 700;
}

.content-column { min-width: 0; }

.intro {
  padding: 34px 36px 38px;
  margin-bottom: 56px;
  border-top: 4px solid var(--forest);
  background: var(--forest-soft);
}

.section-eyebrow,
.section-index {
  margin: 0;
  color: var(--brick);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.intro h2 {
  max-width: 690px;
  margin: 9px 0 15px;
  color: var(--forest-dark);
  font-family: var(--serif);
  font-size: 35px;
  font-weight: 500;
  line-height: 1.28;
}

.intro > p {
  max-width: 680px;
  margin: 0;
  color: #52606b;
  font-size: 16px;
}

.intro-stats {
  display: grid;
  margin: 28px 0 0;
  padding-top: 21px;
  border-top: 1px solid #cdd6de;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.intro-stats div {
  min-width: 0;
}

.intro-stats dt {
  color: var(--forest-dark);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
}

.intro-stats dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.page-section {
  padding-bottom: 45px;
  margin-bottom: 45px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 4px 0 0;
  color: var(--forest-dark);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.3;
}

.section-heading h2::after {
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 10px;
  background: var(--brick);
  content: "";
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.section-note {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.prose p {
  margin: 0 0 14px;
  text-align: justify;
}

.research-list {
  border-top: 1px solid var(--line);
}

.research-item {
  display: grid;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
}

.research-meta time,
.research-meta span {
  display: block;
}

.research-meta time {
  color: var(--brick);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
}

.research-meta span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.research-body h3 {
  margin: 0;
  color: var(--forest-dark);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
}

.research-body p {
  margin: 7px 0 0;
  font-size: 14px;
}

.research-body .research-venue {
  margin-top: 2px;
  color: var(--brick);
  font-size: 12px;
  font-weight: 700;
}

.project-list {
  display: grid;
  gap: 18px;
}

.project-card {
  display: grid;
  min-height: 224px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  grid-template-columns: 235px minmax(0, 1fr);
}

.project-card-poster .project-visual {
  min-height: 0;
  align-self: start;
  aspect-ratio: 4 / 5;
  background: #4d493f;
}

.project-card-poster .project-image { background: #4d493f; }

.project-visual {
  display: flex;
  position: relative;
  min-height: 224px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 19px;
  overflow: hidden;
  color: var(--forest-dark);
  border-right: 1px solid var(--line);
  background: #e4eaf0;
}

.project-image {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #e4eaf0;
}

.project-image-cover { object-fit: cover; }

.project-image-contain { object-fit: contain; }

.project-visual-link {
  text-decoration: none;
}

.project-visual-link:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: -3px;
}

.project-visual::before,
.project-visual::after {
  position: absolute;
  background: rgba(36, 59, 83, .22);
  content: "";
}

.project-visual::before {
  width: 1px;
  height: 100%;
  top: 0;
  left: 42%;
}

.project-visual::after {
  width: 100%;
  height: 1px;
  top: 41%;
  left: 0;
}

.project-number,
.project-year {
  position: relative;
  z-index: 1;
}

.project-number {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
}

.project-year {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
}

.project-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 28px 30px;
}

.project-type {
  margin: 0 0 5px;
  color: var(--brick);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.project-body h3 {
  margin: 0;
  color: var(--forest-dark);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
}

.project-summary {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.project-tags li {
  padding: 3px 7px;
  color: #4f5d69;
  border: 1px solid var(--line);
  background: #f8f9fa;
  font-size: 11px;
  line-height: 1.4;
}

.project-link,
.project-status {
  align-self: flex-start;
  margin-top: auto;
  font-size: 13px;
  font-weight: 800;
}

.project-status {
  color: var(--muted);
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 15px;
}

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

.news-list time {
  color: var(--brick);
  font-family: var(--serif);
  font-weight: 700;
}

.news-list span {
  margin: 0;
  font-size: 14px;
}

footer {
  display: grid;
  width: min(calc(100% - 40px), var(--page-width));
  min-height: 74px;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  margin: 0 auto;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

footer a { color: var(--muted); }

.footer-owner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-self: start;
}

.updated {
  justify-self: center;
}

#icp-link {
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font-size: 12px;
}

#back-to-top {
  justify-self: end;
}

:focus-visible {
  outline: 2px solid var(--brick);
  outline-offset: 3px;
}

@media (max-width: 880px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
}

@media (max-width: 720px) {
  .header-inner,
  .mobile-nav,
  .page-layout,
  footer {
    width: min(calc(100% - 30px), var(--page-width));
  }

  .brand {
    min-width: 0;
    max-width: calc(100vw - 145px);
  }
  .brand-copy { min-width: 0; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { font-size: 11px; }
  .header-actions { margin-left: auto; }

  .page-layout {
    display: block;
    padding-top: 36px;
  }

  .profile-column {
    display: grid;
    position: static;
    padding-bottom: 34px;
    margin-bottom: 34px;
    border-bottom: 1px solid var(--line);
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: 19px;
  }

  .profile-portrait {
    width: 112px;
    height: 142px;
    grid-row: 1 / 6;
  }

  .profile-column h1 { margin-top: 0; font-size: 26px; }
  .profile-title { font-size: 13px; }
  .profile-unit { margin-top: 2px; font-size: 12px; }
  .profile-summary { margin-top: 7px; font-size: 12px; }
  .profile-details,
  .profile-links-block { grid-column: 1 / -1; }

  .intro { padding: 28px 24px 30px; }
  .intro h2 { font-size: 29px; }
  .intro-stats { gap: 12px; }
  .intro-stats dt { font-size: 19px; }
  .prose p { text-align: left; }

  .research-item {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 17px;
  }

  .project-card { grid-template-columns: 210px minmax(0, 1fr); }
  .project-visual { min-height: 258px; }
  .project-body { padding: 24px; }

  footer {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 2px;
    padding: 16px 0;
  }

  .updated,
  #back-to-top { justify-self: start; }
}

@media (max-width: 600px) {
  .project-card { grid-template-columns: 1fr; }
  .project-visual {
    height: 320px;
    min-height: 320px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-card-poster .project-visual {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 480px) {
  .brand-mark { display: none; }
  .section-heading-row { align-items: flex-start; flex-direction: column; gap: 9px; }

  .research-item {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .news-list li {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
