/* core/static/core/css/base.css */

@import url("fonts.19c7738f4d07.css");

/* === RESET & NORMALIZE === */

*, *::before, *::after {
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 2rem;
}

hr {
  margin: 1rem 0;
  color: inherit;
  border: 0;
  border-top: 1px solid;
  opacity: 0.25;
}

/* === CUSTOM PROPERTIES === */

:root {
  --main-bg: #59694f;
  --navbar-color: #4c5a43;
  --accent-color: #007bff;
  --border-color: #959595;
  --text-color: #feffe9;
  --link-color: #dca85a;
  --link-hover-color: #c0882a;
  --recent-card-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.25);
  --recent-item-bg: rgba(255, 255, 255, 0.98);
  --recent-item-hover-bg: rgba(220, 168, 90, 0.1);
  --recent-badge-note-bg: rgba(220, 168, 90, 0.15);
  --recent-badge-note-border: rgba(220, 168, 90, 0.4);
  --recent-badge-blog-bg: rgba(192, 132, 252, 0.15);
  --recent-badge-blog-color: #d4aaff;
  --recent-badge-blog-border: rgba(192, 132, 252, 0.4);
  --recent-date-color: rgba(232, 228, 223, 0.65);
}

/* === BASE ELEMENTS === */

html {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--main-bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: "Geologica", sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  text-align: justify;
  background-color: var(--main-bg);
  color: var(--text-color);
}

a {
  color: var(--link-color);
  text-decoration: underline;
}

a:hover {
  color: var(--link-hover-color);
}

@media (min-width: 576px) {
  body {
    font-size: 1rem;
  }
}

/* === CONTAINER === */

.container {
  width: 100%;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

/* === VERTICAL RULE === */

.vr {
  display: inline-block;
  align-self: stretch;
  width: 1px;
  min-height: 1em;
  background-color: currentColor;
  opacity: 0.25;
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}

/* === BUTTON === */

.btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  color: inherit;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  border-radius: 0.5rem;
}

/* === NAVIGATION === */

