:root {
  color-scheme: light dark;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('/fonts/BerkeleyMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('/fonts/BerkeleyMono-Oblique.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('/fonts/BerkeleyMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('/fonts/BerkeleyMono-Bold-Oblique.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

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

body {
  color: light-dark(#732B3B, #ECE4CC);
  background-color: light-dark(#ECE4CC, #343454);
  font-family: 'Berkeley Mono', monospace;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
}

img, picture {
  max-width: 100%;
  height: auto;
}

.row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
}

.column {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  flex: 1;
}

#greeting {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  padding-right: 2rem;
}

#greeting-header {
  font-size: 5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

#greeting-body {
  font-size: 1.3rem;
  line-height: 1.8;
}

.image-column {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-img--dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .theme-img--light {
    display: none;
  }
  .theme-img--dark {
    display: block;
  }
}

.image-column .theme-img {
  max-width: 420px;
  border-radius: 4px;
}

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem 0;
}

#navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

#navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

#navbar-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

#navbar-links a {
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#navbar-links a:hover,
#navbar-links a.active {
  opacity: 1;
}

.blog-list {
  list-style: none;
  padding: 0;
}

.blog-list li {
  padding: 1rem 0;
  border-bottom: 1px solid light-dark(rgba(115, 43, 59, 0.2), rgba(236, 228, 204, 0.2));
}

.blog-list li:last-child {
  border-bottom: none;
}

.blog-list a {
  text-decoration: none;
}

.blog-list a:hover {
  text-decoration: underline;
}

.blog-list .post-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.blog-list .post-date {
  font-size: 0.85rem;
  opacity: 0.6;
}

.blog-list .post-description {
  margin-top: 0.5rem;
  opacity: 0.8;
}

.blog-post {
  max-width: 720px;
}

.blog-post h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.blog-post .post-meta {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 2rem;
}

.blog-post h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post p {
  margin-bottom: 1rem;
}

.blog-post code {
  font-family: 'Berkeley Mono', monospace;
  background: light-dark(rgba(115, 43, 59, 0.1), rgba(236, 228, 204, 0.1));
  padding: 0.15em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
}

.blog-post pre {
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.blog-post pre code {
  background: none;
  padding: 0;
}

@media (prefers-color-scheme: dark) {
  .astro-code,
  .astro-code span {
    color: var(--shiki-dark) !important;
    background-color: var(--shiki-dark-bg) !important;
  }
}

.blog-post ul, .blog-post ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.blog-post blockquote {
  border-left: 3px solid light-dark(#732B3B, #ECE4CC);
  padding-left: 1rem;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.admonition {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: light-dark(rgba(115, 43, 59, 0.06), rgba(236, 228, 204, 0.06));
  border-radius: 6px;
}

.admonition-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-bg {
  fill: light-dark(#732B3B, #ECE4CC);
}

.avatar-fg {
  fill: light-dark(#ECE4CC, #343454);
}

.admonition-content {
  flex: 1;
  min-width: 0;
}

.admonition-content p:last-child {
  margin-bottom: 0;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.blog-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.blog-header .page-title {
  margin-bottom: 0;
}

.rss-button {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.35em 0.8em;
  border: 1.5px solid light-dark(#732B3B, #ECE4CC);
  border-radius: 3px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.rss-button:hover {
  opacity: 1;
}

.light {
  color-scheme: light;
}
.dark {
  color-scheme: dark;
}

@media (max-width: 768px) {
  .row {
    flex-direction: column;
  }
  #greeting {
    padding-right: 0;
    padding-bottom: 2rem;
  }
  .image-column {
    padding-top: 1rem;
  }
}