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

:root {
  /* Theme Variables (Dark Mode Default - Orange Accent) */
  --bg-primary: #0a0c10; /* Darker background */
  --bg-secondary: #10141a; /* Darker secondary */
  --text-primary: #e6edf3; /* Slightly brighter text */
  --text-secondary: #9a9fa5; /* Adjusted secondary text */
  --accent-primary: #FFA500; /* Orange */
  --accent-secondary: #cc8400; /* Darker Orange */
  --card-bg: rgba(22, 27, 34, 0.75); /* Translucent dark card */
  --card-border: rgba(255, 165, 0, 0.2); /* Faint orange border */
  --card-shadow: rgba(0, 0, 0, 0.3); /* Softer shadow */
  --sidebar-bg: rgba(13, 17, 23, 0.8); /* Darker translucent sidebar */
  --header-bg: rgba(13, 17, 23, 0.8);
  --input-bg: rgba(22, 27, 34, 0.9);
  --input-border: rgba(255, 165, 0, 0.3);
  --search-icon: var(--text-secondary);
  --hover-bg: rgba(255, 165, 0, 0.1);
  --link-color: var(--accent-primary);
  --link-hover-color: #ffcc66; /* Lighter orange for hover */
  --button-bg: var(--accent-primary);
  --button-text: #0d1117; /* Dark text on orange button */
  --button-hover-bg: var(--accent-secondary);
  --modal-bg: rgba(22, 27, 34, 0.95);
  --modal-border: rgba(255, 165, 0, 0.4);
  --modal-overlay-bg: rgba(0, 0, 0, 0.7);

  /* New Accent Colors */
  --accent-blue: #3b82f6; /* Tailwind Blue 500 */
  --accent-cyan: #06b6d4; /* Tailwind Cyan 500 */
  --accent-blue-hover: #2563eb; /* Tailwind Blue 600 */
  --accent-cyan-hover: #0891b2; /* Tailwind Cyan 600 */
  --accent-blue-focus-ring: rgba(59, 130, 246, 0.3); /* Adjusted Blue focus ring opacity */
  --accent-cyan-focus-ring: rgba(6, 182, 212, 0.3); /* Adjusted Cyan focus ring opacity */


  /* Font Variables */
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  /* Sizing */
  --header-height: 4rem;
  --sidebar-width: 260px;
  --card-border-radius: 12px; /* Increased radius */
  --btn-border-radius: 6px;
  --transition-speed: 0.2s;
  --mobile-menu-height: 4rem; /* Define mobile menu height */
}

/* Light Mode Override (Optional - can be toggled via JS) */
.light-mode {
  --bg-primary: #f6f8fa;
  --bg-secondary: #e1e4e8;
  --text-primary: #24292e;
  --text-secondary: #586069;
  --accent-primary: #f97316; /* Different orange for light mode? */
  --accent-secondary: #dd6b20;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(0, 0, 0, 0.1);
  --card-shadow: rgba(0, 0, 0, 0.1);
  --sidebar-bg: rgba(246, 248, 250, 0.9);
  --header-bg: rgba(246, 248, 250, 0.9);
  --input-bg: rgba(255, 255, 255, 0.95);
  --input-border: rgba(0, 0, 0, 0.2);
  --search-icon: #586069;
  --hover-bg: rgba(249, 115, 22, 0.1);
  --link-color: var(--accent-primary);
  --link-hover-color: var(--accent-secondary);
  --button-bg: var(--accent-primary);
  --button-text: #ffffff;
  --button-hover-bg: var(--accent-secondary);
  --modal-bg: rgba(255, 255, 255, 0.98);
  --modal-border: rgba(249, 115, 22, 0.4);
  --modal-overlay-bg: rgba(0, 0, 0, 0.5);
  --scrollbar-thumb-light: #c1c1c1;
  --scrollbar-track-light: var(--bg-secondary);
  --glow-light: rgba(0, 0, 0, 0.1); /* Subtle dark glow for light mode */
}

/* Light Mode Overrides */
.light-mode .main-title {
  /* Override gradient with solid color for light mode */
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--text-primary); /* Use primary text color */
  text-shadow: 0 0 8px var(--glow-light); /* Use subtle dark glow */
}

.light-mode #modal-body h2 {
   text-shadow: 0 0 6px var(--glow-light); /* Subtle dark glow */
}