.nav-link {
  display: block;
  padding: 0.25rem 0.5rem;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.nav-link:hover {
  text-decoration: underline;
}

.nav-link.active {
  font-weight: 600;
}

/* === COLLAPSE === */

.collapse:not(.show) {
  display: none;
}

/* === PAGINATION === */

.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  gap: 0.25rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.page-item .page-link {
  display: block;
  padding: 0.375rem 0.75rem;
  color: var(--link-color);
  text-decoration: none;
  background-color: var(--navbar-color);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.page-item.disabled .page-link {
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.page-item.active .page-link {
  color: #fff;
  background-color: var(--link-color);
  border-color: var(--link-color);
}

/* === SITE LAYOUT === */

header {
  background-color: var(--navbar-color);
  border-color: var(--border-color);
  padding: 1rem 0;
  margin: 0;
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo-link {
  display: flex;
  align-items: center;
  color: var(--link-color);
  height: 2em;
  flex-shrink: 1;
  min-width: 0;
}

@media (min-width: 576px) {
  .site-logo-link {
    height: 3.5em;
  }
}

.site-logo-link svg {
  width: auto;
  height: 100%;
}

.site-logo-link:hover {
  color: var(--link-hover-color);
}

.site-nav {
  display: none;
  align-items: stretch;
  align-self: stretch;
  gap: 0.5rem;
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
}

.site-nav-link {
  display: flex;
  align-items: center;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 400;
  font-size: 1.5rem;
  padding: 0 0.75rem;
  margin-top: -1rem;
  margin-bottom: -1rem;
  border-radius: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav-link:hover,
.site-nav-link:focus {
  background-color: rgba(0, 0, 0, 0.12);
  color: var(--text-color);
}

.site-nav-divider {
  width: 1px;
  align-self: stretch;
  background-color: var(--border-color);
  opacity: 0.5;
  margin: 0.5rem 0.25rem;
}

.site-body {
  flex-grow: 1;
  display: flex;
}

main {
  flex-grow: 1;
  overflow: auto;
}

.main-content-wrapper {
  padding: 1.5rem 1.25rem;
}

@media (min-width: 768px) {
  .main-content-wrapper {
    padding: 1.5rem 2.5rem;
  }
}

@media (min-width: 1200px) {
  .main-content-wrapper {
    padding: 1.5rem 4rem;
  }
}

footer {
  background-color: var(--navbar-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  padding: 0.75rem 0;
  margin-top: auto;
}

@media (min-width: 576px) {
  footer {
    font-size: 0.8em;
    flex-direction: row;
    gap: 1.5rem;
    padding: 0.5rem 0;
  }
}

footer p {
  margin: 0;
}

footer a {
  color: var(--link-color);
}

footer a:hover {
  color: var(--link-hover-color);
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.footer-social-link svg {
  width: 28px;
  height: 28px;
}

@media (min-width: 576px) {
  .footer-social-link {
    min-width: unset;
    min-height: unset;
  }

  .footer-social-link svg {
    width: 16px;
    height: 16px;
  }
}

.blog-content img,
.note-content img {
  max-width: 100%;
  height: auto;
}

/* === MOBILE NAV === */

.nav-hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  color: inherit;
  margin-left: auto;
}

@media (min-width: 900px) {
  .nav-hamburger-btn {
    display: none;
  }
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.45);
}

body.nav-drawer-active .nav-backdrop {
  display: block;
}

.nav-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 16rem;
  max-width: 80vw;
  z-index: 1050;
  background-color: var(--navbar-color);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.nav-mobile-menu.nav-mobile-open {
  transform: translateX(0);
}

@media (min-width: 900px) {
  .nav-mobile-menu {
    display: none;
  }
}

.nav-mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.4rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease;
}

.nav-mobile-link:hover,
.nav-mobile-link:focus {
  background-color: rgba(0, 0, 0, 0.12);
  color: var(--text-color);
}

.nav-mobile-close-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.25rem 0.25rem 1rem;
  user-select: none;
  -webkit-user-select: none;
}

.nav-mobile-close-btn:hover svg,
.nav-mobile-close-btn:focus svg {
  opacity: 0.7;
}

.nav-mobile-close-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.nav-mobile-close-btn svg {
  pointer-events: none;
}

/* === HOME PAGE === */

#home-page-jumbo {
  border: 0.1rem solid;
  border-radius: 1rem;
  position: relative;
  background-size: cover;
  background-position: bottom;
  border-color: var(--border-color);
  background-image: url("/static/core/img/category-title/home-title.8ceddb9296c1.webp");
}

#home-page-jumbo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 1rem;
}

#home-page-jumbo > * {
  position: relative;
  z-index: 2;
}

.accent-button {
  background-color: var(--link-color);
  border-color: var(--link-color);
  color: #fff;
}

.accent-button:hover,
.accent-button:focus {
  background-color: var(--link-hover-color);
  border-color: var(--link-hover-color);
  color: #fff;
}

/* === CATEGORY PAGE === */

#category-title-box {
  position: relative;
  background-size: cover;
  background-color: var(--navbar-color);
  border-radius: 0.75rem;
  color: var(--text-color);
  padding: 1.5rem 0;
  text-align: center;
  margin-bottom: 1rem;
}


.category-title-row {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 1rem 0;
}

@media (min-width: 992px) {
  .category-title-row {
    padding: 1.5rem 0;
  }
}

.category-title-content {
  width: 100%;
  max-width: 600px;
  padding: 0 0.75rem;
}

#category-description {
  margin-bottom: 0;
}

.category-subheading {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

.category-subheading a {
  text-decoration: none;
  font-weight: 700;
}

.flashcard-count {
  font-weight: 400;
  color: var(--text-color);
}

.category-cards-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .category-cards-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .category-cards-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: row;
  min-width: 0;
  word-wrap: break-word;
}

.category-card-thumbnail-wrapper {
  width: 40%;
  flex-shrink: 0;
  min-height: 120px;
  border-radius: 0.375rem;
  overflow: hidden;
}

.category-card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.category-card:hover .category-card-thumbnail {
  transform: scale(1.05);
}

.category-card-body {
  flex: 1 1 auto;
  padding: 1rem;
}

