* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  /* Minnka brand colors */
  --minnka-gold: #a59d88;
  --minnka-white: #ffffff;
  --minnka-black: #000000;
  --minnka-dark: #0d0d0d;
  --minnka-accent: #a59d88;
  --minnka-accent-glow: rgba(165, 157, 136, 0.4);
  
  /* Pace colors */
  --pace-highlight: #ffcc00;
  --pace-glow: rgba(255, 204, 0, 0.4);
  --automation-highlight: #00ccff;
  --automation-glow: rgba(0, 204, 255, 0.3);
  
  /* New features colors */
  --commit-color: #00ff88;
  --commit-glow: rgba(0, 255, 136, 0.4);
  --ai-color: #ff6b35;
  --ai-glow: rgba(255, 107, 53, 0.4);
  
  /* Dynamic commit time colors */
  --commit-fresh: #00ff00; /* Bright green for recent commits */
  --commit-warning: #ffaa00; /* Orange for moderate time */
  --commit-danger: #ff0000; /* Bright red for old commits */
  
  /* AI status colors */
  --ai-active: #00ff00; /* Green for coding */
  --ai-inactive: #ff0000; /* Red for not coding */
}

body {
  background-color: var(--minnka-black);
  color: var(--minnka-white);
  height: 100vh;
  overflow: auto;
  overflow-x: hidden;
  background-image: url('assets/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.logo-background {
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #000000;
  z-index: 1;
  /* Position will be set dynamically by JavaScript */
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: -1;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  width: 220px;
  margin-bottom: 15px;
  padding: 15px 0;
  position: relative;
  z-index: 2;
}

.subtitle {
  font-size: 18px;
  color: var(--minnka-gold);
  margin-top: 5px;
  letter-spacing: 1px;
}

.pace-mantra {
  font-size: 16px;
  font-weight: 700;
  color: var(--pace-highlight);
  margin-top: 10px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px var(--pace-glow);
  animation: fastPacePulse 1.5s infinite ease-in-out;
}

.tagline {
  font-size: 20px;
  font-weight: 600;
  color: var(--minnka-white);
  margin-top: 12px;
  letter-spacing: 3px;
  font-style: italic;
  opacity: 0.85;
  text-shadow: 0 0 12px rgba(165, 157, 136, 0.5);
}

.counter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 40px 0 20px 0;
}

.note-to-self-panel {
  width: 100%;
  max-width: 800px;
  margin: 24px auto 12px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(165, 157, 136, 0.35);
  border-radius: 18px;
  overflow: hidden;
}

.note-to-self-toggle {
  list-style: none;
  cursor: pointer;
  padding: 16px 22px;
  text-align: center;
  color: var(--minnka-gold);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(180deg, rgba(165, 157, 136, 0.16), rgba(0, 0, 0, 0.12));
  user-select: none;
}

.note-to-self-toggle::-webkit-details-marker {
  display: none;
}

.note-to-self-toggle::after {
  content: 'Expand';
  display: inline-block;
  margin-left: 12px;
  font-size: 12px;
  color: var(--minnka-white);
  opacity: 0.75;
  text-transform: uppercase;
}

.note-to-self-panel[open] .note-to-self-toggle::after {
  content: 'Hide';
}

.note-to-self-content {
  margin: 0;
  padding: 12px 20px 24px;
}

.counter-label {
  font-size: 22px;
  color: var(--minnka-gold);
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.recovery-label {
  font-size: 18px;
  color: var(--minnka-white);
  margin-bottom: 10px;
  letter-spacing: 1px;
  font-weight: 500;
}

.counter {
  font-size: 120px;
  font-weight: 700;
  color: var(--minnka-white);
  text-shadow: 0 0 20px rgba(165, 157, 136, 0.6);
  margin: 10px 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  border: 2px solid rgba(165, 157, 136, 0.3);
  min-width: 300px;
  text-align: center;
}

/* Animation for the counter */
@keyframes pulse {
  0% { transform: scale(1); border-color: rgba(165, 157, 136, 0.3); }
  50% { transform: scale(1.05); border-color: rgba(165, 157, 136, 0.6); }
  100% { transform: scale(1); border-color: rgba(165, 157, 136, 0.3); }
}

.counter {
  animation: pulse 2s infinite ease-in-out;
}

.start-date {
  font-size: 16px;
  color: var(--minnka-gold);
  font-style: italic;
  margin-top: 5px;
}

.key-message {
  font-size: 16px;
  color: var(--minnka-white);
  font-weight: 600;
  margin-top: 5px;
}

.motivation-container {
  margin: 10px 0 20px 0;
  text-align: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  border-left: 4px solid var(--pace-highlight);
  border-right: 4px solid var(--pace-highlight);
  max-width: 80%;
}

/* NEW FEATURES STYLING */
.new-features-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 20px 0;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  box-sizing: border-box;
}

