@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap');

:root {
  --color-primary: #e6e2d6;
  --color-bg: #0f1214;
}

* {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

html {
  scroll-behavior: smooth;
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--color-bg);
  color: var(--color-primary);
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 1.05rem;
  line-height: 1.7;
}

@font-face {
  font-family: 'Iosevka NF Mono';
  src: url('/assets/fonts/IosevkaNerdFontMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  /* font-display: swap; */
}

@font-face {
  font-family: 'Iosevka NF Mono';
  src: url('/assets/fonts/IosevkaNerdFontMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}


/* Navbar styling */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 2px solid white;
  margin-bottom: 2rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.navbar-nav li {
  margin: 0;
}

.navbar-nav a {
  color: white;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s ease;
}

.navbar-nav a:hover {
  color: #ccc;
}

/* Git Gud dropdown styling */
.git-gud-dropdown {
  position: relative;
}

.git-gud-toggle {
  cursor: pointer;
}

.git-gud-posts {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-bg);
  border: 2px solid white;
  min-width: 200px;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1000;
}

.git-gud-posts li {
  margin: 0;
}

.git-gud-posts a {
  display: block;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  font-weight: 400;
  border-bottom: 1px solid #333;
}

.git-gud-posts a:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.git-gud-posts a:last-child {
  border-bottom: none;
}

.git-gud-dropdown:hover .git-gud-posts {
  display: block;
}

/* Link styling */
a {
  background-color: transparent;
  color: var(--color-primary);
  line-height: 1.6em;
  text-decoration: underline;
  -webkit-text-decoration-skip-ink: all;
  text-decoration-skip-ink: all;
  text-decoration-style: solid;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
  text-decoration-color: var(--color-primary);
  outline: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

a:active {
  outline: 0;
}

/* Content styling */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  line-height: 1.8;
}

/* Paragraph spacing */
p {
  margin-bottom: 1.5rem;
}

/* List spacing */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.8rem;
}

/* Heading spacing */
h1, h2, h3, h4, h5, h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* ASCII art styling */
pre {
  font-family: 'Iosevka NF Mono', monospace;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--color-primary);
  white-space: pre;
  overflow-x: auto;
  margin: 2rem 0;
}

/* Code block styling */
pre {
  position: relative;
  margin: 2rem 0;
  border: 3px solid var(--color-primary);
  background-color: #1a1f23;
  overflow: hidden;
}

pre::before {
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--color-primary);
  color: var(--color-bg);
  /* padding: 0.3rem 0.8rem; */
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

pre code {
  display: block;
  padding: 1.5rem 1.5rem 1.5rem;
  font-family: 'Iosevka NF Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e6e2d6;
  overflow-x: auto;
  white-space: pre;
  background: none;
  border: none;
  margin: 0;
}

/* Inline code styling */
:not(pre) > code {
  background-color: #1a1f23;
  color: #ff6b6b;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Iosevka NF Mono', monospace;
  font-size: 0.9em;
  border: 1px solid #444;
  position: relative;
  display: inline-block;
}

/* Add a subtle animation to code blocks */
pre:hover {
  box-shadow: 0 0 15px rgba(230, 226, 214, 0.3);
  transform: translateY(-2px);
}

/* Special styling for code blocks with language indicators */
pre[class*="language-"]::before {
  content: attr(class);
  text-transform: uppercase;
  font-size: 0.6rem;
}

/* Image toggle styling */
.image-toggle {
  margin: 2rem 0;
}

.toggle-input {
  display: none;
}

.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 40px;
  background-color: var(--color-bg);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  cursor: pointer;
  font-family: 'Iosevka NF Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  margin-bottom: 1rem;
  vertical-align: top;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.toggle-button:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.toggle-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.toggle-input:checked ~ .toggle-content {
  max-height: 1000px;
  opacity: 1;
}

.toggle-input:checked ~ .toggle-button {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.toggle-input:checked ~ .toggle-button::after {
  content: "Hide";
  font-size: 0.9rem;
  display: inline-block;
}

.toggle-button::after {
  content: "Reveal";
  font-size: 0.9rem;
  display: inline-block;
}

.toggle-content img {
  border: 2px solid var(--color-primary);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Image styling */
img {
  max-width: 100%;
  height: auto;
  border: 2px solid white;
  margin: 1rem 0;
}

/* Custom text selection color */
::selection {
  background-color: #ffcc00; /* Yellow background */
  color: #000; /* Black text */
}

/* For Firefox */
::-moz-selection {
  background-color: #ffcc00; /* Yellow background */
  color: #000; /* Black text */
}