.light-mode .logo {
   text-shadow: 0 0 6px var(--glow-light);
}

.light-mode .card:hover {
  box-shadow: 0 10px 25px var(--card-shadow), 0 0 15px var(--glow-light); /* Subtle dark glow */
}

.light-mode .theme-toggle:hover,
.light-mode .github-link:hover,
.light-mode .menu-toggle:hover,
.light-mode .nav-link:hover {
  box-shadow: 0 0 15px var(--glow-light); /* Subtle dark glow */
}

.light-mode .nav-link-sidebar:hover,
.light-mode .category-item:hover {
   box-shadow: 0 0 15px var(--glow-light); /* Subtle dark glow */
}

.light-mode .card-content .category {
  color: var(--accent-cyan-hover); /* Use darker cyan for better contrast */
}


/* General Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.7;
  min-height: 100vh;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  /* Subtle gradient background */
  background-image: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  color: inherit;
  font-family: inherit;
}

/* App Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.header-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  transition: color var(--transition-speed);
  text-shadow: 0 0 6px var(--accent-primary); /* Slightly stronger glow */
}

.logo span {
  margin-right: 0.5rem;
  font-size: 1.8rem;
  display: inline-block;
  filter: drop-shadow(0 0 3px var(--accent-primary));
}
.logo:hover {
    text-decoration: none;
    opacity: 0.9;
}

.search-container {
  flex: 1;
  max-width: 500px;
  margin: 0 1rem;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--search-icon);
  transition: color var(--transition-speed);
  font-size: 0.9rem;
}

#search-input {
  width: 100%;
  padding: 0.6rem 0.8rem 0.6rem 2.2rem;
  border-radius: var(--btn-border-radius);
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-speed);
}

#search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

#search-input:focus {
  border-color: var(--accent-blue); /* Use blue for focus border */
  box-shadow: 0 0 0 3px var(--accent-blue-focus-ring); /* Blue focus ring */
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.theme-toggle, .github-link, .menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all var(--transition-speed);
  border: 1px solid transparent;
  background-color: transparent; /* Ensure button background is transparent */
}

.theme-toggle:hover, .github-link:hover, .menu-toggle:hover, .nav-link:hover {
  background-color: var(--hover-bg);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.5); /* Added orange glow */
}

/* Style for header navigation links (use theme-toggle style as base) */
.nav-link {
    /* Inherits styles from .theme-toggle */
    /* Add any specific overrides if needed */
}

.menu-toggle {
  display: none; /* Hidden by default, shown in media query */
}

/* Main Container */
.main-container {
  display: flex;
  margin-top: var(--header-height);
  flex: 1;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border-right: 1px solid var(--card-border);
  height: calc(100vh - var(--header-height));
  position: fixed;
  top: var(--header-height);
  left: 0;
  overflow-y: auto;
  transition: all var(--transition-speed);
  z-index: 50;
  padding-bottom: 2rem;
}

.sidebar-content {
  padding: 1.5rem 1rem;
}

/* Styles for sidebar navigation links */
.nav-links {
    margin-bottom: 1.5rem; /* Space before categories */
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}

.nav-link-sidebar {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border-radius: var(--btn-border-radius);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    margin-bottom: 0.3rem;
    border-left: 3px solid transparent;
}
.nav-link-sidebar i {
    width: 1.5rem;
    margin-right: 0.75rem;
    text-align: center;
    opacity: 0.8;
}
.nav-link-sidebar:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
    border-left-color: transparent; /* Ensure no border color on hover */
    text-decoration: none;
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.4); /* Added orange glow (slightly less intense) */
}
.nav-link-sidebar.active {
    /* background-color: rgba(6, 182, 212, 0.15); */ /* Removed cyan bg */
    color: var(--accent-primary); /* Changed to orange */
    font-weight: 700;
    /* border-left-color: var(--accent-cyan); */ /* Removed cyan border */
    /* border-left-color: var(--accent-primary); */ /* Removed orange border */
    border-left-color: transparent; /* Ensure no border color */
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.5); /* Added orange glow */
}
.nav-link-sidebar.active i {
    opacity: 1;
}


.sidebar-title {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  opacity: 0.8;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  border-radius: var(--btn-border-radius);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-speed);
  cursor: pointer;
  border: 1px solid transparent;
  border-left: 3px solid transparent; /* For active state */
}

