:root {
  --bg: #f7f2e8;
  --bg-2: #f0e3cf;
  --ink: #201f1a;
  --muted: #6b6458;
  --accent: #c65a1f;
  --accent-2: #1f6fc6;
  --card: #fff8ed;
  --stroke: #e2d6c2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 20% 0%, var(--bg) 0%, var(--bg-2) 40%, #efe9df 100%);
}

html {
  scroll-behavior: smooth;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(246, 235, 217, 0.98), rgba(234, 222, 206, 0.98));
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}

.banner {
  background: linear-gradient(90deg, rgba(198, 90, 31, 0.16), rgba(31, 111, 198, 0.16));
  border-bottom: 1px solid var(--stroke);
}

.banner__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 6vw;
  justify-content: center;
}

.banner__text {
  font-family: "IBM Plex Serif", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  width: 100%;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 6vw;
}

.masthead__title {
  font-family: "IBM Plex Serif", serif;
  font-size: 18px;
  font-weight: 600;
}

.masthead__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.masthead__nav a {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.masthead__nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 6vw 20px;
}

.brand-name {
  font-family: "IBM Plex Serif", serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.brand-sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.lang-toggle {
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--accent);
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.content {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 40px;
  padding: 0 6vw 40px;
  flex: 1;
}

.sidebar .card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 24px;
  position: sticky;
  top: 24px;
}

.avatar {
  position: relative;
  height: 220px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f3d9b1, #f9f2e7);
  border: 1px dashed var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 18px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-info {
  margin-bottom: 18px;
}

.quick-title {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent);
}

.quick-item {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.quick-item a {
  color: var(--accent-2);
  text-decoration: none;
}

.quick-item a:hover {
  text-decoration: underline;
}

.section {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: 0 10px 25px rgba(32, 31, 26, 0.05);
  scroll-margin-top: 90px;
}

.section-highlight {
  animation: sectionFlash 1.2s ease;
  border-color: rgba(198, 90, 31, 0.6);
  box-shadow: 0 12px 30px rgba(198, 90, 31, 0.18);
}

@keyframes sectionFlash {
  0% {
    background: rgba(255, 250, 242, 0.9);
  }
  100% {
    background: rgba(255, 255, 255, 0.55);
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-title {
  font-family: "IBM Plex Serif", serif;
  font-size: 20px;
  margin: 0 0 12px;
}

.section-subtitle {
  margin: 8px 0 10px;
  font-weight: 600;
  color: var(--accent);
}

.section-note {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--stroke);
  padding: 4px 8px;
  border-radius: 999px;
}

.section-text {
  margin: 0;
  line-height: 1.6;
  color: var(--ink);
}

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

.list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--stroke);
  color: var(--ink);
}

.list li:last-child {
  border-bottom: none;
}

.pubs {
  display: grid;
  gap: 10px;
}

.pub {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fffaf2;
  line-height: 1.5;
  font-size: 14px;
}

.pub-year {
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
}

.pub-year + .pub-year {
  margin-top: 12px;
}

.pub-year-title {
  font-family: "IBM Plex Serif", serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
}

.pub-year-title::-webkit-details-marker {
  display: none;
}

.pub-year-title::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

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

.pub-year .pubs {
  margin-top: 10px;
}

.footer {
  padding: 14px 6vw 24px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .content {
    grid-template-columns: 1fr;
  }

  .sidebar .card {
    position: static;
  }

  .masthead__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