#github-projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 25px 0;
  width: 100%;
  max-width: 1200px;
  justify-items: center;
  justify-content: center;
  place-items: center;
  padding: 0 15px;
}

.github-projects-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.github-projects-controls {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.github-repo-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: min(340px, 90vw);
  text-align: left;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.github-repo-search {
  width: 100%;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(0, 204, 255, 0.32);
  border-radius: 999px;
  outline: none;
  background: rgba(0, 0, 0, 0.68);
  color: var(--minnka-white);
  font-size: 13px;
}

.github-repo-search:focus {
  border-color: var(--automation-highlight);
  box-shadow: 0 0 0 3px rgba(0, 204, 255, 0.12);
}

.github-repo-count {
  min-width: 100px;
  padding-bottom: 10px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  text-align: left;
}

.github-random-select-btn {
  border: 1px solid rgba(255, 204, 0, 0.45);
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.18), rgba(0, 204, 255, 0.08));
  color: #fff6cc;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.github-random-select-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 204, 0, 0.16);
}

.github-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 25px 0;
  width: 100%;
  max-width: 1200px;
  justify-items: center;
  justify-content: center;
  place-items: center;
  padding: 0 15px;
}

/* Force center alignment for all GitHub project items */
.github-projects-grid .feature-item,
#github-projects-container .feature-item {
  margin: 0 auto;
}

/* Responsive adjustments for GitHub projects */
@media (max-width: 1200px) {
  .github-projects-grid, #github-projects-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    justify-content: center;
    justify-items: center;
    padding: 0 12px;
  }
}

@media (max-width: 900px) {
  .github-projects-grid, #github-projects-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    justify-content: center;
    justify-items: center;
    padding: 0 10px;
  }
}

@media (max-width: 768px) {
  .github-projects-grid, #github-projects-container {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    justify-content: center;
    justify-items: center;
    padding: 0 8px;
  }

  .github-detail-grid {
    grid-template-columns: 1fr;
  }

  .github-detail-section-wide {
    grid-column: span 1;
  }
  
  .github-projects-wrapper {
    width: 100%;
    padding: 0 10px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .github-projects-grid, #github-projects-container {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-content: center;
    justify-items: center;
    padding: 0 10px;
  }

  .github-project-summary {
    padding: 18px 16px;
  }

  .github-project-details {
    padding: 14px;
  }

  .github-detail-toolbar {
    flex-direction: column;
  }

  .github-detail-actions {
    width: 100%;
  }

  .github-detail-btn {
    width: 100%;
  }
}

.feature-item {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  border: 2px solid rgba(165, 157, 136, 0.3);
  min-width: 250px;
  max-width: 400px;
  flex: 1;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(165, 157, 136, 0.2);
}

