
/* Color Palette */


:root {
    --black: #000;
    --white: #fff;
    --color-primary: #faf5f2;
    --color-secondary: #DAE1E0;
    --color-msu-green: #18453B;
    --color-tertiary: #6777dc;
    --color-accent: #f4b642;
}


.greendiv {
  background: var(--color-msu-green);
  color: var(--color-primary);
}

.accentdiv {
  background: var(--color-accent);
  color: var(--color-primary);
}

.primarydiv {
  background: var(--color-primary);
  color: var(--black);
}

.secondarydiv{
  background: var(--color-secondary);
  color: var(--black);
}

.tertiarydiv{
  background: var(--color-tertiary);
  color: var(--color-msu-green);
}


/* Typography */
:root {
    --font-body: 'Overpass', system-ui, sans-serif;
    --font-heading: "Overpass";
    --title-name-font: "Overpass";
    --title-name-weight: 700;

    font-size: var(--font-size-base);
    --font-size-base: 14px;
    --font-size-heading: 2em;
}

p, h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.75em;
  font-weight: 500;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

h5 {
  font-size: 1.25em;
  font-weight: 300;
  margin-bottom: 1rem;
}

h6 {
  font-size: 1rem;
  font-weight: 100;
  margin-bottom: 1rem;
}

p {
  font-size: 1em;
  font-weight: 400;
  margin-bottom: 1rem;
}

.italic {
  font-style: italic;
}

.textNormal {
  font-style: normal;
}

/* General Layout */
:root {
  --padding-base: 16px;
  --padding-section: 12px;
  --header-height: calc(2 * var(--font-size-base) + 3 * var(--padding-base));
  --footer-height: calc(2 * var(--font-size-base) + 1em);
}

/* Margins */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }  /* 4px */
.mb-2 { margin-bottom: 0.5rem; }   /* 8px */
.mb-3 { margin-bottom: 1rem; }     /* 16px */
.mb-4 { margin-bottom: 1.5rem; }   /* 24px */
.mb-5 { margin-bottom: 2rem; }     /* 32px */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.my-0 { margin-top: 0; margin-bottom: 0; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-5 { margin-top: 2rem; margin-bottom: 2rem; }

/* Padding */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

/* Indentation */
.indent { text-indent: 2rem; }
.indent-sm { text-indent: 1rem; }
.indent-lg { text-indent: 3rem; }

/* Line height */
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.75; }
.leading-loose { line-height: 2; }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/*Global Styles*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-display: swap;

  background-color: var(--color-primary);
  color: var(--black);
  line-height: 1.6;
  display: flex;
  flex-direction: column;

  min-height: 100vh;
  position: relative;

}

main {
  margin: 0 var(--padding-base);
  padding: 0 var(--padding-base);
  margin: 0 var(--padding-base);
  padding: 0 var(--padding-base);
  flex: 1;
  position: relative;
}

.full-width {
  margin: 0 calc(-2 * var(--padding-base)); /* cancel out main's padding */
  width: calc(100% + 4 * var(--padding-base));
}

.transparent-margins-oneSeventh {
  width: calc(100%);
  margin: 0 auto;
  mask-image: linear-gradient(
    to right,
      transparent,
      black calc(100% / 7),      /* 1/7 = ~14.3% */
      black calc(100% * 6 / 7),  /* 6/7 = ~85.7% */
      transparent
  );
}

