:root {
  --blue1: rgb(153, 193, 241);
  --blue2: rgb(98, 160, 234);
  --blue3: rgb(53, 132, 228);
  --blue4: rgb(28, 113, 216);
  --blue5: rgb(26, 95, 180);
  --green1: rgb(143, 240, 164);
  --green2: rgb(87, 227, 137);
  --green3: rgb(51, 209, 122);
  --green4: rgb(46, 194, 126);
  --green5: rgb(38, 162, 105);
  --yellow1: rgb(249, 240, 107);
  --yellow2: rgb(248, 228, 92);
  --yellow3: rgb(246, 211, 45);
  --yellow4: rgb(245, 194, 17);
  --yellow5: rgb(229, 165, 10);
  --orange1: rgb(255, 190, 111);
  --orange2: rgb(255, 163, 72);
  --orange3: rgb(255, 120, 0);
  --orange4: rgb(230, 97, 0);
  --orange5: rgb(198, 70, 0);
  --red1: rgb(246, 97, 81);
  --red2: rgb(237, 51, 59);
  --red3: rgb(224, 27, 36);
  --red4: rgb(192, 28, 40);
  --red5: rgb(165, 29, 45);
  --purple1: rgb(220, 138, 221);
  --purple2: rgb(192, 97, 203);
  --purple3: rgb(145, 65, 172);
  --purple4: rgb(129, 61, 156);
  --purple5: rgb(97, 53, 131);
  --brown1: rgb(205, 171, 143);
  --brown2: rgb(181, 131, 90);
  --brown3: rgb(152, 106, 68);
  --brown4: rgb(134, 94, 60);
  --brown5: rgb(99, 69, 44);
  --light1: rgb(255, 255, 255);
  --light2: rgb(246, 245, 244);
  --light3: rgb(222, 221, 218);
  --light4: rgb(192, 191, 188);
  --light5: rgb(154, 153, 150);
  --dark1: rgb(119, 118, 123);
  --dark2: rgb(94, 92, 100);
  --dark3: rgb(61, 56, 70);
  --dark4: rgb(36, 31, 49);
  --dark5: rgb(0, 0, 0);
  --gnomeblue: #4a86cf;
  --text: #f6f5f4;
  --linkcolor: var(--blue3);
  --pill: 64px;
  --inter: InterVariable, "Inter Variable", Inter, sans-serif;
  --pagewidth: 25rem;
  --grid-gap: 3rem;
  --pagegridwidth: calc(var(--pagewidth) +  (6 * var(--grid-gap)));
  --btnround: 500px;
  --btn-fg: var(--dark5);
  --btn-bg: rgba(0,0,0,0.1);
  --fg-color: var(--dark5);
  --btn-fg-dark: #fff;
  --btn-bg-dark: rgba(255,255,255,0.12);
  --btnsqr: 0.8rem;
  --bg-color: var(--light2);
  --defaultsize: 18px;
  --slickease: cubic-bezier(.17,.89,.32,1.28);
  --view-bg: #fff;
  --card-bg: rgba(0,0,0,0.03);
  --borders: rgba(0,0,0,0.09);
  font-feature-settings: 'liga' 1, 'calt' 1, 'cv05' 1; /* Inter features */
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg-color: var(--light2);
    --bg-color: #222;
    --linkcolor: var(--blue2);
    --btn-fg: var(--btn-fg-dark);
    --btn-bg: var(--btn-bg-dark);
    --card-bg: rgba(255,255,255,0.08);
    --view-bg: #1d1d20;
    --borders: rgba(255,255,255,0.08);
  }
}

@media only screen and (max-width: 600px) {
  :root {
    --grid-gap: 1rem;
  }
}

* {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-size: var(--defaultsize);
  font-family: var(--inter);
  font-style: normal;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-spacing: -0.01em;
  scroll-behavior: smooth;
}

