
/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Merriweather',-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    line-height: 1.5;
    color: #222;
    background: #fafafa;
    padding: 0 1rem;
}

p{
  margin:0 0 0.5em;   /* top right bottom left */
}

a {
    color: #0063c5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2 {
    font-weight: 500;
}

h2 {
    margin-top: 0rem;
    margin-bottom: 0.2rem;
    border-bottom: 1px solid #eee;
    display: inline-block;
    padding-bottom: 0rem;
}

ul {
    list-style-type: disc;
    margin-left: 1.2rem;
}

header{
  /* give the header the same fixed width as <main> */
  max-width:600px;        /* ← same number used by <main> */
  margin:0 auto 1rem;     /* center the whole header block */

  display:flex;
  flex-wrap:wrap;
  align-items:center;

  /* push the text block hard left and the photo hard right */
  justify-content:space-between;

  /* left-align the text inside the <div class="intro"> */
  text-align:left;

  padding:2rem 0 1rem 0;
  border-bottom:1px solid #ddd;
}

.avatar{
  width:160px;
  height:160px;
  border-radius:50%;
  object-fit:cover;
  margin-left:1.5rem;   /* gap between the two columns */
  margin-right:1.5rem;
  box-shadow:0 3px 5px rgba(0,0,0,.2);
}

.pub-list li {
    margin-bottom: 1rem;
}

.pub-title {
    font-weight: bold;
}

main {
    max-width: 600px;
    margin: 0 auto;
}

section {
    margin-bottom: 1.2rem;
}

footer {
    text-align: center;
    font-size: .8rem;
    color: #666;
    padding: 1.5rem 0;
    border-top: 1px solid #ddd;
    margin-top: 2rem;
}

/* Responsive tweaks */
@media (max-width:600px){
  header{
    flex-direction:column-reverse; /* stack text above photo on small screens */
    align-items:center;
    text-align:center;
  }
  .avatar{margin:1rem 0 0 0;} /* tidy margin when stacked */
}