:root {
  --bg: #fdfcfb;
  --text: #262421;
  --muted: #6b6660;
  --accent: #3a5a52;
  --border: #e6e2dc;
  --max-width: 760px;
  --palette-1: #bb7125;
  --palette-2: #ebd3a2;
  --palette-3: #6b7140;
  --palette-4: #34454c;
  --preview-1: #bb7125;
  --preview-2: #ebd3a2;
  --preview-3: #6b7140;
  --preview-4: #34454c;
}

* {
  box-sizing: border-box;
}

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

.color-stripe {
  display: flex;
  height: 18px;
}

.color-stripe span {
  flex: 1;
}

.color-stripe span:nth-child(1) { background: var(--palette-1); }
.color-stripe span:nth-child(2) { background: var(--palette-2); }
.color-stripe span:nth-child(3) { background: var(--palette-3); }
.color-stripe span:nth-child(4) { background: var(--palette-4); }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

nav {
  display: flex;
  gap: 1.75rem;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

nav a::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, 0) scale(0.5);
  pointer-events: none;
}

nav a:nth-child(1)::before { background: var(--palette-1); }
nav a:nth-child(2)::before { background: var(--palette-2); }
nav a:nth-child(3)::before { background: var(--palette-3); }
nav a:nth-child(4)::before { background: var(--palette-4); }

nav a:hover::before {
  animation: nav-bounce 0.6s cubic-bezier(0.28, 0.84, 0.42, 1) forwards;
}

@keyframes nav-bounce {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.5);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -20px) scale(1.05);
  }
  65% {
    transform: translate(-50%, -8px) scale(0.95);
  }
  85% {
    transform: translate(-50%, -14px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -11px) scale(1);
  }
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  color: var(--text);
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.tagline {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

a {
  color: var(--accent);
}

.profile {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.profile-left {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
  width: 100%;
}

.social-links a,
.social-links .social-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.social-links a:hover {
  color: var(--accent);
}

.social-links svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
}

.profile-right {
  flex: 1;
  min-width: 0;
}

section p {
  margin: 0 0 1rem;
}

.entry {
  margin-bottom: 1.5rem;
}

.entry-title {
  display: block;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.entry-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.4rem;
}

.entry-authors {
  display: block;
  color: var(--muted);
  font-weight: normal;
  font-style: normal;
  font-size: 0.9rem;
  margin: 0 0 0.2rem;
}

.entry-authors a {
  text-decoration: underline;
}

.entry-abstract {
  font-style: italic;
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

footer {
  margin: 4rem 0 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.palette-credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  row-gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.palette-credit .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.palette-credit .swatch:nth-child(1) { background: var(--palette-1); }
.palette-credit .swatch:nth-child(2) { background: var(--palette-2); }
.palette-credit .swatch:nth-child(3) { background: var(--palette-3); }
.palette-credit .swatch:nth-child(4) { background: var(--palette-4); }

.color-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.3rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
}

.color-switch-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-preview {
  display: inline-flex;
  gap: 3px;
}

.btn-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.btn-preview-dot:nth-child(1) { background: var(--preview-1); }
.btn-preview-dot:nth-child(2) { background: var(--preview-2); }
.btn-preview-dot:nth-child(3) { background: var(--preview-3); }
.btn-preview-dot:nth-child(4) { background: var(--preview-4); }

.paper-link {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  text-decoration: none;
}

.paper-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pub-entry summary {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  list-style: none;
}

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

.pub-entry .entry-heading {
  display: flex;
  flex-direction: column;
}

.pub-entry .entry-arrow {
  margin-top: 0.4rem;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--palette-2);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.pub-entry[open] .entry-arrow {
  transform: rotate(90deg);
}

.pub-entry .entry-abstract {
  margin: 0.75rem 0 0 1.15rem;
}

.music-entry .entry-arrow {
  border-left-color: var(--palette-4);
}

.music-entry .entry-title {
  flex: 1;
}

.speaker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  color: var(--palette-4);
}

.speaker-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.speaker-btn:hover {
  opacity: 0.7;
}

@media (max-width: 560px) {
  .profile {
    flex-direction: column;
    align-items: center;
  }

  .profile-left {
    flex: none;
  }
}
