/* Colours and fonts. Change these to restyle the whole site. */
:root {
  --bg: #000;
  --text: #fff;
  --muted: #b5b3ae;
  --link: #e8e6e1;
  --rule: #333;
  --panel: rgba(0, 0, 0, 0.88);
  --heading-font: "Playfair Display", Georgia, serif;
  --body-font: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --width: 46rem;
}

* { box-sizing: border-box; }

html { font-size: 112.5%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.6;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--text); color: var(--bg); padding: .5rem; z-index: 10; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  position: relative;
  z-index: 5;
}
.site-title {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
}
.site-header nav a { margin-left: 1.25rem; text-decoration: none; }
.site-header nav a:first-child { margin-left: 0; }
.site-header nav a:hover { text-decoration: underline; }

/* Full-width photo panels. Each photo stays put while the text
   column scrolls over it, then the next panel's photo takes over. */
.panel { position: relative; }
.panel-bg {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.panel-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, center);
}
.panel-content {
  position: relative;
  margin-top: -100vh;
  margin-top: -100svh;
  padding: 80vh 1.5rem 30vh;
}
.column {
  max-width: var(--width);
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--panel);
}

/* Plain pages without a photo (e.g. 404) */
.plain { max-width: var(--width); margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* Text */
h1, h2, h3 { font-family: var(--heading-font); font-weight: 400; line-height: 1.2; }
h1 { font-size: 2.6rem; margin: 0; }
h2 { font-size: 2rem; margin: 3rem 0 1rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.column > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

img { max-width: 100%; height: auto; display: block; }

blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 2px solid var(--muted); }
blockquote p { margin: 0 0 .5rem; }
blockquote cite { color: var(--muted); font-style: normal; }

.button {
  display: inline-block;
  border: 1px solid var(--text);
  padding: .6rem 1.2rem;
  margin-bottom: 1rem;
  text-decoration: none;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .85rem;
  background: none;
  color: var(--text);
  font-family: var(--body-font);
  cursor: pointer;
}
.button:hover { background: var(--text); color: var(--bg); }

.callout { font-style: italic; font-size: 1.3rem; font-family: var(--heading-font); margin: 0; }

ul { padding-left: 1.2rem; }
li { margin-bottom: .5rem; }

/* Resume: click a job to open it */
details { border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: .9rem;
  font-size: 1.4rem;
  color: var(--muted);
}
details[open] summary::after { content: "–"; }
.job { display: block; font-family: var(--heading-font); font-size: 1.25rem; }
.dates { display: block; color: var(--muted); font-style: italic; }
details p { margin: 0 0 1.25rem; }

/* Contact form */
form label { display: block; margin: 1rem 0 .3rem; }
form input, form textarea {
  width: 100%;
  padding: .6rem;
  font: inherit;
  color: var(--text);
  background: #111;
  border: 1px solid #555;
}
form input:focus, form textarea:focus { outline: 2px solid var(--text); outline-offset: 1px; }
form .row { display: flex; gap: 1rem; }
form .row > div { flex: 1; }
form .hp { position: absolute; left: -9999px; }
form button { margin-top: 1.25rem; }

/* Footer */
.site-footer {
  position: relative;
  max-width: var(--width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 600px) {
  html { font-size: 100%; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .column { padding: 1.5rem; }
  .panel-content { padding: 70vh .75rem 25vh; }
  form .row { display: block; }
}

/* The "available for consulting" box scrolls past on its own before the next column */
.callout-box { margin-bottom: 70vh; }

.spaced { margin-top: 40vh; }