.feature-title {
  font-size: 16px;
  color: var(--minnka-gold);
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Commit Tracker Styling */
.commit-tracker {
  border-color: var(--commit-color);
}

.commit-tracker:hover {
  border-color: var(--commit-color);
  box-shadow: 0 5px 20px var(--commit-glow);
}

.commit-time-display {
  font-size: 24px;
  color: #00ff00; /* Will be overridden by JavaScript with dynamic colors */
  margin: 15px 0;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(0, 255, 0, 0.8); /* Will be overridden by JavaScript */
  animation: commitTimePulse 2s infinite ease-in-out;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.add-code-btn {
  background: linear-gradient(45deg, var(--commit-color), #00cc77);
  border: none;
  color: white;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.add-code-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--commit-glow);
}

.add-code-btn:active {
  transform: scale(0.98);
}

/* AI Progress Styling */
.ai-progress {
  border-color: var(--ai-color);
}

.ai-progress:hover {
  border-color: var(--ai-color);
  box-shadow: 0 5px 20px var(--ai-glow);
}

.ai-progress-text {
  font-size: 18px;
  color: var(--ai-inactive); /* Default to red for 'AI NOT CODING' */
  margin: 15px 0;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(255, 0, 0, 0.8); /* Red glow by default */
  transition: all 0.5s ease;
}

.ai-progress-text.pulsating {
  animation: aiPulse 1.5s infinite ease-in-out;
}

.ai-toggle-btn {
  background: linear-gradient(45deg, var(--ai-color), #ff4500);
  border: none;
  color: white;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ai-toggle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--ai-glow);
}

.ai-toggle-btn:disabled {
  cursor: default;
  opacity: 1;
}

.ai-toggle-btn:disabled:hover,
.ai-toggle-btn:disabled:active {
  transform: none;
  box-shadow: none;
}

.ai-toggle-btn:active {
  transform: scale(0.98);
}

.ai-toggle-btn.stop {
  background: linear-gradient(45deg, #ff4444, #cc0000);
}

/* GitHub Status Styling */
.github-status-fresh {
  border-color: #00ff00;
}

.github-status-warning {
  border-color: #ffaa00;
}

.github-status-danger {
  border-color: #ff0000;
}

.github-repo {
  font-size: 20px;
  font-weight: 700;
  color: var(--minnka-white);
  margin-bottom: 10px;
}

.github-commit-date {
  font-size: 16px;
  color: var(--minnka-gold);
}

.github-project-card {
  position: relative;
  width: 100%;
  max-width: none;
  align-self: start;
  padding: 0;
  overflow: hidden;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.github-project-card:hover {
  transform: none;
}

.github-project-card::after {
  content: '';
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 25%, rgba(255, 204, 0, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 45% 70%, rgba(0, 204, 255, 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 62%, rgba(255, 255, 255, 0.8) 0 1.5px, transparent 3px),
    radial-gradient(circle at 30% 82%, rgba(255, 214, 102, 0.85) 0 2px, transparent 3px);
  transform: translate3d(-16px, 10px, 0) scale(0.96);
}

.github-project-card.repo-stardust-flash {
  background: rgba(255, 244, 179, 0.1);
  border-color: rgba(255, 245, 186, 0.95);
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.24),
    0 0 40px rgba(0, 204, 255, 0.2),
    0 0 58px rgba(255, 204, 0, 0.16);
  transform: translateY(-2px);
}

.github-project-card.repo-stardust-flash::after {
  opacity: 1;
  animation: repoStardustDrift 0.5s ease-out forwards;
}

.github-project-card.repo-random-selected {
  background: rgba(255, 246, 179, 0.1);
  border-color: #ffe066;
  box-shadow:
    0 0 0 1px rgba(255, 224, 102, 0.65),
    0 0 28px rgba(255, 204, 0, 0.28),
    0 0 48px rgba(0, 204, 255, 0.14);
}

.github-project-card.repo-random-selected .github-project-summary {
  background: rgba(255, 248, 196, 0.05);
}

.github-project-summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
}

.github-project-summary::-webkit-details-marker {
  display: none;
}

.github-project-hint {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--automation-highlight);
  text-transform: uppercase;
}

.github-project-details {
  border-top: 1px solid rgba(165, 157, 136, 0.2);
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.github-detail-loading,
.github-detail-error {
  padding: 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--minnka-white);
  text-align: left;
}

.github-detail-error {
  border: 1px solid rgba(255, 0, 0, 0.35);
}

.github-detail-error strong,
.github-detail-error span {
  display: block;
}

.github-detail-error span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
}

.github-detail-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.github-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.github-detail-meta span {
  background: rgba(165, 157, 136, 0.15);
  border: 1px solid rgba(165, 157, 136, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--minnka-white);
}

.github-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.github-detail-btn {
  background: linear-gradient(45deg, rgba(0, 204, 255, 0.85), rgba(255, 204, 0, 0.85));
  border: none;
  color: #050505;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.github-open-btn {
  background: linear-gradient(45deg, rgba(0, 255, 136, 0.88), rgba(0, 204, 119, 0.88));
}

.github-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.github-access-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.35);
  color: #ffd98b;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
}

.github-detail-section {
  text-align: left;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(165, 157, 136, 0.16);
  border-radius: 14px;
  padding: 14px;
}

.github-detail-section-wide {
  grid-column: span 2;
}

.github-detail-section h4 {
  color: var(--minnka-gold);
  margin-bottom: 10px;
  font-size: 14px;
  letter-spacing: 0.8px;
}