body {
  color: var(--fg-color);
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

hr {
  border: none;
  height: 2px;
  background-color: var(--borders);
  margin: 1.5rem 0;
}

/* TEXT */
strong {
	font-weight: 600;
}
h1, h2, h3, h4, h5, h6 {
  margin: 3rem 0 1rem;
  font-weight: bold;
  font-weight: 800;
  line-height: 1.25;

  &:has(.anchor) {
    .anchor {
      float: left;
      margin-right: 0.1rem;
      margin-left: -1.1rem;
    }
  }
}

@media only screen and (max-width: 600px) {
    h1, h2, h3, h4, h5, h6 {
      &:has(.anchor) {
        padding-left: 1rem;
    }
  }
}

h2:first-child { margin: 1rem 0 1rem; }

.caption { max-width: 30ch; margin: 1rem auto; }

/* FORM */
form {
  gap: 1rem;
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0 auto;

  span {
    font-size: smaller;
  }
}

  @media only screen and (max-width: 600px) {
    form {
      margin: 0;
    }
  }


  label {
    margin: 1rem 0 0;
    font-weight: bold;
  }

  textarea,
  input[type=text],
  input[type=email],
  input[type=submit] {
    /* remove html defaults from form inputs */
    outline: none;
    box-shadow: none;
    border-color: transparent;

    &::-moz-placeholder,
    &::-webkit-input-placeholder,
    &::placeholder {
      color: var(--fg-color);
      opacity: 0.5;
    }
  }

  textarea {
    padding: 9px;
    resize: vertical;
  }

  input[type=submit] {
    margin-top: 3em;
  }

.form-container {
  width: 100%;
  & *:not(.btn) {
    text-align: left !important;
  }
}

/* LINKS */
a {
  font-weight: 600;
  text-decoration: none;
  color: var(--linkcolor);
  cursor: pointer;
  font-variation-settings: "wght" 600; /* needed for webkit */
}

a:hover {
  text-decoration: underline;
}

a[href^="http"]:after {
  display: inline-block;
  margin-left: 3px;
  content: url('/img/extlink.svg');
}

a[href^="http"]:has(img,svg):after,
a.btn[href^="http"]:after { content: none; }

section {
  margin: 0;

  &.colored-row {
    background-color: var(--light1);
    @media (prefers-color-scheme: dark) {
      background-color: var(--dark5);
    }
  }
}


/* ENTRIES */
.entry {
  min-height: 34px;
  padding-left: 9px;
  padding-right: 9px;
  border-spacing: 6px;
  border-radius: 6px;
  background-color: var(--btn-bg);
  background-clip: padding-box;
  caret-color: var(--fg-color);
  color: var(--fg-color);
  border: 2px solid transparent;

  &:focus {
    border: 2px solid color-mix(in srgb, var(--blue2), transparent 50%);
  }
}

/* BOXED LIST */
.boxed-list {
  background-color: var(--view-bg);
  border-radius: 9px;
  margin: 8px 0;
  box-shadow: 0 1px 3px 1px RGB(0 0 6 / 7%),
              0 2px 6px 2px RGB(0 0 6 / 3%);

  .row {
    padding: 9px 12px;
    display: flex;
    flex-direction: row;
    font-weight: normal;
    border-bottom: 1px solid var(--borders);

    &:last-child {
      border: none;
    }

    label {
      font-size: smaller;
      margin: 0;
    }
    input {
      align-self: end;
    }
  }
}

/* BUTTONS */
.btn {
  font-weight: 600;
  font-variation-settings: "wght" 600;
  color: var(--btn-fg);
  background-color: var(--btn-bg);
  fill: var(--btn-fg);
  display: inline-block;
  font-size: 100%;
  white-space: nowrap;
  padding: 0.6rem 1.5rem;
  margin: .3rem;
  max-width: 20rem;
  vertical-align: middle;
  text-align: center;
  text-decoration: none;
  border-radius: var(--btnround);
  box-shadow: 0 0 0 0 var(--btn-bg);
  min-width: 4rem;
  transition: box-shadow 200ms var(--slickease);

  &:hover {
    box-shadow: 0 0 0 2px var(--btn-bg);
    text-decoration: none;
  }

  &.standalone {
    display: block;
    padding: 0.6rem 2rem;
    margin: 1rem auto;
    max-width: 18ch;
  }


  &>svg {
    margin-right: 6px;
    vertical-align: middle;
    display: inline-block;
    width: 20px;
    height: 20px;
  }
}

button.btn {
  appearance: none;
  border: none;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  .btn {
    color: var(--btn-fg-dark);
    background-color: var(--btn-bg-dark);
    fill: var(--btn-fg-dark);
    &:hover {
        box-shadow: 0 0 0 2px var(--btn-bg-dark);
    }
  }
}

  /* Styled Buttons */
  .btn.suggested {
    font-weight: 700;
    font-variation-settings: "wght" 700;
    background-color: var(--blue3);
    color: var(--light1);
    box-shadow: 0 0 0 0 var(--blue3);
    transition: box-shadow 200ms var(--slickease);

    &:hover {
      background-color: var(--blue3);
      box-shadow: 0 0 0 2px var(--blue3);
    }
    &:active {
      background-color: var(--blue2);
    }
  }


/* LAYOUT */
.container {
  margin: 2rem 0;
  padding: 0;
  display: grid;
  flex-grow: 1;
  gap: 0 var(--grid-gap);
  grid-template-columns:  [full-start]
                            minmax(0, 1fr)
                          [main-start]
                            repeat(5,minmax(1rem,calc(var(--pagewidth)/5)))
                          [main-end]
                            minmax(0, 1fr)
                          [full-end];
}
.container * {  grid-column: main; }
.container {
  h1:first-child {
    margin-top: 0.6rem;
  }

  h1 + h4 {
    margin-top: 0.6rem;
    margin-bottom: 0;
  }
}

.text-container {
  justify-self: start;
  margin: 0 auto;

  h1 {
    margin: 0 0 1rem 0;
  }
}

@media only screen and (max-width: 700px) {
  .text-container {
    width: 95%;
  }
}

.full {  grid-column: full; text-align: center; }
.left-text {
  grid-column: 2/5;
  align-self: center;

  &.top { align-self: start; }
}
.right-img { grid-column: 5/-1; overflow: hidden; }
.right-text { grid-column: 4/7; align-self: center; }
.left-img { grid-column: 1/4; overflow: hidden; justify-self: end; }

@media only screen and (max-width: 700px) {
  .left-text { grid-column: main; }
  .right-img { grid-column: main; order: -1; & img { max-width: 100%; }}
  .right-text { grid-column: main; }
  .left-img { grid-column: main; & img { max-width: 100%; }}
}



/* COMPONENTS */
.small-print {
  font-size: 0.9em;
  text-align: center;
  max-width: 26em;
  margin: 1rem auto;
}

.buttonrow-container {
  flex: 0;
  margin: auto;
  width: calc(100% + 2em);
  margin-left: -1em;
  margin-right: -1em;
}


  @media only screen and (max-width: 700px) {
    .buttonrow-container {
      width: 100%;
      margin-left: 0;
      margin-right: 0;
    }
  }

.buttonrow {
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 1em;
  padding: 1em;
  color: var(--dark3);
  gap: 12px;
  transition: all 100ms ease;

  .title {
    color: currentColor
  }
  &:hover {
    background: color-mix(in srgb, currentColor, transparent 96%);
  }
  &:active {
    background: color-mix(in srgb, currentColor, transparent 89%);
  }

  svg {
    width: 32px;
    height: 32px;
  }
}

  @media (prefers-color-scheme: dark) {
    .buttonrow {
      color: var(--light4);
    }
  }

  .backbutton {
    margin-top: 5rem;
    color: var(--dark1);
    svg {
      transform: rotate(180deg);
    }
    &:hover {
      color: var(--dark3);
    }
  }

  @media (prefers-color-scheme: dark) {
    .backbutton {
      color: var(--dark1);
      &:hover {
        color: var(--light5);
      }
    }
  }


.icon-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 6px;
  transition: all 100ms ease;
  margin: 1rem 0 2rem 0;


  &.centered {
    justify-content: center;
  }

  &:hover {
    text-decoration: underline;
  }

  span {
    font-size: var(--defaultsize);
  }
  svg {
    width: 24px;
    height: 24px;
  }
}

