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

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

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

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

/* Loading styles */
body {
  font-family: monospace;
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  background-color: white;
  color: black;
  opacity: 1;
  transition: none;
}

body.loaded {
  opacity: 1;
}

/* restore custom font after everything loads */
body.fonts-loaded {
  font-family: 'Berkeley Mono', monospace;
}

a {
  color: black; /* Light mode default, overridden by media query if dark mode */
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Loading variables */
:root {
  --loader-fade-duration: 1s; /* Increase fade duration for better visibility */
}

@media (prefers-color-scheme: dark), html.dark-theme {
  body {
    background-color: #121212; /* Darker, more standard dark mode background */
    color: #e4e4e4; /* Slightly off-white for better reading comfort */
  }
  
  a {
    color: #e4e4e4; /* Match text color for consistent look */
  }
  
  a:hover {
    color: #a2d7ff; /* Brighter blue for better contrast */
  }
  
  /* Project-specific hover colors */
  #chi:hover {
    color: #ff7a5e; /* Brighter tomato for better visibility */
  }
  
  #leaf:hover {
    color: #a0ffa0; /* Brighter green for better contrast */
  }
  
  #gitback:hover {
    color: #a2d7ff; /* Match standard hover color */
  }
  
  #font:hover {
    color: #ffffff; /* Pure white for font link hover */
  }

  /* Footer dark mode improvements */
  #footer {
    color: #909090; /* Slightly darker to avoid too much attention */
  }
  
  #footer a:hover {
    color: #cecece; /* Lighter on hover for better feedback */
  }
  
  .webring-separator {
    color: #909090; /* Match footer color */
  }
}

.container {
  text-align: left;
  font-size: 1.2em;
  line-height: 1.5;
  max-width: 1000px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
}

pre {
  white-space: pre-wrap;
  margin: 0;
  width: 45%;
  box-sizing: border-box;
}

#cat-container {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#cat-container img {
  border-radius: 15px;
  max-width: 100%;
}

a:hover {
  color: #63a3ff; /* Light mode default, overridden by media query if dark mode */
}
/* Custom colors for projects */
#chi:hover {
  color: #ff6347;
}

#leaf:hover {
  color: #32cd32;
}

#gitback:hover {
  color: #63a3ff;
}

#font:hover {
  color: #b4b4b4;
}

/* individual hover for footer links */
#footer a:hover {
  color: #757575;
}

/* Footer styling */
#footer {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  color: #b0b0b0;
  font-size: 0.9em;
  z-index: 1000;
}
#footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Webring styles */
.webring-separator {
  display: inline-block;
  margin: 0 5px;
  color: #b0b0b0;
  opacity: 0.5;
}

.webring-links {
  display: flex;
  gap: 4px;
  align-items: center;
  color: inherit;
}

/* Simple loaders */
#light-mode-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease;
}

#dark-mode-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #121212;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.loader-text-light {
  font-family: monospace;
  color: #555;
  font-size: 1em;
}

.loader-text-dark {
  font-family: monospace;
  color: #bdbdbd;
  font-size: 1em;
}

.fade-out {
  opacity: 0 !important;
}