/* Libraries & Frameworks */
@import "./bulma/css/bulma.min.css";

/* Custom styles */
@import "./typography.css";
@import "./buttons.css";

:root {
  /* Design system variables */
  --border-radius: 5px;

  /* Theme variables */
  --hero-bg-color-light: rgba(255, 255, 255, 0.65);
  --hero-bg-color-dark: rgba(0, 0, 0, 0.65);
  --text-color-light: #333333;
  --text-color-dark: #ffffff;
  --text-color-secondary-light: #666666;
  --text-color-secondary-dark: #f5f5f5;
  --link-color-light: #2c3e50;
  --link-color-dark: #ffffff;
  --link-hover-color-light: #f40031;
  --link-hover-color-dark: #f40031;
  --accent-color: #f40031;

  /* Default theme (dark background) */
  --hero-bg-color: var(--hero-bg-color-dark);
  --text-color: var(--text-color-dark);
  --text-color-secondary: var(--text-color-secondary-dark);
  --link-color: var(--link-color-dark);
  --link-hover-color: var(--link-hover-color-dark);
}

html,
body {
  height: 100vh;
}

html {
  overflow: hidden;
}

body {
  overflow: auto;
}

body {
  /* Fallback dark background to prevent FOUC */
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  transition: background-image 1s ease-in-out;
}

/* When JavaScript is active, this class will be added */
.dynamic-backgrounds {
  /* JavaScript will override the fallback background */
}