.github-detail-section h5 {
  color: rgba(255, 255, 255, 0.88);
  margin: 16px 0 8px;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.github-detail-section code {
  color: #9de7ff;
  overflow-wrap: anywhere;
}

.github-evidence-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.github-evidence-metrics span {
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 204, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.github-evidence-metrics strong {
  display: block;
  margin-bottom: 3px;
  color: var(--minnka-white);
  font-size: 16px;
}

.github-documentation-actions {
  margin-top: 12px;
  justify-content: flex-start;
}

@media (max-width: 700px) {
  .github-evidence-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.github-detail-section p {
  color: var(--minnka-white);
  font-size: 14px;
  line-height: 1.5;
}

.github-detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.github-detail-list li {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.github-detail-list strong,
.github-detail-list span {
  display: block;
}

.github-detail-list strong {
  color: var(--minnka-white);
  font-size: 13px;
}

.github-detail-list span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.motivation-text {
  font-size: 20px;
  color: var(--minnka-white);
  line-height: 1.5;
}

.pace-indicator-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80%;
  max-width: 600px;
  margin-bottom: 20px;
}

.pace-progress-bar {
  width: 100%;
  height: 20px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 204, 0, 0.3);
}

.pace-progress {
  height: 100%;
  width: 85%;
  background: linear-gradient(90deg, var(--automation-highlight), var(--pace-highlight));
  border-radius: 10px;
  animation: progressPulse 2s infinite ease-in-out;
}

.pace-label {
  font-size: 14px;
  color: var(--automation-highlight);
  margin-top: 5px;
  letter-spacing: 1px;
  font-weight: 600;
  text-shadow: 0 0 10px var(--automation-glow);
  animation: textPulse 2s infinite ease-in-out;
}

.goals-container {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 800px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.goal-item {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  padding: 12px;
  width: 180px;
  text-align: center;
  border: 1px solid rgba(165, 157, 136, 0.3);
}

.fast-pace-item {
  border: 1px solid rgba(255, 204, 0, 0.5);
  animation: borderPulse 2s infinite ease-in-out;
}

.goal-title {
  color: var(--minnka-gold);
  font-size: 14px;
  margin-bottom: 5px;
}

.fast-pace-item .goal-title {
  color: var(--pace-highlight);
}

.goal-text {
  color: var(--minnka-white);
  font-size: 16px;
  font-weight: 600;
}

.aspirations-title {
  font-size: 22px;
  color: var(--minnka-gold);
  margin: 10px 0;
  letter-spacing: 1px;
  text-align: center;
}

.aspirations-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 800px;
  margin-bottom: 20px;
  gap: 12px;
}

.aspiration-item {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  padding: 12px;
  width: 160px;
  text-align: center;
  border: 1px solid rgba(165, 157, 136, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.pace-aspiration {
  border: 1px solid rgba(255, 204, 0, 0.4);
  background: rgba(10, 10, 10, 0.8);
}

.pace-aspiration .aspiration-icon {
  color: var(--pace-highlight);
}

.aspiration-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(165, 157, 136, 0.3);
  border-color: var(--minnka-gold);
}

.pace-aspiration:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px var(--pace-glow);
  border-color: var(--pace-highlight);
}

.aspiration-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.aspiration-text {
  color: var(--minnka-white);
  font-size: 14px;
  font-weight: 500;
}

.footer {
  width: 100%;
  text-align: center;
  padding: 15px 0;
  margin-top: 20px;
}

.footer-text {
  font-size: 14px;
  color: var(--minnka-gold);
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); border-color: rgba(165, 157, 136, 0.3); }
  50% { transform: scale(1.05); border-color: rgba(165, 157, 136, 0.6); }
  100% { transform: scale(1); border-color: rgba(165, 157, 136, 0.3); }
}

@keyframes fastPacePulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

@keyframes progressPulse {
  0% { width: 75%; }
  50% { width: 92%; }
  100% { width: 75%; }
}

@keyframes textPulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

@keyframes borderPulse {
  0% { border-color: rgba(255, 204, 0, 0.3); }
  50% { border-color: rgba(255, 204, 0, 0.7); }
  100% { border-color: rgba(255, 204, 0, 0.3); }
}

@keyframes highlight {
  0% { background: rgba(0, 0, 0, 0.7); }
  50% { background: rgba(165, 157, 136, 0.2); }
  100% { background: rgba(0, 0, 0, 0.7); }
}

