body, html {
    height: 99%;
}

body {
    font-family: 'system-ui', 'Inter', sans-serif;
    margin: 6px;
    color: #434343;
    background-color: white;
    font-size: 17px;
    font-weight: 400;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#background-canvas {
    background-color: rgb(251, 244, 235);
    height: 200px;
    width: 400px;
    /* TODO: fix and remove display: none */
}

.bold {
    font-weight: bold;
}

section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin: 0 10px 40px 10px;
}

section.publications {
    margin-top: 90px;
}

.navbar {
    overflow: hidden;
    display: flex;
    justify-content: center;
    padding: 8px 0;
    width: 100%;
    margin: 24px auto 32px auto;
}

a {
    color: green;
}

.navbar a {
    padding: 8px 18px;
    /* margin: 0 0 10px 10px; */
    text-decoration: none;
    color: black;
    border: 1px solid transparent;
}

.navbar a.active {
    /* background-color: #f7f7f7;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.10); */
    font-weight: bold;
}

.navbar a:hover {
    text-decoration: none;
}

.navbar a.active::before {
    content: '[';
}

.navbar a.active::after {
    content: ']';
}

@media (min-width: 768px) {
    .navbar a::before,
    .navbar a::after {
        transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
        display: inline-block;
    }

    .navbar a::before {
        content: '[';
        transform: translateX(-6px);
        opacity: 0;
    }

    .navbar a::after {
        content: ']';
        transform: translateX(6px);
        opacity: 0;
    }

    .navbar a:hover::before {
        transform: translateX(0);
        opacity: 1;
    }

    .navbar a:hover::after {
        transform: translateX(0);
        opacity: 1;
    }

    .navbar a.active::before,
    .navbar a.active::after {
        transform: translateX(0);
        opacity: 1;
    }
}

a:hover {
    color: rgb(111, 111, 111);
    text-decoration: underline;
}

.no-margin {
    margin: 0;
}

.flex-row-center {
    display: flex;
    align-items: center;
    justify-content: center;
    /* border-radius: 6px;
    padding: 20px 60px;
    margin: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); */
}

.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.email {
    width: 300px;
}

.profile-image {
    height: 280px;
}

p {
    max-width: 500px;
    line-height: 1.4;
}

.profile-blurb {
    margin-left: 80px;
}

.green {
    color: rgb(11, 68, 16);
}

.site-footer {
    text-align: center;
    width: 100%;
    font-size: 0.8rem;
    padding-top: 30px;
}

.profile {
    display: block;
    margin-top: 80px;
}

.profile-name {
    font-size: 38px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.publications-header {
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.socials {
    display: flex;
    align-items: center;
    justify-content: center;
}

.socials a {
    margin: 10px 10px 0px 10px;
}

.icon:hover {
    transform: scale(1.1);
}

.centered-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

.grid-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

.grid-item {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:flex-start
}

.conference {
    display: inline-block;
    align-self: flex-start;
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 0.25em 0.75em;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 5px;
}

img.teaser {
    width: 200px;
}

.pub-title {
    margin-bottom: 5px;
}

.pub-authors {
    font-style: italic;
}

.highlight {
    background-color: yellow;
}

#nice-to-meet {
    margin-top: 40px;
}

@media (max-width: 768px) {
    .flex-row-center {
        flex-direction: column;
    }

    .profile-blurb {
        margin: 12px;
    }

    .publication {
        width: 480px;
    }

    section.intro {
        margin-top: 0px;
    }

    section.publications {
        margin-top: 50px;
    }
    .profile-image {
        height: 240px;
    }
    .profile-name {
        font-size: 32px;
    }
    .email {
        width: 300px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .publication {
        width: 340px;
    }

    .site-footer {
        font-size: 0.6rem;
    }

    .publications-header {
        font-size: 24px;
        margin-bottom: 50px;
    }
}

.grey {
    color: grey;
}

.green {
    color: green;
}


div.publications {
  display: flex;
  flex-direction: column;
  gap: 2rem; /* space between rows */
  max-width: 900px;
  margin: 0 auto;
}

.publication {
  display: grid;
  grid-template-columns: 200px 1fr; /* figure smaller, info bigger */
  align-items: center;
  gap: 0; /* no gap so edges touch */
}

.pub-figure {
  text-align: right;
}

.pub-figure img {
  max-width: 130px;
  height: auto;
  border-radius: 6px;
}

.pub-info {
  text-align: left;
  padding-left: 1rem; /* small breathing space */
}

.pub-info h3 {
  margin: 0 0 0.25rem;
}

.pub-info p {
  margin: 0.2rem 0;
  color: #333;
}

.pub-info a {
  margin-right: 0.5rem;
  color: #0066cc;
  text-decoration: none;
}

.pub-info a:hover {
  text-decoration: underline;
}

/* Responsive adjustment */
@media (max-width: 600px) {
  .publication {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .pub-figure, .pub-info {
    text-align: center;
    padding-left: 0;
  }

  .pub-figure img {
    margin-bottom: 1rem;
  }
}
