/* Lato is self-hosted, see fonts/lato.css */

:root {
  --text: #222;
  --muted: #6b6b6b;
  --link: #1a5c80;
  --rule: #e4e4e4;
  --bg: #fff;
  --nav-height: 48px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.3; margin: 0; font-weight: 400; }

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--text); }

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header: photo with the name in a black box */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 45vh;
  min-height: 260px;
  background: url("HeaderImg.webp") center 40% / cover no-repeat;
}

.hero h1 {
  padding: 10px 24px;
  background: #000;
  color: #fff;
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.nav .container {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 0;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.open { display: flex; }
}

/* Sections */
section {
  padding: 48px 0;
  scroll-margin-top: var(--nav-height);
}

section + section { border-top: 1px solid var(--rule); }

section h2 {
  margin-bottom: 24px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

section p { margin: 0 0 12px; }

/* Experience and education entries: date column on the left */
.entry,
.pub-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0 20px;
}

.entry { margin-bottom: 26px; }
.entry:last-child { margin-bottom: 0; }

.entry h3 { font-size: 18px; }

.date,
.pub-list .year {
  font-size: 15px;
  color: var(--muted);
  padding-top: 2px;
}

.meta {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.entry p:not(.meta) { margin: 6px 0 0; }

details summary {
  display: inline-block;
  color: var(--link);
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker { display: none; }
details summary:hover { text-decoration: underline; }

/* Show/hide toggles: the summary holds a .show and a .hide label */
details .hide,
details[open] .show { display: none; }
details[open] .hide { display: inline; }

.more summary { margin-top: 4px; font-size: 14px; }
.more[open] summary { margin-bottom: 4px; }

/* Publications */
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-list li { margin-bottom: 18px; }

.pub-list a { color: var(--text); }
.pub-list a:hover { color: var(--link); }

.pub-list .meta { margin-top: 2px; font-size: 14px; }

.pub-more summary,
.pub-less { margin-left: 130px; }
.pub-more[open] summary { display: none; }

.pub-less {
  display: inline-block;
  font-size: 15px;
  text-decoration: none;
}
.pub-less:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .entry,
  .pub-list li { grid-template-columns: 1fr; }
  .pub-more summary,
  .pub-less { margin-left: 0; }
}

/* About and contact are centred */
.centered { text-align: center; }
.centered p { max-width: 640px; margin-left: auto; margin-right: auto; }
.centered .contact-links { justify-content: center; }

/* Contact */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 16px;
}

.contact-links a {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 24px;
  text-decoration: none;
}

.contact-links a:hover { color: var(--text); }

.contact-links svg { width: 1.3em; height: 1.3em; fill: currentColor; }
.contact-links svg.logo-tv { width: 1em; height: 1em; }

footer {
  padding: 24px 20px 32px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