.category-card-title {
  margin-bottom: 0.25rem;
  font-size: 1em;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card-subtitle {
  margin-bottom: 0;
  font-size: 0.85em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stretched-link {
  text-decoration: none;
}

.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}

/* === HOME PAGE RECENT POSTS === */

.recent-posts-card {
  border: 0.1rem solid var(--border-color);
  border-radius: 1rem;
  padding: 1.75rem;
  background-color: var(--main-bg);
  box-shadow: var(--recent-card-shadow);
  backdrop-filter: blur(6px);
}

.recent-posts-card-header {
  margin-bottom: 1.5rem;
}

.recent-posts-title {
  margin-bottom: 0.35rem;
}

.recent-posts-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--recent-date-color);
}

.recent-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.recent-post-item {
  position: relative;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background-color: var(--navbar-color);
  border: 0.1rem solid;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.recent-post-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-color);
  background-color: var(--recent-item-hover-bg);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.08);
}

.recent-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.recent-post-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  border: 0.1rem solid currentColor;
}

.recent-post-badge--note {
  background-color: var(--recent-badge-note-bg);
  color: var(--link-hover-color);
  border-color: var(--recent-badge-note-border);
}

.recent-post-badge--blog {
  background-color: var(--recent-badge-blog-bg);
  color: var(--recent-badge-blog-color);
  border-color: var(--recent-badge-blog-border);
}

.recent-post-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.recent-post-link:hover,
.recent-post-link:focus {
  text-decoration: underline;
  color: var(--link-color);
}

.recent-post-date {
  font-size: 0.85rem;
  color: var(--recent-date-color);
}

.recent-posts-empty {
  margin: 0;
}

/* === MISC === */

.date-text {
  color: var(--recent-date-color);
}

pre code.hljs {
  background: #f0f0f0 !important;
  color: #383a42;
}

/* === BLOG DETAIL LAYOUT === */

.blog-detail-wrapper {
  display: grid;
  grid-template-columns: 22rem minmax(0, 1fr);
  gap: 0 1rem;
  align-items: start;
}

.blog-detail-wrapper > article {
  grid-column: 1 / -1;
  min-width: 0;
}

@media (min-width: 1100px) {
  .blog-detail-wrapper:has(.blog-toc.has-items) > article {
    grid-column: 2;
  }
}

.blog-toc {
  display: none;
}

/* Large screens: sticky sidebar in grid column 1 */
@media (min-width: 1100px) {
  .blog-toc.has-items {
    display: block;
    grid-column: 1;
    position: sticky;
    top: 1.5rem;
    width: 100%;
  }
}


.toc-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--recent-date-color);
  margin: 0 0 0.5rem 0;
}

.toc-list,
.toc-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list {
  border-left: 2px solid var(--border-color);
}

.toc-list ul {
  padding-left: 0.6rem;
}

.toc-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.toc-item a {
  flex: 1;
  display: block;
  padding: 0.25rem 0.75rem;
  color: var(--recent-date-color);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.toc-h1 > a { font-size: 1.2rem; font-weight: 600; }
.toc-h2 > a { font-size: 1.1rem; }
.toc-h3 > a { font-size: 1.05rem; }

.toc-item > ul {
  flex-basis: 100%;
}

.toc-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.25rem 0 0.25rem 0.75rem;
  cursor: pointer;
  color: var(--recent-date-color);
  font-size: 0.6rem;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.toc-toggle svg {
  display: block;
  transition: transform 0.15s ease;
}

.toc-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.toc-toggle:hover {
  color: var(--link-color);
}

.toc-item a:hover {
  color: var(--link-color);
}

.toc-item.active > a {
  color: var(--link-color);
  font-weight: 600;
}

.toc-num {
  font-family: monospace;
  opacity: 0.55;
  margin-right: 0.3em;
  font-size: 0.85em;
}

/* === RESUME / CV PAGE === */

.education:nth-child(even), .experience:nth-child(even), .publications:nth-child(even), .conference-attendance:nth-child(even), .certificates:nth-child(even), .teaching:nth-child(even), .grants:nth-child(even), .other-skills:nth-child(even) {
  background-color: var(--navbar-color);
}

.my-name {
  color: var(--link-color);
}