@keyframes repoStardustDrift {
  0% {
    opacity: 0;
    transform: translate3d(-18px, 12px, 0) scale(0.94);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(18px, -14px, 0) scale(1.08);
  }
}

/* Commit Time Pulse Animation */
@keyframes commitTimePulse {
  0% { 
    opacity: 0.8; 
    transform: scale(1);
    text-shadow: 0 0 10px var(--commit-glow);
  }
  50% { 
    opacity: 1; 
    transform: scale(1.03);
    text-shadow: 0 0 20px var(--commit-glow);
  }
  100% { 
    opacity: 0.8; 
    transform: scale(1);
    text-shadow: 0 0 10px var(--commit-glow);
  }
}

/* AI Pulse Animation */
@keyframes aiPulse {
  0% { 
    opacity: 0.6; 
    transform: scale(1);
    text-shadow: 0 0 5px var(--ai-glow);
  }
  50% { 
    opacity: 1; 
    transform: scale(1.05);
    text-shadow: 0 0 20px var(--ai-glow);
  }
  100% { 
    opacity: 0.6; 
    transform: scale(1);
    text-shadow: 0 0 5px var(--ai-glow);
  }
}

/* Desktop and tablet centering for new features */
@media (min-width: 769px) {
  .new-features-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px auto;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
  }
  
  .feature-item {
    flex: 1;
    max-width: 400px;
    min-width: 250px;
  }
}

/* Enhanced Mobile Responsiveness for Samsung Galaxy Fold and All Mobile Devices */

/* Base mobile improvements */
@media (max-width: 768px) {
  .container {
    padding: 8px;
    min-height: 100vh;
  }
  
  /* Enhanced logo and header for mobile */
  .logo {
    width: min(200px, 80vw);
    max-width: 200px;
  }
  
  .subtitle {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: 600;
  }
  
  .pace-mantra {
    font-size: clamp(14px, 3.5vw, 18px);
    font-weight: 800;
  }
  
  /* CRITICAL: Fix GitHub projects overlapping */
  .new-features-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(15px, 4vw, 25px);
    margin: clamp(20px, 5vw, 30px) auto;
    width: 100%;
    max-width: 100%;
    padding: 0 clamp(8px, 2vw, 15px);
    box-sizing: border-box;
    position: static;
    left: auto;
    transform: none;
  }
  
  .feature-item {
    width: 100%;
    max-width: none;
    min-width: auto;
    padding: clamp(20px, 5vw, 30px) clamp(15px, 4vw, 25px);
    margin: 0 0 clamp(15px, 4vw, 20px) 0;
    border-width: clamp(2px, 0.5vw, 3px);
    border-radius: clamp(12px, 3vw, 18px);
    box-sizing: border-box;
  }
  
  .feature-title {
    font-size: clamp(16px, 4.5vw, 22px);
    font-weight: 800;
    margin-bottom: clamp(12px, 3vw, 18px);
    text-align: center;
  }
  
  /* Enhanced commit time and AI text for readability */
  .commit-time-display {
    font-size: clamp(24px, 8vw, 40px);
    font-weight: 900;
    margin: clamp(15px, 4vw, 25px) 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 0 0 30px currentColor;
    line-height: 1.2;
  }
  
  .ai-progress-text {
    font-size: clamp(20px, 6vw, 32px);
    font-weight: 900;
    margin: clamp(15px, 4vw, 25px) 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 0 0 30px currentColor;
    line-height: 1.2;
    text-align: center;
  }
  
  /* Enhanced buttons for mobile */
  .add-code-btn,
  .ai-toggle-btn {
    padding: clamp(16px, 4vw, 24px) clamp(20px, 5vw, 35px);
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 900;
    border-radius: clamp(10px, 2.5vw, 15px);
    min-height: clamp(55px, 12vw, 70px);
    width: 100%;
    margin-top: clamp(10px, 3vw, 15px);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  
  /* CRITICAL: Fix GitHub projects grid overlapping */
  .github-projects-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0 clamp(8px, 2vw, 15px);
    margin: clamp(20px, 5vw, 30px) 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .github-projects-grid,
  #github-projects-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(15px, 4vw, 25px);
    width: 100%;
    margin: 0;
    padding: 0;
    justify-items: center;
  }
  
  /* GitHub project items */
