html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* make layout a column so footer lives after content */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #1e1e2f; /* body text color */
  background: white; /* default — pages override */
  box-sizing: border-box;
}

/* ===========================
   Header / Navigation (global)
   =========================== */
header {
  background: rgba(0,0,0,0.18);
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
  z-index: 10;
}

header a,
header nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

header a:hover,
header nav a:hover {
  color: #ffd166;   /* pastel yellow hover */
  text-decoration: none;
}

/* ===========================
   Homepage layout (main.home-container)
   =========================== */
main.home-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 0 auto;
  gap: 80px;
  padding: 40px;
  box-sizing: border-box;

  background-color: #a3a8f9; /* pastel indigo */
  color: #1e1e2f;
  min-height: 100vh; /* push footer below the fold */
}

/* homepage left/right blocks */
.home-left,
.home-right {
  flex: 0 1 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* profile picture styles (homepage) */
.home-left img.profile {
  max-width: 250px;
  border-radius: 20px;
  margin-bottom: 20px;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transition: transform 0.25s ease;
}
.home-left img.profile:hover {
  transform: scale(1.05);
}

.home-right h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #2c2c54;
}

.home-right p {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #1e1e2f;
}

/* Homepage nav links (under name) */
.home-right nav a {
  display: inline-block;
  margin: 0 25px;  /* wider spacing */
  color: #ffffff;
  font-weight: bold;
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.home-right nav a:hover {
  color: #ffd166; /* pastel yellow hover */
  text-decoration: none;
}

/* ===========================
   Subpages (research, talks, about, cv, ...) 
   =========================== */
body.subpage {
  background-color: #a3a8f9; /* pastel indigo */
  color: #1e1e2f;
}

/* main content column for subpages */
body.subpage main {
  flex: 1 0 auto;
  min-height: 100vh;       
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
  text-align: left;        /* main content flush-left */
}

/* Center ONLY the big page title on subpages */
body.subpage main h1 {
  text-align: center;
  color: #2c2c54;
  margin-bottom: 1rem;
  font-size: 3rem;
}

/* section headings and lists flush-left */
body.subpage main h2 {
  font-size: 2rem;
  margin-top: 2rem;
  color: #2c2c54;
  margin-bottom: 0.5rem;
}

body.subpage main ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

body.subpage main li {
  margin: 0.75rem 0;
  line-height: 1.6;
  color: #1e1e2f;
}

/* inline links inside main for subpages */
body.subpage main a,
main a {
  color: #3b3bb3;     /* indigo-blue */
  text-decoration: none;
  font-weight: bold;
}

body.subpage main a:hover,
main a:hover {
  color: #ffd166;   /* pastel yellow hover */
  text-decoration: none;
}

/* Subpage header */
body.subpage header {
  background: rgba(0,0,0,0.18);
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

body.subpage header a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s;
}

body.subpage header a:hover {
  color: #ffd166;
  text-decoration: none;
}

/* About page photo */
.about-photo {
    display: flex;
    justify-content: center;  /* center horizontally */
    margin: 2rem 0;           /* spacing above and below */
}

.about-photo img {
    max-width: 80%;            /* scale down to fit container */
    border-radius: 20px;       /* smooth corners as profile */
    /* border: 4px solid #ffd166; /* pastel yellow border like link hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.about-photo img:hover {
    transform: scale(1.03);    /* subtle zoom on hover */
}



/* ===========================
   Footer (global)
   =========================== */
footer {
  text-align: center;
  padding: 10px;
  background: #2c2c54;  /* deep indigo footer (unified) */
  color: #ffffff;
  font-size: 0.9rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  /* stack homepage blocks vertically and reverse order */
  main.home-container {
    flex-direction: column-reverse; /* right block on top, left block below */
    gap: 20px;
    padding: 20px;
    min-height: auto;
    align-items: center;
    text-align: center;
  }

  .home-left img.profile {
    max-width: 180px;
  }

  .home-right h1 {
    font-size: 2rem;
  }

  .home-right p {
    font-size: 1.2rem;
  }

  /* make homepage nav links vertical and slightly bigger */
  .home-right nav {
    display: flex;
    flex-direction: column;
    gap: 15px;  /* spacing between links */
    align-items: center;
  }

  .home-right nav a {
    font-size: 1.7rem; /* slightly bigger */
    margin: 0;          /* reset horizontal margin */
  }

  header a {
    font-size: 1rem;
    margin: 0 10px;
  }
}
