/* Project Glen - site styles
   Layout is mobile first: the base styles below are the phone view,
   and the "Widescreen" section at the bottom switches to a sidebar
   on the left with the content on the right.
   Look and feel follows the team poster: ERAU blue bands, uppercase
   headings with thin rules, white everywhere else. */

/* Colors - change these and the whole site follows */

:root {
  --erau-blue: #03539E;
  --erau-yellow: #FFCB06;
  --erau-accent: #01B2E3;
  --erau-darkblue: #1C2B57;

  --text: #222;
  --muted: #666;
  --line: #d4d4d4;
  --tint: #eef3f9;
}

/* Fonts - "rift-soft" comes from the Adobe Fonts kit linked in index.html */

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

h1, h2, h3, nav, .system .name, .pic, .updates .date {
  font-family: "rift-soft", sans-serif;
}

/* Base (phone) layout */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--erau-blue);
}

a:visited {
  color: var(--erau-darkblue);
}

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

/* Header: a blue poster-style banner on phones */

.masthead {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 -16px;
  padding: 20px 16px;
  background: var(--erau-blue);
  color: #fff;
}

.avatar {
  flex: none;
  width: 84px;
  height: 84px;
  padding: 8px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

h1 {
  margin: 0;
  font-size: 2.2em;
  font-weight: 500;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tagline {
  margin: 6px 0 0;
  font-size: 0.9em;
  line-height: 1.35;
}

.intro {
  margin-top: 16px;
}

.intro p {
  margin: 0 0 10px;
}

nav {
  margin-top: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 1.1em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a,
nav a:visited {
  color: var(--erau-darkblue);
  text-decoration: none;
}

nav a:hover {
  color: var(--erau-blue);
  text-decoration: underline;
}

.affil {
  display: none;
  color: var(--muted);
  font-size: 0.8em;
  line-height: 1.5;
}

/* Sections */

section {
  margin-top: 40px;
  scroll-margin-top: 24px;
}

/* Section headings: uppercase with a rule running off to the right, like the poster */
h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  font-size: 1.9em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--erau-darkblue);
}

h2::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--muted);
}

h3 {
  margin: 28px 0 8px;
  font-size: 1.35em;
  font-weight: 500;
  line-height: 1.25;
  color: var(--erau-blue);
}

.muted {
  color: var(--muted);
  font-size: 0.9em;
}

/* About: the three parts of the system */

.system {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.system li {
  padding: 14px 16px;
  border-left: 4px solid var(--erau-blue);
  background: var(--tint);
}

.system .name {
  display: block;
  font-size: 1.3em;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--erau-darkblue);
}

/* Research entries, separated by rules like the portfolio layout */

.entry {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.entry:last-child {
  border-bottom: none;
}

.entry h3 {
  margin-top: 24px;
}

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

/* Photo galleries */

.feature {
  display: block;
  margin-top: 16px;
}

.feature img {
  width: 100%;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.gallery.thirds img {
  aspect-ratio: 4 / 3;
}

/* On phones the third photo spans the full width instead of leaving a gap */
.gallery.thirds a:last-child {
  grid-column: 1 / -1;
}

.gallery.thirds a:last-child img {
  aspect-ratio: 16 / 9;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85em;
}

/* Team */

.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.3;
}

.pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--erau-blue);
  font-size: 1.8em;
  font-weight: 500;
  object-fit: cover;
  object-position: center 20%;
}

.thanks,
.links {
  margin: 0;
  padding-left: 20px;
}

/* Updates */

.updates {
  border-collapse: collapse;
}

.updates td {
  padding: 4px 0;
  vertical-align: top;
}

.updates .date {
  width: 90px;
  padding-right: 12px;
  font-size: 1.1em;
  color: var(--muted);
  white-space: nowrap;
}

/* Footer: blue band across the bottom, like the poster */

footer {
  margin-top: 60px;
  padding: 20px 16px;
  background: var(--erau-blue);
  color: #fff;
  text-align: center;
}

footer p {
  margin: 0;
}

footer .small {
  margin-top: 6px;
  font-size: 0.8em;
  opacity: 0.8;
}

/* Widescreen: header becomes a sticky white sidebar with a big round logo */

@media (min-width: 1000px) {
  body {
    font-size: 17px;
    border-top: 14px solid var(--erau-blue);
  }

  .page {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    column-gap: 64px;
    max-width: 1440px;
    padding: 48px 48px 0;
  }

  header {
    position: sticky;
    top: 40px;
    align-self: start;
  }

  /* Reversed so the name sits above the logo, like the portfolio layout */
  .masthead {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 20px;
    margin: 0;
    padding: 0;
    background: none;
    color: inherit;
  }

  .avatar {
    width: 210px;
    height: 210px;
    padding: 22px;
    background: var(--tint);
  }

  h1 {
    font-size: 2.3em;
    color: var(--erau-blue);
  }

  .tagline {
    display: none;
  }

  .intro {
    margin-top: 24px;
    font-size: 0.95em;
    color: #444;
  }

  nav {
    border: none;
    padding: 4px 0;
  }

  nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .affil {
    display: block;
  }

  section:first-child {
    margin-top: 0;
  }

  section {
    margin-top: 56px;
  }

  .system {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery.thirds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery.thirds a:last-child {
    grid-column: auto;
  }

  .gallery.thirds a:last-child img {
    aspect-ratio: 4 / 3;
  }

  .team {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 16px;
  }

  .pic {
    width: 112px;
    height: 112px;
  }

  .thanks {
    columns: 2;
  }
}
