/* Homepage layout. Shared palette and typography are in site.css. */
.home-page {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
  padding: 0 0 4rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--home-secondary);
}

.home-page h1,
.home-page h2,
.home-page p {
  margin: 0;
}

.home-page h1,
.home-page h2 {
  font-family: Lora, Georgia, "Times New Roman", serif;
  font-weight: 600;
  color: var(--home-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.home-page h1 {
  margin-bottom: 0.25rem;
  font-size: 1.5rem;
}

.home-page h2 {
  margin-bottom: 0.75rem;
  padding: 0;
  border: 0;
  font-size: 1.375rem;
}

.home-profile-info {
  text-align: center;
}

.home-photo {
  display: block;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  margin: 0.25rem auto 1.25rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* Frame the uploaded portrait without changing the original image. */
.home-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.6);
  transform-origin: 50% 40%;
}

.home-photo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.home-introduction > p {
  margin-bottom: 1rem;
}

.home-page .home-affiliation {
  margin: 0.3rem 0;
  line-height: 1.5;
}

.home-page a {
  color: var(--home-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.home-page a:hover {
  color: #6d4630;
  border-bottom-color: currentColor;
}

.home-page a:focus-visible {
  outline: 2px solid var(--home-link);
  outline-offset: 4px;
}

.home-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.home-page .home-links > a,
.home-email > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 4px;
  color: var(--home-link);
}

.home-links svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.home-page .home-links > a:hover,
.home-email > summary:hover {
  color: #6d4630;
  background: rgba(139, 90, 60, 0.08);
}

.home-news {
  margin-top: 2.25rem;
}

.home-page .news-list {
  margin: 0 0 0 1.25rem;
  padding: 0;
  list-style: disc;
}

.home-page .news-list li {
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.news-list time {
  color: var(--home-text);
  font-size: 0.875rem;
}

.news-list time::after {
  content: " — ";
}

.news-list li > div,
.news-list p {
  display: inline;
  margin: 0;
}

@media (max-width: 900px) {
  .home-page {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-profile {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  .home-photo {
    max-width: 160px;
    margin-bottom: 0.5rem;
  }

  .home-profile-info {
    padding-top: 0.5rem;
  }
}

@media (max-width: 600px) {
  .home-profile {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .home-photo {
    max-width: 140px;
    margin: 0 auto 1rem;
  }

  .home-profile-info {
    padding: 0;
  }
}

.home-email {
  position: relative;
}

.home-email > summary {
  list-style: none;
  cursor: pointer;
}

.home-email > summary::-webkit-details-marker {
  display: none;
}

.home-email > summary:focus-visible {
  outline: 2px solid var(--home-link);
  outline-offset: 4px;
}

.email-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 10;
  width: 15rem;
  max-width: calc(100vw - 3rem);
  padding: 1rem;
  border: 1px solid var(--home-rule);
  border-radius: 6px;
  background: var(--home-background);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
  font-size: 0.875rem;
}

.email-address {
  display: block;
  width: fit-content;
  margin-bottom: 0.6rem;
  user-select: all;
}

.copy-email {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--home-rule);
  border-radius: 4px;
  color: var(--home-text);
  background: var(--home-background);
  font: inherit;
  cursor: pointer;
}

.copy-email:hover {
  border-color: var(--home-link);
}

.copy-email:focus-visible {
  outline: 2px solid var(--home-link);
  outline-offset: 3px;
}

.email-status {
  display: block;
  margin-top: 0.5rem;
}

.email-status:empty {
  display: none;
}

@media (max-width: 600px) {
  .home-links {
    position: relative;
  }

  .home-email {
    position: static;
  }

  .email-panel {
    width: min(15rem, 100%);
  }
}