.category-item:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
  border-left-color: transparent; /* Ensure no border color on hover */
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.4); /* Added orange glow (slightly less intense) */
}

.category-item.active {
  /* background-color: var(--accent-cyan); */ /* Removed cyan bg */
  color: var(--accent-primary); /* Changed to orange */
  font-weight: 700;
  /* border-left-color: var(--accent-cyan-hover); */ /* Removed cyan border */
  /* border-left-color: var(--accent-primary); */ /* Removed orange border */
  border-left-color: transparent; /* Ensure no border color */
   box-shadow: 0 0 15px rgba(255, 165, 0, 0.5); /* Added orange glow */
}
/* Removed .category-item.active:hover rule */

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  margin-right: 0.75rem;
  font-size: 1rem;
  opacity: 0.8;
}
.category-item.active .category-icon {
    opacity: 1;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem 2.5rem;
  transition: margin-left var(--transition-speed);
}

.hero-section {
  text-align: center;
  margin-bottom: 3rem;
  padding: 1rem 0;
}

.main-title {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  /* Gradient Text Effect */
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Fallback color */
  /* color: var(--text-primary); */
  /* Keep existing text-shadow or adjust */
  text-shadow: 0 0 10px rgba(255, 165, 0, 0.5); /* Adjusted glow */
  transition: color var(--transition-speed); /* Transition might not work well with gradient */
}

.main-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  transition: color var(--transition-speed);
  line-height: 1.8;
}

/* Resources Container */
.resources-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
}

.card {
  background-color: var(--card-bg);
  /* border: 1px solid var(--card-border); */ /* Removed border */
  border: none; /* Ensure no border */
  border-radius: var(--card-border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-speed);
  backdrop-filter: blur(8px) saturate(150%); /* Glassmorphism */
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  box-shadow: 0 4px 15px var(--card-shadow);
  cursor: pointer; /* Indicate clickable for modal */
  /* Removed border-top */
}

.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px var(--card-shadow), 0 0 15px rgba(255, 165, 0, 0.5); /* Added orange glow */
  /* border-color: var(--accent-primary); */ /* No border to change color */
}

/* Description preview is now shown on all cards by default */
/* Removed: .page-mental-models .card .description { display: none; } */

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--card-border);
  opacity: 0.9;
  transition: opacity var(--transition-speed);
}
.card:hover img {
    opacity: 1;
}

.card-content {
  padding: 1.2rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content h2 {
  font-family: var(--font-mono);
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
  color: var(--text-primary);
  font-weight: 700;
}

.card-content .category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan); /* Changed to cyan */
  margin-bottom: 0.8rem; /* Reduced margin */
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

.card-content .description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
  /* Remove progressive disclosure styles */
  /* max-height: none;
  overflow: visible; */
  /* Add ellipsis for short preview */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Show ~3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Ensure description preview is displayed by default (for dev.html) */
  display: -webkit-box;
}

/* Removed card type specific styles (.card--mentalModel, .card--devResource) */

.card-content .source-link {
    /* No longer needed here, moved to modal */
    display: none;
}


/* Footer */
.footer {
  background-color: var(--header-bg);
  border-top: 1px solid var(--card-border);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  padding: 1.5rem 0;
  margin-top: 3rem;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-content p {
  margin-bottom: 0.3rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--modal-overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.modal-content {
    background-color: var(--modal-bg);
    padding: 2rem 2.5rem;
    border-radius: var(--card-border-radius);
    border: 1px solid var(--modal-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    transition: color var(--transition-speed);
}
.modal-close-button:hover {
    color: var(--text-primary);
}

#modal-body h2 {
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.8rem;
    text-shadow: 0 0 6px var(--accent-primary); /* Glow on modal title */
}
#modal-body .category {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#modal-body img {
    max-width: 300px; /* Limit image width */
    height: auto;
    border-radius: var(--btn-border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--card-border);
}
#modal-body p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}
#modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}
#modal-body .examples {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}
#modal-body .examples h3 {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}
.modal-icon { /* Style for icon in modal title */
    margin-right: 0.6rem;
    font-size: 1.5rem; /* Slightly smaller than title */
    vertical-align: middle;
    opacity: 0.8;
}
#modal-body .examples p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}
#modal-body .examples p::before {
    content: '>'; /* Terminal-like prompt */
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

/* Styling for See Also section in modal */
#modal-body .see-also {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}
#modal-body .see-also h3 {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}
#modal-body .see-also ul {
    list-style: none;
    padding-left: 1rem;
}
#modal-body .see-also li {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    position: relative;
}
#modal-body .see-also li::before {
    content: '-';
    position: absolute;
    left: -1rem;
    color: var(--accent-primary);
}