/* BREADCRUMBS */
.breadcrumbs-container {
  margin: 0;
  background-color: color-mix(in srgb, var(--dark5), transparent 98%);
}
  @media (prefers-color-scheme: dark) {
    .breadcrumbs-container {
        background-color: color-mix(in srgb, var(--dark5), transparent 90%);
    }
  }

.breadcrumbs {
  display: flex;
  align-items: center;
  padding: 1em 0;
  gap: 12px;
  width: var(--pagewidth);

  svg {
    width: 24px;
    height: 24px;
    opacity: 0.2;
  }

  span {
    font-weight: bold;
    color: color-mix(in srgb, currentColor, transparent 33%);
  }
}

  @media only screen and (max-width: 700px) {
    .breadcrumbs {
      padding: 1em 1.5em;
    }
  }

/* HERO */
.hero {
  flex-shrink: 0;
	color: var(--dark5);
  background: linear-gradient(270deg, color-mix(in srgb, var(--purple2), transparent 50%) , color-mix(in srgb, var(--blue2), transparent 50%));
  background-size: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
  justify-content: space-between;

  & .title {
    font-weight: 500;
    font-size: 1.4rem;
  }

  & a {
    color: inherit;
  }
}

.hero section.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--pagegridwidth);
  margin: 1rem auto;
  padding: 0 var(--grid-gap);
}