.app-centered {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Light theme - for bright/light background photos */
.theme-light {
  --hero-bg-color: var(--hero-bg-color-light);
  --text-color: var(--text-color-light);
  --text-color-secondary: var(--text-color-secondary-light);
  --link-color: var(--link-color-light);
  --link-hover-color: var(--link-hover-color-light);
}

/* Dark theme - for dark background photos */
.theme-dark {
  --hero-bg-color: var(--hero-bg-color-dark);
  --text-color: var(--text-color-dark);
  --text-color-secondary: var(--text-color-secondary-dark);
  --link-color: var(--link-color-dark);
  --link-hover-color: var(--link-hover-color-dark);
}

.app-centered :not(.content) > p,
.app-centered button.is-outlined {
  color: var(--text-color);
}

/* Button styling for themes */
.theme-light .app-centered button.is-outlined {
  color: var(--text-color-light);
  border-color: var(--text-color-light);
}

.theme-light .app-centered button.is-outlined:hover {
  background-color: var(--text-color-light);
  color: white;
}

.theme-dark .app-centered button.is-outlined {
  color: var(--text-color-dark);
  border-color: var(--text-color-dark);
}

.theme-dark .app-centered button.is-outlined:hover {
  background-color: var(--text-color-dark);
  color: var(--text-color-light);
}

.hero {
  border: var(--hero-bg-color) 1px solid;
  border-radius: var(--border-radius);
}

.md-page-content {
  background-color: var(--hero-bg-color);
  color: var(--text-color);
}

.md-page-content a {
  color: var(--link-color);
}

.md-page-content a:hover {
  color: var(--link-hover-color);
  transition: color 0.2s ease 0s;
  font-weight: 600;
}

.hero.has-text-centered {
  background-color: var(--hero-bg-color);
  border-radius: var(--border-radius);
}

.keenmate-splitter {
  position: relative;
  top: -0.2rem;
}

.gap-1 {
  gap: 1rem;
}
/* 
.button.is-light.is-outlined:hover {
  background-color: #f5f5f5;
  border-color: #f5f5f5;
  color: rgba(0,0,0,.7);
} */

/* BULMA FIXES */
.md-page-content .content h1,
.md-page-content .content h3,
.md-page-content .content h4,
.md-page-content .content h5,
.md-page-content .content h6 {
  color: var(--text-color);
}

.md-page-content h2 {
  color: var(--accent-color);
  position: relative;
}

.md-page-content h2::before {
  content: "[ ";
  color: var(--text-color);
  opacity: 0.6;
  font-weight: 300;
}

.md-page-content h2::after {
  content: " ]";
  color: var(--text-color);
  opacity: 0.6;
  font-weight: 300;
}

/* Theme-specific heading adjustments */
.theme-light .md-page-content h2 {
  font-weight: 600;
}

.theme-dark .md-page-content h2 {
  font-weight: 500;
}

/* Super title theming */
.theme-light .super-title {
  color: var(--text-color-light);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.theme-dark .super-title {
  color: var(--text-color-dark);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Default super title styling if no theme class is applied */
.super-title {
  color: var(--text-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced contrast for better readability */
.theme-light .md-page-content {
  backdrop-filter: blur(2px);
}

.theme-dark .md-page-content {
  backdrop-filter: blur(1px);
}

/* Utility classes for quick theme switching */
.bg-light-photo {
  /* Add this class to body when using light background photos */
  --hero-bg-color: var(--hero-bg-color-light);
  --text-color: var(--text-color-light);
  --text-color-secondary: var(--text-color-secondary-light);
  --link-color: var(--link-color-light);
  --link-hover-color: var(--link-hover-color-light);
}

.bg-dark-photo {
  /* Add this class to body when using dark background photos */
  --hero-bg-color: var(--hero-bg-color-dark);
  --text-color: var(--text-color-dark);
  --text-color-secondary: var(--text-color-secondary-dark);
  --link-color: var(--link-color-dark);
  --link-hover-color: var(--link-hover-color-dark);
}

/* Synchronize border-radius across all UI elements */
.button {
  border-radius: var(--border-radius) !important;
}

/* Ensure consistent border-radius for all interactive elements */
.input,
.textarea,
.select select,
.file-cta,
.file-name,
.pagination-link,
.pagination-next,
.pagination-previous,
.pagination-ellipsis {
  border-radius: var(--border-radius) !important;
}

/* Logo switching based on themes */
.keenmate-logo {
  /* Default logo (for dark backgrounds) */
  content: url("/images/Keenmate-for-black-f0a091db76f4f619e45cef0effc0f9fc.svg?vsn=d");
  height: auto;
  max-width: 100%;
}

/* Light theme - use dark logo for light backgrounds */
.theme-light .keenmate-logo,
.bg-light-photo .keenmate-logo {
  content: url("/images/Keenmate-3e74821a250ffb1105f7fc438a2527d6.svg?vsn=d");
}

/* Dark theme - use light logo for dark backgrounds */
.theme-dark .keenmate-logo,
.bg-dark-photo .keenmate-logo {
  content: url("/images/Keenmate-for-black-f0a091db76f4f619e45cef0effc0f9fc.svg?vsn=d");
}

/* Small logo for navigation */
.keenmate-logo-small {
  /* Default small logo (for dark backgrounds) */
  content: url("/images/Keenmate-for-black-f0a091db76f4f619e45cef0effc0f9fc.svg?vsn=d");
  height: 2rem;
  width: auto;
  flex-shrink: 0;
}

/* Light theme - use dark logo for light backgrounds */
.theme-light .keenmate-logo-small,
.bg-light-photo .keenmate-logo-small {
  content: url("/images/Keenmate-3e74821a250ffb1105f7fc438a2527d6.svg?vsn=d");
}

/* Dark theme - use light logo for dark backgrounds */
.theme-dark .keenmate-logo-small,
.bg-dark-photo .keenmate-logo-small {
  content: url("/images/Keenmate-for-black-f0a091db76f4f619e45cef0effc0f9fc.svg?vsn=d");
}

/* Markdown page navigation styling */
.md-page-navigation {
  background-color: var(--hero-bg-color);
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.md-page-navigation .keenmate-logo {
  max-height: 3rem;
}

/* Ensure proper spacing on markdown pages */
.md-page-content {
  margin-top: 0;
}

/* Responsive adjustments for small logo navigation */
@media screen and (max-width: 768px) {
  .keenmate-logo-small {
    height: 1.5rem;
  }
}

/* Hero body padding adjustment */
.hero-body {
  padding: 1rem 2rem;
}

/* Compact project groups styling */
.project-groups {
  margin-bottom: 2rem;
}

.project-groups .columns {
  align-items: stretch;
}

.project-groups .column {
  display: flex;
}

.project-group {
  flex: 1;
  margin-bottom: 1.5rem;
  padding: 1rem;
  /* background-color: var(--hero-bg-color); */
  border-radius: var(--border-radius);
  border-left: 3px solid var(--accent-color);
  display: flex;
  flex-direction: column;
}

.project-group .group-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-group .group-title i {
  margin-right: 0.5rem;
  color: var(--accent-color);
  width: 1rem;
}

.project-group .group-links {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.project-group .group-links li {
  margin-bottom: 0.25rem;
}

.project-group .group-links a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.1rem 0;
  display: inline-block;
  transition: color 0.2s ease;
}

.project-group .group-links a:hover {
  color: var(--link-hover-color);
  font-weight: 500;
}

/* Responsive adjustments for project groups */
@media screen and (max-width: 768px) {
  .project-groups .column {
    margin-bottom: 0;
  }

  .project-group {
    margin-bottom: 1rem;
  }
}

/* Active navigation button state */
.button.is-light.is-outlined.is-active {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: white !important;
}

/* Theme-specific active button styling */
.theme-light .button.is-light.is-outlined.is-active {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: white !important;
}

.theme-dark .button.is-light.is-outlined.is-active {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: white !important;
}
