
:root {
  --width-slim: 40rem;
  
  --border-radius: 8px;
  
  --color-accent: #5252c3;
  --color-accent-hover: #4141a8;
  --color-text: #323232;
  --color-text-muted: #aaa;
  --color-text-secondary: #444;
  --color-lines: #ccc;
  --color-light-grey: #f9f9f9;
  --color-background: #ffffff;

  --shadow-height-one: 0 4px 12px rgba(0, 0, 0, 0.1);
}


body {
  margin: 0 auto;
  max-width: 100%;
  color: var(--color-text);
  background-color: var(--color-background);
  font-family: "Helvetica";
  padding: 2rem 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

html[data-theme-ready="true"] body {
  opacity: 1;
  transition: opacity 0.3s ease, max-width 0.7s ease, background-color 0.3s ease, color 0.3s ease;
}

strong {
  font-variant: small-caps;
}

/* For small displays, let's not play games */

@media (max-width: 1200px) {
  body {
    max-width: var(--width-slim);
    color: var(--color-text);
  }

  a {
    display: inline-block;
    color: var(--color-accent);
  }
}

.level1 {
  max-width: var(--width-slim);
  color: var(--color-text);
}

.level1 a {
  display: inline-block;
  text-decoration: none;
  color: var(--color-accent);
}

.level1 p {
  line-height: 1.2rem;
}

.level1 a:after {
  display: block;
  content: "";
  height: 1px;
  width: 0%;
  position: relative;
  top: -1px;
  background-color: var(--color-accent);
  -webkit-transition: width 0.3s ease;
  -moz-transition: width 0.3s ease;
  -ms-transition: width 0.3s ease;
  transition: width 0.3s ease;
}

.level1 a:hover:after,
.level1 a:focus:after {
  width: 100%;
}

.level1 h1 {
  color: var(--color-text-secondary);
  font-variant: small-caps;
}

.level1 [role="doc-subtitle"] {
  font-size: 1.4em;;
  margin-block-start: -.67em;
  margin-block-end: 0.67em;
}

/* Theme toggle */
#theme-switcher {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: all 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  max-height: 3rem;
  overflow: hidden;
  background: var(--color-light-grey);
  border: 1px solid var(--color-lines);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--color-text);
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 4rem;
  text-align: center;
  box-shadow: var(--shadow-height-one);
}

#theme-switcher.theme-switcher--expanded {
  max-height: none;
  overflow: visible;
}

#theme-switcher.theme-switcher--hidden {
  transform: translateX(-50%) translateY(100%);
  opacity: 0;
  pointer-events: none;
}

#theme-switcher li {
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-lines);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#theme-switcher li:last-child {
  border-bottom: none;
}

#theme-switcher li:not(.active) {
  display: none;
}

#theme-switcher.theme-switcher--expanded li {
  display: block;
}

#theme-switcher li.active {
  background: var(--color-accent);
  color: var(--color-background);
}

#theme-switcher li:hover:not(.active) {
  background: var(--color-accent);
  color: var(--color-background);
}

#theme-switcher li:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

@media (max-width: 768px) {
  #theme-switcher {
    bottom: 1rem;
    font-size: 0.8rem;
    min-width: 3.5rem;
  }

  #theme-switcher li {
    padding: 0.4rem;
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Card styles */
.card {
  background: var(--color-light-grey);
  border: 1px solid var(--color-lines);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card--hero {
  border: none;
  padding: 2rem 1.5rem;
  font-size: 1.125rem;
}

.card h2 {
  margin-top: 0;
  color: var(--color-text);
}

.card h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.card:first-child h1 {
  margin-top: 0;
}

.project-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.project-card {
  background: var(--color-background);
  border: 1px solid var(--color-lines);
  border-radius: var(--border-radius);
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-height-one);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.project-card p {
  margin-bottom: 0;
  line-height: 1.4;
}

/* Interests grid */
.interests-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.interest-item {
  background: var(--color-background);
  border: 1px solid var(--color-lines);
  border-radius: var(--border-radius);
  padding: 1rem;
  line-height: 1.4;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interest-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-height-one);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .card {
    padding: 1rem;
    border-radius: var(--border-radius);
  }
  
  .card--hero {
    padding: 1.5rem 1rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .interests-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .project-card,
  .interest-item {
    padding: 0.75rem;
  }
}

@media (min-width: 769px) {
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .interests-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

#theme-switcher li {
  padding: 0.5rem 2rem;
}