@media only screen and (max-width: 700px) {
  .hero section.header {
    flex-direction: column;
  }
  .hero section.header .nav {
    justify-content: center;

    & .btn {
      box-shadow: none;
    }
  }
}

  #logo {
    font-weight: 900;
    font-size: 1.4rem;

    & svg {
      fill: currentColor;
      height: 4ex;
    }

    & a {
      text-decoration: none;
      color: var(--dark5);
      font-weight: inherit;
      font-variation-settings: inherit;
    }
  }

  ul.nav {
    min-height: 62px;
    margin: 0 0 0 -2em;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
    max-width: var(--pagewidth);

    li {
      list-style: none;
    }

    a {
      display: inline-block;
      padding: 0.3rem 1rem;
      text-decoration: none;
      font-weight: 500;
      color: var(--fg-color);
      border-radius: var(--btnround);
      transition: box-shadow 300ms ease-out;
      margin: 0rem 0.1rem;
      outline: none;

      &:hover {
        background-color: color-mix(in srgb, var(--fg-color), transparent 95%);
      }
      &.active {
        background-color: color-mix(in srgb, var(--fg-color), transparent 90%);
        &:hover { cursor: default; }
      }
    }

    p {
      display: inline-block;
      padding: 0.3rem 1rem;
      margin: 0;
    }
  }

@media (prefers-color-scheme: dark) {
  .hero {
    color: var(--light1);
    background: linear-gradient(60deg, color-mix(in srgb, var(--purple5), transparent 50%) , color-mix(in srgb, var(--blue2), transparent 50%));
  }
  #logo a { color: var(--light1); }
}


/* CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
  margin: 0.5rem 0 3rem;
}

  .card {
    grid-column: auto;
    text-decoration: none;
    background-color: var(--card-bg);
    color: var(--fg-color);
    padding: 2em;
    border-radius: 24px;
    gap: 0.5rem;

    display: flex;
    flex-direction: column;
    justify-content: start;

    &.flat {
      background-color: transparent;
    }

    & h2,h4 {
      margin: 0;
      font-size: 1.2rem;
    }
    & p {
      margin: 0;
    }
    & a>svg {
      width: 24px;
      height: 32px;
      transform: translateY(8px);
    }
    & img {
      object-fit: cover;
      object-position: bottom center;
      overflow: hidden;
      border-radius: 12px;
      width: 100%;

      align-self: center;
      justify-self: center;
      opacity: 0.8;
    }

    picture {
      margin: 1rem 0;
    }

    svg {
      width: 32px;
      height: 32px;
    }
  }


  @media only screen and (max-width: 1024px) {
    .cards {
      grid-template-columns: 1fr;

      .card {
        justify-self: center;
        width: 100%;
      }
    }
  }

/* large cards */
.cards.large-cards {
  grid-template-columns: repeat(2,1fr);
}

  @media only screen and (max-width: 1024px) {
    .cards.large-cards {
      grid-template-columns: 1fr;
    }
  }


/* TILES */
.tiles {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1rem;
  margin: 1rem 0 2rem;
  width: calc(100% + 4em);
  margin-left: -2em;
  margin-right: -2em;
}


@media only screen and (max-width: 700px) {
  .tiles {
    grid-template-columns: 1fr;
    width: 100%;
    margin-left: 0;
    margin-right: 0;

    .tile {
      width: 100%;
      font-size: 100%;
    }
    h3 {
      text-align: center;
    }
  }
}


  .tile {
    grid-column: auto;
    display: grid;
    text-decoration: none;
    color: var(--fg-color);
    grid-template-rows: auto auto 1fr auto;
    align-content: stretch;
    align-items: start;
    gap: 1em;
    font-size: 89%;

    padding: 2em;
    background-color: var(--card-bg);
    color: var(--fg-color);
    border-radius: 24px;

    & * { grid-column: auto; }
    & h3 {
      margin: 0;
    }
    & img {
      object-fit: cover;
      object-position: bottom center;
      z-index: 0;
      overflow: hidden;
      border-radius: 12px;
      width: 100%;
    }
    & p {
      overflow: visible;
      margin: 0.5em 0;
      margin-top: 0;
      align-self: start;
    }
    & a {
      justify-self: start;
      width: 100%;
    }
    & .btn {
      justify-self: center;
    }
  }


/* POST STYLES */
.post-meta time {
  opacity: 0.5;
}

.post-links {
  grid-template-columns: repeat(2,1fr);
  gap: 1rem;

  a {
    padding: 1em;
    border-radius: 1em;
    flex-direction: row;
    justify-content: space-between;
    color: var(--linkcolor);
    line-height: 32px;

    svg {
      opacity: 0.8;
    }
  }
}

