:root {
  --text-color: #2b2b2b;
  --muted-color: #6b6b6b;
  --accent-color: #b54a3c;
  --link-color: #1a5fb4;
  --border-color: #e8e6e1;
  --surface-color: #fafafa;
  --max-width: 1040px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #ffffff;
  color: var(--text-color);
  font-family: "Iowan Old Style", "Palatino Linotype", "Georgia", serif;
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

h1, h2, h3 {
  font-family: "Georgia", "Iowan Old Style", serif;
  font-weight: normal;
  letter-spacing: 0.01em;
}

/* Header & navigation */

.site-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.75rem 0;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.site-title {
  font-family: "Georgia", "Iowan Old Style", serif;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--text-color);
}

.site-title:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.site-nav a {
  position: relative;
  margin-left: 1.5rem;
  color: var(--muted-color);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-nav a:first-child {
  margin-left: 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background-color: var(--accent-color);
  transition: right 0.2s ease;
}

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

.site-nav a.active::after,
.site-nav a:hover::after {
  right: 0;
}

/* Main content */

main {
  padding: 4rem 1.5rem 10rem;
  min-height: 60vh;
}

h1 {
  font-size: 2.2rem;
  margin: 0 0 1.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

section + section {
  margin-top: 5rem;
}

h2 {
  font-size: 1.35rem;
  margin: 0 0 0.3rem;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

/* About section */

.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 4.5rem;
}

.profile-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 3rem;
  padding-top: 2rem;
}

.page-content {
  flex: 1;
  min-width: 0;
}

.profile-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px var(--border-color), 0 6px 20px rgba(0, 0, 0, 0.07);
}

.profile-name {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 1.25rem 0 0.3rem;
  white-space: nowrap;
}

.profile-tagline {
  margin: 0;
  color: var(--accent-color);
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.profile-social {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.profile-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  color: var(--muted-color);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-social a:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  text-decoration: none;
}

.profile-social svg {
  width: 1.15rem;
  height: 1.15rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Entries (Research / Resume) */

.entry {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
}

.entry:first-of-type {
  margin-top: 1.75rem;
  padding-top: 0;
  border-top: none;
}

.entry + h2 {
  margin-top: 3.5rem;
}

.entry-meta {
  color: var(--muted-color);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  font-style: italic;
}

/* Teaching entries */

.teaching-entry {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.teaching-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.teaching-body h2 {
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
}

.teaching-body .entry-meta {
  margin: 0;
}

.teaching-body p:not(.entry-meta) {
  margin: 0.4rem 0 0;
}

/* Publication cards */

.pub-card {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-top: 2rem;
  padding: 1.75rem;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pub-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.pub-thumb {
  width: 130px;
  height: 130px;
  object-fit: contain;
  background-color: #ffffff;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0 0 0.35rem;
}

.pub-authors {
  margin: 0;
  color: var(--text-color);
}

.pub-venue {
  margin: 0.15rem 0 0.6rem;
  color: var(--muted-color);
  font-size: 0.92rem;
  font-style: italic;
}

.pub-description {
  margin: 0 0 0.6rem;
}

.pub-link {
  font-size: 0.95rem;
  font-weight: bold;
}

@media (max-width: 600px) {
  .pub-card {
    flex-direction: column;
  }

  .pub-thumb {
    width: 100%;
    height: auto;
    max-height: 200px;
  }

  .page-layout {
    flex-direction: column;
  }

  .profile-panel {
    position: static;
    width: auto;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 1.75rem 0;
  color: var(--muted-color);
  font-size: 0.88rem;
}
