:root {
  --code-font: "Fira Code", "Roboto Mono", monospace;
}

.version-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

hr {
  border-color: var(--outline_variant);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: var(--surface);
  border-radius: 20px;
  margin-bottom: 20px;
  gap: 8px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.header-right {
  margin-left: auto;
}

.header-left .btn,
.header-right .btn {
  flex: 0 1 auto;
  width: auto;
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 5px;
  }

  .header-left,
  .header-right {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: auto;
  }
}

.blog-description,
.blog-title {
  margin: 0px;
  text-align: left;
}

.blog-description {
  color: var(--on_surface_variant);
  font-size: 14px;
  margin-bottom: 2px;
}

.blog-date {
  color: var(--outline);
  font-size: 10px;
  margin: 0px;
}

.blog-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.blog-container > div {
  flex: 0 0 auto;
  min-width: 0;
}

.project-container {
  width: 100%;
  border: 1px solid var(--outline_variant);
  border-radius: 15px;
  padding: 10px;
  background-color: var(--surface_container_low);
  margin-bottom: 1rem;
}

.project-container:hover {
  background-color: var(--surface_container_high);
}

.project-header {
  height: auto;
  width: auto;
  max-width: 160px;
  max-height: 80kpx;
  border-radius: 15px;
}

.project-button-group {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}

.project-info-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.project-text-group {
  display: flex;
  flex-direction: column;
}

.project-title {
  margin: 0 !important;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--on_surface);
}

.project-desc {
  margin: 0 !important;
  color: var(--on_surface_variant);
  font-size: 14px;
}

@media (max-width: 600px) {
  .project-info-group {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 1200px) {
  .project-header {
    max-width: 100%;
    max-height: none;
    width: 100%;
    height: auto;
  }

  .blog-container {
    flex-direction: column;
    align-items: stretch;
  }

  .project-button-group {
    flex-direction: column;
    width: 100%;
  }

  .project-button-group .btn {
    width: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 20px;
  font-size: 14px;
  text-decoration: none;
  box-sizing: border-box;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease,
    border-color 0.2s ease;
  cursor: pointer;
}

.btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  flex-shrink: 0;
}

.btn .btn-icon-trailing {
  margin-right: 0;
  margin-left: 8px;
}

.btn .btn-icon svg {
  width: 18px !important;
  height: 18px !important;
  fill: currentColor;
}

.btn:hover {
  text-decoration: none;
}

.btn-filled {
  background-color: var(--primary) !important;
  color: var(--on_primary) !important;
}

.btn-filled:hover {
  background-color: color-mix(
    in srgb,
    var(--on_primary) 8%,
    var(--primary)
  ) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-outlined {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--outline_variant);
}

.btn-outlined:hover {
  background-color: color-mix(in srgb, var(--primary) 8%, transparent);
}

.btn-tonal {
  background-color: var(--secondary_container);
  color: var(--on_secondary_container);
}

.btn-tonal:hover {
  background-color: color-mix(
    in srgb,
    var(--on_secondary_container) 8%,
    var(--secondary_container)
  );
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 4px;
}

a:hover {
  background-color: var(--surface_container_high);
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

a:active {
  background-color: color-mix(in srgb, var(--primary) 12%, transparent);
}

a:visited {
  color: var(--secondary);
}

a[target="_blank"]::after {
  content: " \2197";
  font-size: 0.8em;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--outline_variant);
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface_container_low) !important;
}

th {
  background: var(--surface_container_high) !important;
  color: var(--on_surface_variant);
  font-weight: 500;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--outline_variant);
}

th:first-child {
  border-top-left-radius: 15px;
}
th:last-child {
  border-top-right-radius: 15px;
}

td {
  padding: 16px;
  color: var(--on_surface);
  border-bottom: 1px solid var(--outline_variant);
}

tr:last-child td:first-child {
  border-bottom-left-radius: 15px;
}

tr:last-child td:last-child {
  border-bottom-right-radius: 15px;
}