ul.people {

  list-style: none;
  background-color: var(--card-bg);
  color: var(--fg-color);
  padding: 2em;
  border-radius: 24px;
  margin: 3rem 0 3rem;

  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5em;

  li {
    font-size: smaller;
    width: 100%;
    flex-basis: calc(50% - 2em);
    justify-content: center;

    img {
      border-radius: 50%;
      width: 6rem; height: auto;
      float: left;
      margin-bottom: 1rem;
      margin-right: 1rem;
    }

    h3, h4{
      margin: 0.25em 0;
    }

    h4 {
      font-weight: normal;
      opacity: 0.6;
    }

    p {
      margin: 0;
    }

    span.email {
      display: block;
      opacity: 0.6;
      font-size: smaller;
      margin: 0.25em 0;
    }

  }

}


  /* force 2 column on mobile */
  @media only screen and (max-width: 900px) {
    ul.people li {
      flex-basis: 100%;
    }
  }

/* FELLOWS */

/* Style the container */
.fellows-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  width: calc(100% + 4em);
  margin-left: -2em;
  margin-right: -2em;
}

  @media only screen and (max-width: 700px) {
    .fellows-container {
      width: 100%;
      margin-left: 0;
      margin-right: 0;
    }
  }

  .fellows-container > .fellow {
    flex-basis: calc(50% - 1em);
  }

  @media only screen and (max-width: 900px) {
    .fellows-container > .fellow {
      flex-basis: 100%;
    }
  }

  /* Style each item */
  .fellow {
    background-color: var(--card-bg);
    color: var(--fg-color);
    text-align: left;
    font-size: 90%;

    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "avatar name"
      "avatar summary"
      "avatar report"
    ;

    * {
      margin: 0;
    }

    picture {
      grid-area: avatar;
      align-self: center;
      display: flex;
      align-items: center;
      img {
        border-radius: 50%;
      }
    }

    p {
      grid-area: summary;
      align-self: center;
    }

    .fellow-name {
      grid-area: name;
      align-self: end;
    }

    .fellow-link {
      grid-area: report;
      align-self: start;

      display: flex;
      flex-direction: row;
      align-items: center;

      svg {
        height: 20px;
        width: 20px;
      }
    }

    &.current {
      column-gap: 1em;

      padding: 1.5em;
      border-radius: 1.5em;

      picture {
        img {
          height: 100px;
          width: 100px;
        }
      }
    }

    &.past {
      column-gap: 1rem;

      padding: 1.25em;
      border-radius: 1.25em;

      picture {
        img {
          height: 75px;
          width: 75px;
        }
      }
      .fellow-name {
        margin-bottom: 0.125em;
      }
      p,
      .fellow-link {
        font-size: 0.83rem;
      }
    }
  }

/* FOOTER */
.container:has(+ footer) { /* last container before footer */
  margin-bottom: 4rem;
}

footer {
  background-color: #1a1622;
	padding: 2rem 0 4rem;
  color: white;
  text-align: center;
  flex-shrink: 0;

  & a {
    text-decoration: none;
    font-weight: 600;
    color: white;
    display: block;
    margin: auto;
  }

  & .copy {
    font-size: 70%;
  }
}


footer a[href^="http"]:after,
ul.nav a[href^="http"]:after { content: none; }

ul.bottomlinks {
  column-width: 12rem;
  column-gap: 12px;
  line-height: 1.8rem;
  max-width: var(--pagegridwidth);
  margin: 0 auto 4rem;

  & li {
    display: block;
    list-style: none;
    text-align: left;
    white-space: nowrap;

    svg.extlink {
      width: 16px;
      * {
        fill: var(--fg-color);
        opacity: 0.8;
      }
    }

    > a {
      font-weight: 400;
      text-decoration: underline;
      text-decoration-color: rgba(255,255,255,0);
      transition: all 200ms ease-out;

      &:hover {
        text-decoration-color: rgba(255,255,255,1);
      }

      &.btn {
        margin: 0;
        margin-top: 1em;
        padding: 0.4em 3em;
      }
    }

  }

}

  /* force 2 column on mobile */
  @media only screen and (max-width: 600px) {
    ul.bottomlinks {
      font-size: 80%;
      column-count: 2;
      column-width: auto;
    }
  }

/* social links */
a.social {
  padding: 4px;
  margin: 0;

  svg {
    height: 32px;
    width: 32px;
  }
}

  .socials {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: baseline;
    margin: 48px 6px 0 0;
    gap: 12px;
  }
  .social { fill: rgba(255,255,255,0.6); transition: all 200ms ease-out; }
  .social:hover { fill: rgba(255,255,255,1); }
