/* Site-level header tweaks, loaded after the theme CSS. */

/* Name and social icons on one row */
.top-header-row > .right-col,
.right-col {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center !important;
  gap: 0 1.25rem !important;
}

/* Name in the header */
header h1#title,
header h1#titleonly,
header h2#title,
header h2#titleonly,
#titletext h1#title,
#titletext h1#titleonly,
#titletext h2#title,
#titletext h2#titleonly {
  font-size: 44px !important;
  line-height: 1.1;
  margin: 0 !important;
}

/* Subtitle (if ever enabled) takes its own line under the row */
#title-description { flex-basis: 100%; }

/* Social icon row (LinkedIn, GitHub, email, ...) */
#title-social, #social { margin: 0; padding: 0; }
#social nav ul { gap: .9rem; }
#social .icons,
#social .faicon,
#social .ai {
  font-size: 2.1rem;
}

/* Avatar scales up to match the larger title */
#avatar img { width: 80px; height: 80px; }

/* Neutralise theme rules that fight the single-row layout */
[dir="ltr"] #title-social,
[dir="rtl"] #title-social,
#title-social {
  float: none !important;
  margin: 0 !important;
}
#social nav { max-width: none !important; margin: 0 !important; }
#social nav ul { flex-wrap: nowrap !important; justify-content: flex-start !important; }
#social nav li { margin: 0 !important; }
#titleonly a, #title a { margin: 0 !important; }
header nav { text-align: left; }

/* Phone width: icons wrap under the name, flush left */
@media screen and (max-width: 800px) {
  #titletext, #titleonly, #title, #titleonly a, #title a,
  #title-social, #social, #social nav, #social nav ul, #social nav li {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }
  .right-col { row-gap: .35rem !important; }
  header h1#titleonly, header h2#titleonly,
  header h1#title, header h2#title { font-size: 38px !important; }
}

.top-header-row { margin-bottom: -.6rem; }

/* Accent colour: dark blue instead of the theme purple */
:root {
  --title-color: #000080;
  --link-color: #000080;
  --primary-purple: #000080;
}

/* Main menu (home / papers / teaching / misc) */
#mainmenu nav a { font-size: 1.7rem !important; }
#mainmenu nav { padding: .35rem 0 !important; }
#mainmenu nav ul { margin: 0 !important; padding: 0 !important; line-height: 1.3; }

/* Highlight the current page in the main menu */
#mainmenu nav a.active { color: var(--hover-color) !important; }

/* Tighter vertical rhythm around the menu */
#mainmenu { margin: 0 0 1rem 0 !important; }
header { margin-bottom: 12px !important; }

/* Left-align the whole page instead of centring it */
body { margin: 20px auto 0 48px !important; }
@media screen and (max-width: 800px) {
  body { margin: 0 !important; padding: 15px !important; }
}

/* Light green box around the main menu */
#mainmenu nav {
  border: none !important;
  background: #c0dcc0;
  border-radius: 10px;
  padding: .45rem 1rem !important;
  display: block;
  box-sizing: border-box;
  width: 100%;
}

/* Wider content column so paper titles fit on one line */
body { max-width: 1090px !important; }

/* Phone width: header and menu fixes */
@media screen and (max-width: 800px) {
  .top-header-row { margin-bottom: .6rem; }
  #mainmenu nav { padding: .4rem .8rem !important; }
  #mainmenu nav ul {
    flex-wrap: wrap;
    gap: .3rem .95rem !important;
  }
  #mainmenu nav li { margin: 0 !important; }
  #mainmenu nav a {
    font-size: 1.25rem !important;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }
}

/* Active page and hover: Windows 95 desktop teal */
:root { --hover-color: #008080; }
