/* Home hero */
.hero-banner { background: linear-gradient(120deg, #0b0122 0%, #1c0748 55%, #35127a 100%); color: #fff; text-align: center; padding: 3.5rem 1.5rem; border-radius: 4px; margin-bottom: 1.8rem; }
.hero-banner .hero-name { color: #fff; font-size: 2.8rem; font-weight: 500; margin: 0; }
.hero-banner .hero-name::after { content: ""; display: block; width: 130px; height: 6px; background: #a87ee8; margin: 1.1rem auto 1.1rem; }
.hero-banner .tagline { font-size: 1.35rem; font-weight: 600; color: #fff; margin: 0; }

.welcome { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.5rem; }
.welcome .profile { flex: 0 0 240px; }
.welcome img { width: 100%; border-radius: 4px; object-fit: cover; }
.profile-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.8rem; }
.profile-links a { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; background: #fff; border-radius: 6px; padding: 0.65rem 0.4rem; box-shadow: 0 1px 3px rgba(0,0,0,.12); text-decoration: none; font-size: 0.85rem; color: #34495e; }
.profile-links a i { font-size: 1.5rem; color: #4a2396; }
.profile-links a:hover { color: #4a2396; box-shadow: 0 2px 8px rgba(53,18,122,.28); }
.welcome .text { flex: 1; min-width: 260px; }
.welcome .text strong.hello { color: #2a6db3; }

/* Tiles */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.card-tile { background: #fff; border-radius: 6px; padding: 1rem 1.2rem; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.card-tile h3 { margin-top: 0; font-size: 1.1rem; }

/* Publications */
.pub { background: #fff; border-radius: 6px; padding: 0.9rem 1.2rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pub .title { font-weight: 600; color: #1f2d3b; }
.pub .meta { color: #55657a; font-size: 0.9rem; margin-top: 0.15rem; }
.pub .actions { position: relative; margin-top: 0.5rem; }
.pub .code-link { position: absolute; top: 0; left: 7.5rem; font-size: 0.92rem; line-height: 1.5; text-decoration: none; }
.pub .code-link:hover { text-decoration: underline; }
.pub summary { cursor: pointer; color: #2a6db3; font-size: 0.92rem; line-height: 1.5; width: fit-content; }
.pub details p { margin: 0.6rem 0; }
.pub figure { margin: 0.6rem 0 0; }
.pub figure img { max-width: 100%; border-radius: 4px; }
.pub figcaption { font-size: 0.78rem; color: #6a7a8c; margin-top: 0.25rem; }
.draft { background: #fff3c4; padding: 0 0.35rem; border-radius: 3px; font-size: 0.85em; color: #6b5800; }

/* Photos */
.photo { margin: 1.2rem 0; }
.photo img { max-width: 100%; border-radius: 4px; }
.photo figcaption { font-size: 0.85rem; color: #55657a; margin-top: 0.3rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1.2rem 0; align-items: start; }
.gallery .photo { margin: 0; }
.gallery .photo img { width: 100%; }

.photo.small { max-width: 520px; }

/* Phone tweaks */
@media (max-width: 600px) {
  .hero-banner { padding: 2rem 1rem; }
  .hero-banner .hero-name { font-size: 2rem; }
  .hero-banner .tagline { font-size: 1.05rem; }
  .welcome { justify-content: center; }
  .photo.small { max-width: 100%; }
}

/* Home banner image: brain sits on the right, light overlay keeps the white text readable */
.hero-banner {
  background-image: linear-gradient(rgba(10,0,30,.15), rgba(10,0,30,.15)), url("assets/banner.jpg");
  background-size: cover; background-position: right center; background-color: #0e0028;
  min-height: 300px; display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 800px) {
  .hero-banner { background-image: linear-gradient(rgba(10,0,30,.5), rgba(10,0,30,.5)), url("assets/banner.jpg"); background-position: 80% center; min-height: 220px; }
}
.profile-links p { display: contents; }

/* Centre standalone pictures and their captions */
.photo, .pub figure { margin-left: auto; margin-right: auto; text-align: center; }
.photo img, .pub figure img { display: block; margin-left: auto; margin-right: auto; }

/* Two stacked landscape photos beside one tall photo */
.photo-split { display: grid; grid-template-columns: 1fr 1.26fr; gap: 1rem; margin: 1.2rem 0; align-items: start; }
.photo-stack { display: flex; flex-direction: column; gap: 1rem; }
.photo-split .photo { margin: 0; }
.photo-split .photo img { width: 100%; }
@media (max-width: 600px) { .photo-split { grid-template-columns: 1fr; } }

/* Contact page: same white buttons as the home page, a size up */
.contact-page { text-align: center; padding-top: 0.8rem; }
.contact-email { font-size: 1.35rem; margin-bottom: 1.6rem; overflow-wrap: anywhere; }
.profile-links.contact-buttons { grid-template-columns: repeat(3, minmax(0, 190px)); justify-content: center; gap: 1rem; margin: 0 0 2rem; }
.profile-links.contact-buttons a { padding: 1.4rem 0.5rem; gap: 0.6rem; font-size: 1rem; }
.profile-links.contact-buttons a i { font-size: 2.4rem; }
.contact-place { font-size: 0.95rem; color: #55657a; }
@media (max-width: 600px) { .profile-links.contact-buttons { grid-template-columns: repeat(2, minmax(0, 160px)); } .contact-email { font-size: 1.1rem; } }

/* Keep link-button icons and labels centred and level, whatever the browser's font */
.profile-links a { justify-content: flex-start; text-align: center; min-width: 0; padding-left: 0.2rem; padding-right: 0.2rem; }
.profile-links a i { display: flex; align-items: center; justify-content: center; height: 1.2em; line-height: 1; }
.profile-links a i::before { display: block; line-height: 1; vertical-align: 0; }
.profile-links a span { display: block; width: 100%; text-align: center; white-space: nowrap; line-height: 1.3; }
.profile-links:not(.contact-buttons) a { font-size: 0.8rem; }
