/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #1a1614;
  --text: #e8e3df;
  --text-muted: #b8afa6;
  --text-faint: #8f857c;
  --border: #3d3630;
  --link: #d4a574;
  --link-hover: #e8c08a;
  --heading: #f0ebe6;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font-serif);
}

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

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

cite {
  font-style: italic;
}

/* Layout */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Header */

.site-header {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.profile-image {
  flex-shrink: 0;
  width: 140px;
  height: 175px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.profile-info h1 {
  margin-bottom: 0.35rem;
  color: var(--heading);
  font: 600 1.75rem/1.2 var(--font-sans);
  letter-spacing: -0.01em;
}

.affiliation,
.contact {
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  font: 0.95rem var(--font-sans);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.6rem;
  font: 0.9rem var(--font-sans);
}

.profile-links a:not(:last-child)::after {
  content: "·";
  margin-left: 0.75rem;
  color: var(--text-faint);
  text-decoration: none;
}

/* Intro */

.intro {
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.intro p + p {
  margin-top: 0.75rem;
}

.intro a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

.intro a:hover {
  color: var(--link);
  text-decoration-color: var(--link);
}

/* Collapsible sections */

.collapsible {
  margin-bottom: 1.5rem;
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.collapsible-header h2 {
  color: var(--heading);
  font: 600 1.15rem var(--font-sans);
  letter-spacing: 0.01em;
}

.collapsible-toggle {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.toggle-icon {
  display: block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--text-muted);
  transform-origin: 30% 50%;
  transition: transform 0.15s ease;
}

.collapsible:not(.collapsed) .toggle-icon {
  transform: rotate(90deg);
}

.collapsible-toggle:hover .toggle-icon {
  border-left-color: var(--link);
}

.collapsible.collapsed .collapsible-body {
  display: none;
}

/* News timeline */

.timeline {
  list-style: none;
}

.timeline li {
  display: flex;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

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

.timeline time {
  flex-shrink: 0;
  width: 4.5rem;
  color: var(--text-faint);
  font: 0.85rem var(--font-sans);
}

.timeline p {
  flex: 1;
}

.timeline cite {
  color: var(--text);
}

/* Entries (experience & research) */

.entries {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
}

.entry h3 {
  margin-bottom: 0.15rem;
  color: var(--heading);
  font: 600 1rem var(--font-sans);
}

.entry h3 a {
  color: var(--heading);
  text-decoration: none;
}

.entry h3 a:hover {
  color: var(--link);
  text-decoration: underline;
}

.entry-meta {
  margin-bottom: 0.35rem;
  color: var(--text-faint);
  font: 0.85rem var(--font-sans);
}

.entry p:last-child {
  color: var(--text-muted);
}

/* Responsive */

@media (max-width: 640px) {
  .page {
    padding: 1.75rem 1rem 3rem;
  }

  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-image {
    width: 120px;
    height: 150px;
  }

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

  .timeline li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .timeline time {
    width: auto;
  }
}
