/* Global settings */
body {
  color: black;
  font-family: Georgia, serif;
  font-size: 16px;
  margin: auto;
  max-width: 1280px;
  padding: 0 15px; /* Add responsiveness so text doesn't touch screen edges on mobile */
  background-color: #ffffff;
}

/* Header styling */
div#header {
  font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
  border-bottom: 2px solid rgb(153, 213, 125);
  margin-bottom: 30px;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* responsive wrap */
  gap: 15px;
}

div#logo a {
  color: black;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
}

div#header #navigation {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

div#header #navigation a {
  color: #527bbd;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
}

div#header #navigation a:hover {
  text-decoration: underline;
}

/* Footer styling */
div#footer {
  border-top: solid 2px rgb(153, 213, 125);
  color: #555;
  font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
  font-size: 12px;
  margin-top: 30px;
  padding: 12px 0;
  text-align: right;
}

div#content {
  margin: 15px 0;
}

div.separateli li,
.separateli li {
  border-bottom: 1px solid #7f7f7f4a;
  padding: 8px 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Publication filter bar */
.pub-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
}

.filter-btn {
  font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: #527bbd;
  background: #fff;
  border: 1.5px solid #527bbd;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  min-height: 36px;
}

.filter-btn:hover {
  background: #eaf1fa;
}

.filter-btn.active {
  background: #527bbd;
  color: #fff;
}

.filter-btn:focus-visible {
  outline: 2px solid #007B93;
  outline-offset: 2px;
}

div.colorli li {
  color: #A34D32;
}

/* Headings */
h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

h1, h2 {
  color: #527bbd;
  font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
  margin-top: 25px;
  margin-bottom: 15px;
}

h3 {
  color: #A34D32;
  margin-top: 15px;
  margin-bottom: 10px;
}

/* Links */
a, a:link, a:visited, a:active {
  color: #007B93;
}

a:hover {
  text-decoration: underline;
}

div.info {
  color: #555;
  font-size: 14px;
  font-style: italic;
}

/* Image alignment */
.alignright {
  float: right;
  padding: 15px;
}

/* Academic Environments */
.theorem {
  display: block;
  margin: 12px 0;
  font-style: italic;
}

.theorem:before {
  content: "Theorem. ";
  font-weight: bold;
  font-style: normal;
}

.lemma {
  display: block;
  margin: 12px 0;
  font-style: italic;
}

.lemma:before {
  content: "Lemma. ";
  font-weight: bold;
  font-style: normal;
}

.proof {
  display: block;
  margin: 12px 0;
  font-style: normal;
}

.proof:before {
  content: "Proof. ";
  font-style: italic;
}

.proof:after {
  content: "\25FC";
  float: right;
}

.definition {
  display: block;
  margin: 12px 0;
  font-style: normal;
}

.definition:before {
  content: "Definition. ";
  font-weight: bold;
  font-style: normal;
}

/* Make images fluid by default */
img {
  max-width: 100%;
  height: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    font-size: 15px;
    padding: 0 12px;
  }

  div#header {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding-bottom: 15px;
    gap: 10px;
  }

  div#header #navigation {
    justify-content: center;
    gap: 18px;
  }

  div#header #navigation a {
    font-size: 16px;
    padding: 6px 4px; /* larger touch target */
  }

  div#logo a {
    font-size: 17px;
  }

  .alignright {
    float: none;
    display: block;
    margin: 0 auto;
    text-align: center;
    padding: 15px 0;
  }

  h1 { font-size: 21px; }
  h2 { font-size: 18px; }

  .pub-filter {
    gap: 6px;
  }

  .filter-btn {
    font-size: 14px;
    padding: 6px 12px;
  }

  div.separateli li,
  .separateli li {
    padding: 10px 0;
  }
}

@media (max-width: 420px) {
  div#header #navigation {
    gap: 14px;
  }
  .pub-filter {
    justify-content: stretch;
  }
  .filter-btn {
    flex: 1 1 auto;
  }
}