tr:last-of-type td {
  border-bottom: none;
}

/* tr:hover td { */
/*   background-color: var(--surface_container_high); */
/* } */

.table-icon svg {
  fill: var(--primary);
  width: 40px;
  height: 40px;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--outline_variant);
  border-radius: 16px;
}

.header-image {
  height: 250px;
  width: 100%;
  aspect-ratio: 16 / 6;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 30px;
}

hr {
  width: 100%;
  height: 1px;
}

.button-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .button-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .header-image {
    height: 200px;
  }
}

body {
  background-color: var(--surface);
  color: var(--on_surface);
  /* margin: 0px; */
  padding: 80px 20px 10px 20px;

  font-size: 16px;
  font-family: "Roboto", sans-serif;
  line-height: 1.5;
  letter-spacing: 0.5px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;

  overflow-x: hidden;
  min-height: 100vh;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 2rem 0 2rem;
  box-sizing: border-box;

  padding-bottom: 0px;

  background-color: var(--surface);
}

.nav-links {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 2px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

@media (max-width: 600px) {
  .navbar {
    top: auto;
    bottom: 0;

    padding: 0 2rem 0.5rem 2rem;
  }

  body {
    padding-top: 0px;
    padding-bottom: 90px;
  }

  .nav-item {
    flex-direction: column-reverse;
  }

  .nav-icon {
    margin-top: 10px;
  }
}

.code-block {
  background: var(--md-sys-color-surface-container-high) !important;
  color: var(--md-sys-color-on-surface);

  padding: 16px;
  border-radius: 16px;
  overflow-x: auto;
  font-family: var(--code-font);
  font-size: clamp(13px, 0.9rem, 15px);

  border: 1px solid var(--md-sys-color-outline-variant);

  scrollbar-width: thin;
  scrollbar-color: var(--md-sys-color-outline-variant) transparent;
}

pre[class*="language-"],
code[class*="language-"],
code {
  background: var(--surface_container) !important;
  border-radius: 10px;
  padding: 1.5px;
}

.code-block {
  background: var(--surface_container_high) !important;
  color: var(--on_surface);

  padding: 16px;
  border-radius: 16px;
  overflow-x: auto;
  font-family: var(--code-font);
  font-size: clamp(13px, 0.9rem, 15px);

  border: 1px solid var(--outline_variant);

  scrollbar-width: thin;
  scrollbar-color: var(--outline_variant) transparent;
}

.code-block code {
  display: block;
  white-space: pre;
  background: transparent !important;
  padding: 0;
  border-radius: 0;
}

:not(pre) > code {
  background: var(--surface_container) !important;
  color: var(--color_primary);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--code-font);
  font-size: 0.9em;
  border: 1px solid var(--outline_variant);
}

.nav-item a .nav-icon svg {
  fill: var(--on_surface);
  transition: fill 0.2s ease;
}

.nav-item a.active .nav-icon svg,
.nav-item a[aria-current="page"] .nav-icon svg {
  fill: var(--primary);
}

.nav-item hr {
  width: 100%;
  border: none;
  height: 1px;
  background-color: var(--outline_variant);
  margin: 0;
  transition: background-color 0.2s ease;
}

/* .nav-item a + hr { */
/*   background-color: grey; */
/* } */

.nav-item a.active + hr,
.nav-item a[aria-current="page"] + hr {
  background-color: var(--primary);
  height: 2px;
}

.nav-item a {
  color: var(--on_surface);
}

.nav-item a.active,
.nav-item a[aria-current="page"] {
  font-weight: 500;
  color: var(--primary);
}

.body,
page-content p {
  font-size: clamp(14px, 4vw, 18px);
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* height: 100vh; */

  text-align: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  margin: 0 auto;
}

.header {
  text-align: center;
}

.page-header-text {
  font-weight: bold;
  margin-bottom: 0px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

html {
  scroll-padding-top: 80px;
  scroll-behavior: smooth;
}

@media (max-width: 600px) {
  html {
    scroll-padding-top: 0px;
  }
}
