/** CSS Reset **/
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: inline-block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/** Light mode colors **/
:root {
  --primary: #7e112b;
  --primary-hover:#14162d;
  --secondary:#2B2D42;
  --background: #EDF2F4;
  --line-gradient: linear-gradient(90deg, transparent 10%, var(--secondary) 50%, transparent 90%) 100;
  --line-gradient-pub: linear-gradient(90deg, var(--primary) 10%, transparent 90%) 100;
}

/** Toggle light mode**/
@media only screen and not (prefers-color-scheme: dark) {
body.swap{
    --primary: #ff9ab2;
    --primary-hover:#EDF2F4;
    --secondary:#EDF2F4;
    --background: #14162d;
    --line-gradient: linear-gradient(90deg, transparent 10%, var(--secondary) 50%, transparent 90%) 100;
    --line-gradient-pub: linear-gradient(90deg, var(--primary) 10%, transparent 90%) 100;
}
}

/** Dark Mode Colors **/
@media only screen and (prefers-color-scheme: dark) {
    :root :not(body.swap) {
        --primary: #ff9ab2;
        --primary-hover:#EDF2F4;
        --secondary:#EDF2F4;
        --background: #14162d;
        --line-gradient: linear-gradient(90deg, transparent 10%, var(--secondary) 50%, transparent 90%) 100;
        --line-gradient-pub: linear-gradient(90deg, var(--primary) 10%, transparent 90%) 100;
    }
  }



/** Padding **/
body, header, main, footer{
    padding: 1.5rem clamp(1rem, 5%, 3rem);
  }
h1, h2, h3{
    margin: 1.5rem 0;
 }
p{
    margin: 0 0 1.5rem 0;
 }
button {
  margin: 0.5rem;
}

/** Typesetting **/

* {
  transition: all .5s ease-out;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  scroll-behavior: smooth;
  font-size:1rem;
  line-height:1.375em;
}
body{
    background-color:var(--background);
    color:var(--secondary);
    max-width: 1000px;
    margin: auto;
}
header{
    text-align: center;
}
main {
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-image: var(--line-gradient);
}
hr {
  border: 0;
  border-top: 1px solid;
  border-image: var(--line-gradient);
}
main hr{
    border-image: var(--line-gradient-pub);
}
h1{
  color: var(--primary);
  font-style: normal;
  font-weight: 500;
  font-size: 4em;
  line-height: 1.05;
}
h2{
font-size: 2em;
font-weight: 700;
line-height: 1.05;
text-align: left;
}
h2 small {
  font-size: 1rem;
  font-weight:500;
}
h3{
font-size: 1.5em;
font-weight: 700;
line-height: 1.05;
}
h4, dt{
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
}

dl{
    width:fit-content;
    margin:auto;
    display:flex;
    justify-content: space-around;
    gap:20px;
    white-space: nowrap;
    flex-wrap: wrap;
}
dl + div{
    text-align: center;
}
dd{
  margin-left:2em;
}

a {
  color: var(--primary);
  font-size:1rem;
  font-weight: 600;
  text-decoration: none;
}
a:hover, a:hover span{
    color: var(--primary-hover);
}

/* Header */
header img {
  width:200px;
}
header img:hover{
  transform:rotate(10deg);
  cursor: pointer;
}
a span{
  /* TeamUSEC tag color */
  color:var(--secondary)
}

#scrollUp {
  display: inline-block;
  border: 1px solid var(--primary);
  box-shadow: 0px 0px 2px #666;
  background-color: var(--background);
  font-size:1.5em;
  font-weight: bold;
  color:var(--primary);
  position:sticky;
  top: 20px;
  margin: 0 0 -100% -10px;
  padding:2px;
}

#scrollUp:hover {
  border: 1px solid var(--primary-hover);
  color: var(--primary-hover);
}
#scrollUp:active{
  border: 1px solid var(--secondary);
  color: var(--secondary);
  box-shadow: 0px 0px 0px #666;
}

/* Publication Section */
main section {
  grid-template-columns: auto max-content;
}
small {
  font-size: smaller;
}

/* Disclaimer Section */
footer section {
  height: calc(2em + 3rem);
  overflow: hidden;
}

footer section:hover, footer section.expanded {
  height:fit-content;
}