#modal-body .source-link {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--accent-primary);
}
#modal-body .source-link i {
    margin-left: 0.4rem;
}

/* Mobile Bottom Menu Styles */
.mobile-bottom-menu {
  display: none; /* Hidden by default */
}

/* Mobile Styles */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 150;
    position: fixed;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
    z-index: 200;
  }

  .resources-container {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 568px) {
  .app-container {
      overflow-x: hidden; /* Apply overflow prevention here for mobile */
  }
  /* Removed body overflow rule */

  .header-content {
    padding: 0 1rem;
  }

  .search-container {
    display: none;
  }

  /* Hide desktop header icons */
  .header-icon-desktop {
    display: none;
  }

  .main-content {
    padding: 1.5rem 1.5rem; /* Increased horizontal padding */
    width: 100%; /* Ensure it takes full available width */
    padding-bottom: calc(1.5rem + var(--mobile-menu-height)); /* Add padding to prevent overlap with bottom menu */
  }

  .main-title {
    font-size: 2.2rem;
  }
  .main-description {
      font-size: 1rem;
  }

  .resources-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
  }
  .card-content h2 {
      font-size: 1.2rem;
  }
  .card-content .description {
      font-size: 0.9rem;
  }
  .modal-content {
      padding: 1.5rem;
  }
  #modal-body h2 {
      font-size: 1.5rem;
  }

  /* Show and style mobile bottom menu */
  .mobile-bottom-menu {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-menu-height);
    /* MODIFIED: Use direct RGBA for more transparency */
    /* background-color: var(--header-bg); */
    background-color: rgba(13, 17, 23, 0.7); /* Dark mode base, adjust alpha */
    backdrop-filter: blur(12px) saturate(180%); /* Slightly more blur? */
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-top: 1px solid var(--card-border);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: space-around;
    padding: 0 1rem;
    z-index: 100;
    /* MODIFIED: Increased border radius */
    /* border-top-left-radius: var(--card-border-radius); */
    /* border-top-right-radius: var(--card-border-radius); */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }

  /* Need to add override for light mode background */
  .light-mode .mobile-bottom-menu {
      background-color: rgba(246, 248, 250, 0.8); /* Light mode base, adjust alpha */
  }

  .mobile-bottom-menu .theme-toggle,
  .mobile-bottom-menu .github-link,
  .mobile-bottom-menu .nav-link {
    display: flex; /* Ensure icons inside are visible */
    /* Reuse theme-toggle styles for consistency */
    width: 2.5rem; /* Slightly larger touch target? */
    height: 2.5rem;
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  :root {
      --sidebar-width: 220px;
  }
  .main-title {
    font-size: 1.8rem;
  }
  .resources-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card img {
      height: 150px;
  }
}

/* Animations & Effects */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
  animation-delay: calc(var(--card-index, 0) * 0.05s);
}

/* Matrix Canvas Styling */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Behind other content */
  display: block; /* Remove potential extra space */
  opacity: 0.3; /* Make it subtle */
  pointer-events: none; /* Allow clicks to pass through */
}

/* Scrollbar styling (Micro) */
::-webkit-scrollbar {
  width: 3px; /* Micro scrollbar */
  height: 3px;
}
::-webkit-scrollbar-track {
  background: transparent; /* Keep track invisible */
}
::-webkit-scrollbar-thumb {
  background: rgba(154, 159, 165, 0.5); /* Semi-transparent secondary text color */
  border-radius: 3px;
  transition: background var(--transition-speed);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 165, 0, 0.7); /* Semi-transparent Orange on hover */
}

/* Light mode scrollbar */
.light-mode ::-webkit-scrollbar-thumb {
  background: rgba(193, 193, 193, 0.6); /* Semi-transparent light thumb */
}
.light-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(221, 107, 32, 0.8); /* Semi-transparent darker orange on hover */
}
