:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #1f3a5f;
  --accent-soft: #4a6a8f;
  --rule: #e4e2dc;
  --bg: #fdfcfa;
  --max: 900px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  border-top: 3px solid var(--accent);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.2rem 1.5rem 4.5rem;
}

h1,
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype",
               Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 {
  font-size: 2.05rem;
  margin: 0 0 0.2rem;
  line-height: 1.15;
}

h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 2.6rem 0 1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}

.role {
  color: var(--muted);
  margin: 0 0 1.7rem;
  font-size: 1.02rem;
  font-style: italic;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.6rem;
  margin-bottom: 2.8rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

nav a.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.profile-row {
  display: flex;
  gap: 1.9rem;
  align-items: flex-start;
  margin-bottom: 1.8rem;
}

.profile-row img {
  width: 124px;
  height: 124px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

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

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  margin: 0.7rem 0 0;
  font-size: 0.93rem;
}

.links a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.links a:hover {
  border-bottom-color: var(--accent-soft);
}

p {
  margin: 1rem 0;
}

ul {
  padding-left: 1.1rem;
  margin: 0.9rem 0;
}

li {
  margin-bottom: 0.85rem;
}

a {
  color: var(--accent);
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}

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

.entry-title {
  font-weight: 600;
}

.entry-meta {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.abstract {
  margin: 0.5rem 0 0;
  padding-left: 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-left: 2px solid var(--rule);
}

footer {
  margin-top: 4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* Tablets and small screens */
@media (max-width: 700px) {
  .wrap {
    padding: 2.4rem 1.2rem 3.5rem;
  }

  nav {
    margin-bottom: 2.2rem;
  }
}

/* Smartphones */
@media (max-width: 480px) {
  body {
    font-size: 16px;
    line-height: 1.62;
  }

  .wrap {
    padding: 2rem 1rem 3rem;
  }

  .profile-row {
    flex-direction: column;
    gap: 1rem;
  }

  .profile-row img {
    width: 112px;
    height: 112px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    margin-top: 2.2rem;
  }

  .role {
    margin-bottom: 1.2rem;
  }

  nav {
    gap: 0.55rem 1rem;
    font-size: 0.9rem;
  }

  .links {
    gap: 0.35rem 0.9rem;
  }
}