.github-projects-grid .feature-item,
#github-projects-container .feature-item {
  width: 100%;
  margin: 0;
  padding: clamp(18px, 5vw, 28px);
  box-sizing: border-box;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
  
  /* Enhanced motivation text */
  .motivation-text {
    font-size: clamp(18px, 5vw, 26px);
    font-weight: 600;
    line-height: 1.5;
    padding: clamp(15px, 4vw, 25px);
  }
  
  .motivation-container {
    margin: clamp(20px, 5vw, 30px) 0;
    padding: clamp(15px, 4vw, 25px);
    width: 95%;
    max-width: 95%;
  }
  
  /* Hide complex elements on mobile for better performance */
  .goals-container,
  .aspirations-container,
  .aspirations-title,
  .pace-indicator-container {
    display: none;
  }
  
  /* Enhanced footer */
  .footer-text {
    font-size: clamp(12px, 3vw, 16px);
    font-weight: 500;
  }
}

/* Samsung Galaxy Fold Cover Screen (Super Narrow) */
@media (max-width: 400px) {
  .container {
    padding: 6px;
  }
  
  /* Optimized for cover screen */
  .logo {
    width: min(160px, 75vw);
  }
  
  .subtitle {
    font-size: clamp(14px, 4vw, 18px);
  }
  
  .pace-mantra {
    font-size: clamp(12px, 3.5vw, 16px);
  }
  
  /* Smaller text for very narrow screens */
  .commit-time-display {
    font-size: clamp(20px, 7vw, 32px);
  }
  
  .ai-progress-text {
    font-size: clamp(16px, 5.5vw, 26px);
  }
  
  .feature-title {
    font-size: clamp(14px, 4vw, 18px);
  }
  
  .add-code-btn,
  .ai-toggle-btn {
    font-size: clamp(12px, 3.5vw, 16px);
    padding: clamp(14px, 3.5vw, 20px) clamp(18px, 4.5vw, 28px);
    min-height: clamp(50px, 11vw, 60px);
  }
}

/* Samsung Galaxy Fold Main Screen (Very Wide) */
@media (min-width: 1200px) and (max-height: 900px) {
  /* Landscape tablet/unfolded phone optimization */
  .new-features-container {
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .feature-item {
    flex: 1;
    max-width: 350px;
    min-width: 300px;
  }
  
  .github-projects-grid,
  #github-projects-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

/* Dynamic screen width detection improvements */
@media (orientation: portrait) and (max-width: 480px) {
  /* Force single column layout for portrait phones */
  .new-features-container {
    flex-direction: column !important;
  }
  
  .github-projects-grid,
  #github-projects-container {
    grid-template-columns: 1fr !important;
  }
}

@media (orientation: landscape) and (max-height: 480px) {
  /* Optimize for landscape phones */
  .container {
    padding: 5px;
  }
  
  .counter {
    font-size: clamp(40px, 8vh, 70px);
  }
  
  .counter-container {
    margin: 10px 0;
  }
  
  .new-features-container {
    margin: 15px 0;
    gap: 15px;
  }
  
  .feature-item {
    padding: 15px;
  }
}

/* High DPI screen adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .commit-time-display,
  .ai-progress-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 25px currentColor, 0 0 35px currentColor;
  }
}

/* Ensure touch targets are adequate */
@media (pointer: coarse) {
  .add-code-btn,
  .ai-toggle-btn {
    min-height: 48px; /* Minimum touch target size */
    padding: 12px 20px;
  }
  
  .feature-item {
    padding: 20px;
    margin-bottom: 20px;
  }
}

/* Expanded repository intelligence is a reading workspace, not a grid tile. */
.github-projects-wrapper,
.github-projects-grid,
#github-projects-container {
  max-width: 1600px;
}

#github-projects-container > .github-project-card[open] {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 100%;
  max-width: 1600px;
  justify-self: stretch;
}

.github-project-card[open] .github-project-details {
  padding: clamp(18px, 2vw, 30px);
}

.github-project-card[open] .github-detail-grid {
  gap: clamp(14px, 1.5vw, 22px);
}

.github-project-card[open] .github-detail-section {
  padding: clamp(16px, 1.6vw, 24px);
}

.github-project-card[open] .github-detail-section p {
  font-size: 15px;
  line-height: 1.65;
}

.github-evidence-metrics {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.github-evidence-areas {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.78) !important;
}

