/* css styles */
/* Academic-journal styling for the personal website */

:root {
  --ink: #252422;
  --muted-ink: #6b6862;
  --paper: #fffefa;
  --rule: #d9d5cc;
  --accent: #732c35;
  --accent-dark: #48171d;
}

body {
  color: var(--ink);
  background-color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.75;
}

.navbar {
  background-color: var(--paper) !important;
  border-bottom: 1px solid var(--rule);
  font-family: Arial, Helvetica, sans-serif;
}

.navbar-title {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.navbar-nav .nav-link {
  color: #46433f;
  font-size: 0.92rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  line-height: 1.25;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  margin-top: 2.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}

h3 {
  margin-top: 1.8rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-dark);
}

a.cv-institution {
  font-weight: 700;
}

.quarto-title-meta {
  margin-top: 1rem;
  padding: 0.8rem 0;
  color: var(--muted-ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
}

blockquote {
  margin: 1.75rem 0;
  padding-left: 1.25rem;
  color: #4d4944;
  border-left: 3px solid var(--accent);
  font-style: italic;
}

code {
  font-size: 0.9em;
}

pre {
  border: 1px solid #e3dfd7;
  border-radius: 3px;
}

.math.display {
  margin: 1.75rem 0;
  overflow-x: auto;
}

/* Proof-oriented mathematical exposition */
.theorem,
.lemma,
.proposition,
.corollary,
.definition {
  margin: 1.6rem 0;
  padding: 1rem 1.15rem;
  background: #f8f6f1;
  border-left: 4px solid var(--accent);
  border-radius: 2px;
}

.example,
.remark {
  margin: 1.4rem 0;
  padding: 0.85rem 1.05rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.proof,
.proof-sketch {
  margin: 1.25rem 0 1.75rem;
  padding-left: 1.15rem;
  border-left: 2px solid var(--rule);
}

.proof::after {
  content: "\25A1";
  float: right;
  color: var(--muted-ink);
}

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

.theorem p:last-child,
.lemma p:last-child,
.proposition p:last-child,
.corollary p:last-child,
.definition p:last-child,
.example p:last-child,
.remark p:last-child,
.proof p:last-child,
.proof-sketch p:last-child {
  margin-bottom: 0;
}

.sidebar,
#TOC,
.page-footer {
  font-family: Arial, Helvetica, sans-serif;
}

#TOC {
  font-size: 0.88rem;
}

.page-footer {
  color: var(--muted-ink);
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.home-intro-photo {
  padding-top: 0.4rem;
  text-align: center;
}

img.profile-photo {
  width: 190px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 50%;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 18rem;
  margin-top: 1rem;
}

.social-link {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.social-link .social-icon {
  font-size: 1.55rem;
  line-height: 1;
  text-align: center;
}

.social-link .btn {
  text-align: left;
}

.social-icon-linkedin {
  color: #0a66c2;
}

.social-icon-facebook {
  color: #1877f2;
}

.social-icon-x {
  color: #111111;
}

.study-topic {
  display: grid;
  grid-template-columns: minmax(160px, 24%) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}

.study-topic-image p {
  margin: 0;
}

.study-topic-art {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 0.35rem;
}

.study-topic-copy > :first-child {
  margin-top: 0;
}

.study-topic-copy > :last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-intro-photo {
    grid-row: 1;
    padding-top: 0;
  }

  .study-topic {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .study-topic-image {
    width: min(72vw, 280px);
    margin: 0 auto;
  }

}