.transparent-margins-oneSeventh {
  width: calc(100%);
  margin: 0 auto;
  mask-image: linear-gradient(
    to right,
      transparent,
      black calc(100% / 7),      /* 1/7 = ~14.3% */
      black calc(100% * 6 / 7),  /* 6/7 = ~85.7% */
      transparent
  );
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.fillVertical {
  flex: 1;
}

.padded{
  padding: var(--padding-base);
}

.doublePadded{
  padding: calc(2 * var(--padding-base));
}


.halfPadded{
  padding: calc(0.5 * var(--padding-base));
}

.twentyPercentPadded{
  padding: calc(0.2 * var(--padding-base));
}

.oneSeventhPaddedSides{
  padding-left: calc(1/7 * 100vw);
  padding-right: calc(1/7 * 100vw);
}

.justifySpaceBetween{
  display: flex;
  justify-content: space-between;
}

.noBreak {
  white-space: nowrap;
}

div {
}

.horizontal {
  display: flex;
  flex-direction: row;
}

.horizontalAlways {
  display: flex;
  flex-direction: row;
}

.vertical {
  display: flex;
  flex-direction: column;
}

.fillVertical {
  flex: 1;
}

nav {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  color: inherit;
  transition: color 0.2s ease;
  font-weight: 600;
}

a img {
  border: none;
}

a:hover {
  color: var(--color-accent)
}

.hiddenText {
  font-size: 0.1rem;
  color: transparent;
  margin: 0;
  padding: 0;
}

.accent {
  color: var(--color-accent);
  font-weight: 700;
}

.colorSecondary {
  color: var(--color-secondary);
  font-weight: 700;
}

.colorMSUGreen {
  color: var(--color-msu-green);
  font-weight: 700;
}

.colorTertiary {
  color: var(--color-tertiary);
  font-weight: 700;
}

.icon {
  font-size: 1.4em;
  margin-right: 6px;
  vertical-align: middle;
  width: 1.2em;
  height: 1.2em;
}

.currentColorIcon {
  background-color: currentColor;
  mask: var(--icon-src) no-repeat center / contain;
  -webkit-mask: var(--icon-src) no-repeat center / contain;
}

button {
  background-color: var(--color-accent);
  border: none;
  border-radius: 10%;
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: color-mix(in srgb, var(--color-accent) 80%, black);
}

.paper {
}

.paper p {
  text-indent: 2em; /* adjust as you like */
}

.formula {
  display: block;
  text-align: center;
  margin: 1em 0;
  font-style: italic;
}

.formula * {
  overflow: visible !important;
}

.paper p.workCited {
  /* Hanging indent for works cited */
  text-indent: -2em;
  margin-left: 2em;
}

/* Introduction Styling */

.introduction-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-photo {
  width: 150px;
  height: 150px;
}

.introduction-content > div {
  text-align: left;
  width: 100%;
}

/* Desktop layout */
@media (min-width: 768px) {
  .introduction-content {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .profile-photo {
    flex-shrink: 0;
  }
}

.photo img.profile-photo {
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: cover;
  /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); */
  border-radius: 4px;
}

#grid {
  display: grid;
  grid-template-columns: repeat(var(--number-of-columns), var(--cell-size));
  gap: 5px;
}

.cell {
  width: var(--cell-size);
  height: var(--cell-size);
  background: var(--color-primary);
}

.cell.on {
  background: var(--color-accent);
}

/* Header Styles */

header {
  background-color: var(--color-primary);
  padding: var(--padding-base) calc(2 * var(--padding-base));
  min-height: var(--header-height);
  justify-content: space-between;
  display: flex;
  align-items: center;
  
}

.title-name {
  font-family: var(--title-name-font);
  font-weight: var(--title-name-weight);
  font-size: 1.5em;
  color: var(--black);
  align-self: center;
}

.tab-name {
  color: var(--black)
}

/* Footer Styles */

footer {
  position: bottom;
  min-height: var(--footer-height);
  font-size: 0.9em;
  padding: var(--padding-base) calc(2 * var(--padding-base));

  display: flex;
  justify-content: space-between;
}

/*
footer:not([class*="div"]) {
  background-color: var(--color-msu-green);
  color: var(--color-primary);
}
*/

/* Spinner */

/* Responsive header for small screens */
@media (max-width: 600px) {
  .horizontal {
    flex-direction: column;
  }
}
/* Canvas Styles */

#background-canvas-container {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;

}

#knotwfc-canvas-container {
  pointer-events: none;
  min-width: 100px;
  min-height: 100px;
  width: min(250px, 40vw); /* Responsive but capped */
  height: min(250px, 40vw);
  flex-shrink: 0;
  overflow: hidden;

}