.github-file-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.github-file-flow code {
  display: inline-block;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(0, 204, 255, 0.08);
  border: 1px solid rgba(0, 204, 255, 0.14);
  font-size: 12px;
}

.github-review-state {
  border-left: 4px solid var(--commit-color);
}

.github-review-state.is-stale {
  border-left-color: #ff9f43;
  background: rgba(255, 159, 67, 0.07);
}

.github-review-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.github-review-badges span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(0, 204, 255, 0.09);
  border: 1px solid rgba(0, 204, 255, 0.18);
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.github-ai-handoff {
  border-color: rgba(0, 204, 255, 0.38);
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.08), rgba(255, 204, 0, 0.05));
}

.github-ai-handoff-title,
.github-action-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.github-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--automation-highlight);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

.github-action-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.github-action-files {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 14px;
}

.github-action-files code {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
}

.github-action-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.github-action-list li {
  padding: 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
}

.github-action-list p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76) !important;
  font-size: 13px !important;
}

.github-severity {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.github-severity-high { background: rgba(255, 70, 70, 0.22); color: #ffb2b2; }
.github-severity-medium { background: rgba(255, 174, 66, 0.2); color: #ffd39b; }
.github-severity-review { background: rgba(0, 204, 255, 0.16); color: #9de7ff; }

.github-copy-status {
  align-self: center;
  color: var(--commit-color);
  font-size: 12px;
}

.github-top-level-banner {
  border-left: 4px solid var(--automation-highlight);
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.1), rgba(0, 0, 0, 0.34));
}

.github-top-level-banner.is-local-view {
  border-left-color: #28e7a8;
  background: linear-gradient(135deg, rgba(40, 231, 168, 0.16), rgba(0, 0, 0, 0.38));
}

.github-top-level-banner.is-public-view {
  border-left-color: #f2c94c;
}

.github-local-evidence {
  border-color: rgba(40, 231, 168, 0.42);
  background: linear-gradient(145deg, rgba(40, 231, 168, 0.07), rgba(0, 0, 0, 0.32));
}

.github-local-evidence-files {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.github-local-evidence-file {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.github-local-evidence-file summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--minnka-white);
}

.github-local-evidence-file summary span {
  color: var(--commit-color);
  white-space: nowrap;
}

.github-local-evidence-pre {
  margin: 0;
  padding: 16px;
  max-height: 560px;
  overflow: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  white-space: pre;
  tab-size: 2;
  font: 12px/1.55 Consolas, 'Courier New', monospace;
  color: #d9f7ed;
}

.github-top-level-banner h3 {
  margin: 0 0 8px;
  color: var(--minnka-white);
  font-size: clamp(20px, 2vw, 28px);
}

.github-subprojects-section {
  border-color: rgba(255, 204, 0, 0.38);
  background: linear-gradient(145deg, rgba(255, 204, 0, 0.07), rgba(0, 204, 255, 0.04));
}

.github-subprojects-title,
.github-subproject-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.github-subprojects-title > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.github-subproject-tabs {
  display: flex;
  gap: 9px;
  margin: 18px 0;
  padding: 3px 2px 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.github-subproject-tab {
  min-width: 155px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.github-subproject-tab:hover,
.github-subproject-tab:focus-visible {
  border-color: rgba(0, 204, 255, 0.65);
  transform: translateY(-1px);
}

.github-subproject-tab.is-selected {
  border-color: var(--automation-highlight);
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.2), rgba(255, 204, 0, 0.14));
  box-shadow: 0 0 18px rgba(0, 204, 255, 0.12);
}

.github-subproject-tab strong,
.github-subproject-tab span {
  display: block;
}

.github-subproject-tab strong {
  color: var(--minnka-white);
  font-size: 13px;
}

.github-subproject-tab span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  text-transform: uppercase;
}

.github-subproject-detail {
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(0, 204, 255, 0.22);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.38);
}

.github-subproject-heading code {
  display: inline-block;
  margin-top: 3px;
}

.github-subproject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.github-subproject-grid > div,
.github-subproject-goals > div {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 768px) {
  #github-projects-container > .github-project-card[open] {
    grid-column: span 1;
  }

  .github-project-card[open] .github-detail-section p {
    font-size: 14px;
  }

  .github-action-columns {
    grid-template-columns: 1fr;
  }

  .github-subproject-grid {
    grid-template-columns: 1fr;
  }

  .github-subproject-tab {
    min-width: 135px;
  }
}
