/** BASIC NAVIGATION **/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

:root {
  --sidebar-width: 250px;
}

.card {
  margin: auto;
  max-width: 960px;
  overflow: hidden;
}

.preload * {
  transition: none !important;
}

.sidebar {
  width: var(--sidebar-width);
  transition: margin 0.2s ease;
  position: fixed;
  height: 100%;
  overflow: hidden;
}

.collapsed-nav .sidebar {
  margin-left: calc( 0px - var(--sidebar-width) ); 
  pointer-events: none;
}

.content {
  transition: margin 0.2s ease;
  margin-left: var(--sidebar-width);
}
.content > *:nth-child(2) {
  /* used to be first-child before .header */
  margin-top: 0;
}
.mobile .content {
  width: 100%;
  padding: 3rem 1rem;
}
.collapsed-nav .content {
  margin-left: 0px
}


.content .header {
  display: none;
  margin: -1rem -1rem 1rem -1rem;
  padding: 1rem;
  text-align: center;
  box-shadow: inset 0 -10px 15px -5px var(--fg-faint);
}

.mobile .content .header {
  display: block;
}
.mobile .sidebar .header {
  display: none;
}
.mobile .sidebar .nav-links {
  margin-top: 0;
}


.hamburger {
  display: none;
  position: fixed;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1100;
  width: 100%;
  padding-left: 0.5rem;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
}



/** GENERAL STYLE **/

:root {
  --accent: #D73F09;
  --accent2: #4A773C;
  --bg: white;
  --bg-trans: rgba(255,255,255,0);
  --fg: black;
  --fg-faint: rgba(0,0,0,0.08);
  --nav-border: #ddd;
}

body.dark {
  --accent: #D98365;
  --bg: #181818;
  --bg-trans: rgba(24,24,24,0);
  --fg: white;
  --fg-faint: #333;
  --nav-border: #555;
}

body {
   background: var(--bg); 
}

body {
  font-family: "Source Serif 4";
  color: var(--fg);
}

.card {
  background: var(--bg);
  box-shadow: 0 0px 70px var(--fg-faint);
}

.sidebar {
  padding: 3rem 1rem;
  text-align: center;
}

.content {
  padding: 3rem 2rem;
}

.hamburger {
  background: var(--bg);
}

h1 {
  scroll-margin-top: 2.6rem;
  margin-top: 3rem;
  font-weight: 400;

  border-top: 1px solid var(--nav-border);
  padding-top: 0.5rem;
  scroll-margin-top: 2.1rem;
}
h2 {
  margin-top: 2rem;
  font-size: 120%;
  font-weight: 350;
}

/* all-caps */
h1, h2, .sidebar .title, .header .title, ul.nav-links li {
  text-transform: uppercase;
  letter-spacing: 0.1ex;
  font-family: "Source Sans 3";
}

ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

p, ul.wide li {
    margin: 1rem 0;
}

button {
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  text-transform: inherit;
}
a, a:visited, button {
    color: var(--accent);
}

li {
    margin: 0.5ex 0;
}

blockquote {
    margin: 1rem 2rem;
    font-style: italic;
}

.award {
    background: color-mix(in hsl, var(--accent2) 70%, var(--bg) 30%);
    color: var(--bg);
    border-radius: 1rem;
    padding: 0 0.1rem;
}

.material-symbols-outlined:hover {
  font-variation-settings: 'FILL' 1;
}
.material-symbols-outlined {
  vertical-align: bottom;
}

/** SIDEBAR STYLES **/

.sidebar {
    background: var(--bg);
}

.sidebar .title, .header .title {
  font-size: 150%;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.7rem;
}
.header .title {
  margin-bottom: 0.3rem;
  font-size: 160%;
}

ul.nav-links {
  list-style: none;
  text-align: center;
  margin: 2rem auto;

  border: 1px solid var(--nav-border);
  border-width: 1px 0;
  padding: 1rem;
}
ul.nav-links li {
  margin: 1ex 0;
}
ul.nav-links li a, ul.nav-links li a:visited {
  text-decoration: none;
  color: var(--accent);
}
ul.nav-links li a:hover {
  text-decoration: underline;
}
ul.nav-links li a.active {
  font-weight: 800;
}

.contact-info {
  font-size: 80%
}

/** PROJECTS **/

ul.projects {
  display: flex;
  list-style: none;
  margin: 0 2rem;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}
ul.projects li {
  flex: 1;
  min-width: 200px;
  margin: 0px;
}
ul.projects li > p:first-child {
  margin-top: 0px;
}
ul.projects li > p:last-child {
  margin-bottom: 0px;
}

/** PUBLICATIONS **/

#publist {
  transition: max-height 0.5s ease;
  overflow-y: clip;
  position: relative;
}

#publist.collapsed {
  max-height: 30rem !important;
}

#publist::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8rem; 

  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--bg) 100%);
  transition: opacity 0.5s ease;
  opacity: 0;
}
#publist.collapsed::after {
  opacity: 1;
}

ul.pubs .title {
    font-weight: 600;
}
ul.pubs .authors {
    font-style: italic;
}
ul.pubs .title, ul.pubs .authors {
    display: block;
}
ul.pubs .venue {
  text-transform: uppercase;
  letter-spacing: 0.1ex;
  font-family: "Source Sans 3";
  font-size: 90%;
  display: inline-block;
/*  color: var(--accent); */
  color: #666;
}
.expand-pubs {
    margin-left: 2rem;
    font-style: italic;
}


@media (min-width: 960px) {
    .pubs li {
        margin-bottom: 0.5rem;
    }
    .pubs .pub-item {
        display: grid;
    }
    .pubs .title-and-authors {
        grid-row: 1;
        grid-column: 1;
    }

    .pubs .venue-and-links {
        grid-row: 1;
        grid-column: 2;
        text-align: right;
        padding-left: 0.5rem;
    }

    .pubs .pub-links, .pubs .venue {
        display: block;
    }
}

/** COLLAPSE SECTIONS **/

h2 button {
  text-decoration: none;
}
.collapse-section button.collapse-toggle::before {
    content: "Hide ";
}
.collapse-section.collapsed button.collapse-toggle::before {
    content: "Show ";
}
.collapse-section button.collapse-toggle::after {
    content: "›";
    font-size: 100%;
    font-style: normal;
    font-weight: bold;
    margin-left: 0.8ex;
    position: absolute;
    transition: transform 0.5s ease;
    transform: rotate(90deg);
}
.collapse-section.collapsed button.collapse-toggle::after {
    transform: rotate(0deg);
}
.collapsible {
    transition: max-height 0.3s ease;
    transition-property: max-height, margin;
    overflow-y: clip;
}
.collapsible.collapsed {
    max-height: 0px !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}
