/* ==========================================================================
   HOIC Project Directory & Showcase Hub - Modern Glassmorphic Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-base: #07090e;
  --bg-surface: #0e131f;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 35, 56, 0.85);
  --bg-glass: rgba(14, 19, 31, 0.65);
  --bg-input: rgba(15, 23, 42, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-card-hover: rgba(99, 102, 241, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Brand & Accent Colors */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.2);
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-blue: #3b82f6;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px -5px rgba(99, 102, 241, 0.25);

  /* Geometry & Typography */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-input: #f1f5f9;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.1);
  --border-card-hover: rgba(99, 102, 241, 0.5);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 25px -4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 10px 30px -5px rgba(99, 102, 241, 0.18);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Lights */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ambient-blob {
  position: absolute;
  filter: blur(130px);
  border-radius: 50%;
  opacity: 0.45;
  will-change: transform;
  transition: opacity var(--transition-normal);
}

[data-theme="light"] .ambient-blob {
  opacity: 0.25;
}

.blob-1 {
  top: -15%;
  left: 15%;
  width: 600px;
  height: 500px;
  background: radial-gradient(circle, #6366f1 0%, rgba(99,102,241,0) 70%);
}

.blob-2 {
  top: 35%;
  right: -10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6,182,212,0) 70%);
}

.blob-3 {
  bottom: -15%;
  left: 30%;
  width: 650px;
  height: 500px;
  background: radial-gradient(circle, #a855f7 0%, rgba(168,85,247,0) 70%);
}

/* Subtle Animated Grid Overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.65;
}

/* Container */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--primary-glow);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  opacity: 0.6;
  animation: pulse-ring 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Icon Buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--text-main);
  border-color: var(--border-card-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn-icon svg {
  width: 19px;
  height: 19px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 64px 0 36px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-main);
}

.hero-title-gradient {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 660px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Search Bar in Hero */
.search-container {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 6px 10px 6px 20px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.search-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-lg);
  transform: translateY(-2px);
}

.search-icon {
  width: 22px;
  height: 22px;
  color: var(--text-dim);
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--text-main);
  font-family: var(--font-body);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.kbd-shortcut {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--border-subtle);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 3px 7px;
  pointer-events: none;
}

.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color var(--transition-fast);
}

.search-clear-btn:hover {
  color: var(--text-main);
}

.search-clear-btn.active {
  display: flex;
}

/* Quick Stats Row */
.stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 40px);
  margin-top: 32px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-subtle);
}

/* ==========================================================================
   Filter & View Controls Bar
   ========================================================================== */
.controls-bar {
  padding: 24px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Category Filter Pills */
.category-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 100%;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.pill-btn:hover {
  color: var(--text-main);
  border-color: var(--border-card-hover);
  background: var(--bg-card-hover);
}

.pill-btn.active {
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.pill-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
}

.pill-btn:not(.active) .pill-count {
  background: var(--border-subtle);
  color: var(--text-dim);
}

/* Layout & Sorter Controls */
.view-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select-wrapper {
  position: relative;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 32px 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.sort-select:hover, .sort-select:focus {
  color: var(--text-main);
  border-color: var(--border-card-hover);
}

.sort-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-dim);
  pointer-events: none;
}

.view-toggle-group {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.view-btn.active {
  background: var(--bg-card-hover);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Active Filter Stats & Result Summary
   ========================================================================== */
.results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.results-count b {
  color: var(--text-main);
}

.clear-filters-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  display: none;
}

.clear-filters-link.visible {
  display: inline;
}

/* ==========================================================================
   Project Cards Grid & List View
   ========================================================================== */
.projects-container {
  padding-bottom: 80px;
}

/* Grid Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

/* Single Project Card */
.project-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--primary)), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-card-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.project-card:hover::before {
  opacity: 1;
}

/* Accent Variations */
.accent-indigo { --card-accent: var(--primary); }
.accent-cyan   { --card-accent: var(--accent-cyan); }
.accent-blue   { --card-accent: var(--accent-blue); }
.accent-emerald{ --card-accent: var(--accent-emerald); }
.accent-purple { --card-accent: var(--accent-purple); }
.accent-rose   { --card-accent: var(--accent-rose); }
.accent-amber  { --card-accent: var(--accent-amber); }

/* Card Top Section */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--card-accent, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.project-card:hover .card-icon-wrap {
  transform: scale(1.08) rotate(-3deg);
}

.card-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.route-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--card-accent, var(--primary));
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: -0.2px;
}

.category-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

/* Card Body */
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.project-card:hover .project-title {
  color: var(--card-accent, var(--primary));
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}

/* Card Tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-item {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--border-subtle);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Card Actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.btn-launch {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--card-accent, var(--primary)), #3730a3);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-fast);
}

.btn-launch:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 16px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-launch svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.btn-launch:hover svg {
  transform: translate(2px, -2px);
}

.btn-action-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
}

.btn-action-icon:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
}

.btn-action-icon svg {
  width: 17px;
  height: 17px;
}

/* ==========================================================================
   List View Specific Styles
   ========================================================================== */
.projects-grid.list-view {
  grid-template-columns: 1fr;
  gap: 14px;
}

.projects-grid.list-view .project-card {
  flex-direction: row;
  align-items: center;
  padding: 16px 24px;
  gap: 20px;
}

.projects-grid.list-view .project-card::before {
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  height: 100%;
}

.projects-grid.list-view .card-header {
  margin-bottom: 0;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.projects-grid.list-view .card-badges {
  align-items: flex-start;
}

.projects-grid.list-view .card-body {
  margin-bottom: 0;
}

.projects-grid.list-view .project-desc {
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.projects-grid.list-view .card-actions {
  padding-top: 0;
  border-top: none;
  flex-shrink: 0;
  width: auto;
}

.projects-grid.list-view .btn-launch {
  flex: none;
  padding: 9px 18px;
}

@media (max-width: 860px) {
  .projects-grid.list-view .project-card {
    flex-direction: column;
    align-items: stretch;
  }
  .projects-grid.list-view .card-header {
    justify-content: space-between;
  }
  .projects-grid.list-view .card-actions {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
  }
  .projects-grid.list-view .btn-launch {
    flex: 1;
  }
}

/* ==========================================================================
   Empty Search State
   ========================================================================== */
.empty-state {
  display: none;
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-xl);
  margin-top: 20px;
}

.empty-state.visible {
  display: block;
}

.empty-icon {
  width: 64px;
  height: 64px;
  color: var(--text-dim);
  margin: 0 auto 16px;
  opacity: 0.8;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 24px;
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reset:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   Project Details Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--border-subtle);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--border-card);
  color: var(--text-main);
  transform: rotate(90deg);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.modal-title-group h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-title-group .modal-route {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
}

.modal-section-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  font-weight: 700;
  margin: 18px 0 8px;
}

.modal-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-cyan);
  word-break: break-all;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.modal-btn-launch {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-btn-launch:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  color: var(--text-main);
  pointer-events: auto;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent-emerald);
  width: 100%;
  animation: toast-timer 2.8s linear forwards;
}

@keyframes toast-timer {
  from { width: 100%; }
  to { width: 0%; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 48px 0 32px;
  transition: background var(--transition-fast);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-meta {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  .hero {
    padding: 40px 0 24px;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .view-controls {
    justify-content: space-between;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .status-pill span:last-child {
    display: none;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
