body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  flex-direction: column; /* Stack container and footer vertically */
  align-items: center; /* Center children horizontally */
  min-height: 100vh;
  padding: 2rem 1rem; /* Reduced horizontal padding for mobile readiness */
  box-sizing: border-box;
}

.container {
  max-width: 800px;
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.subtitle {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr; /* Already good for mobile */
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #334155;
  transition: transform 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block; /* Ensures the whole card is clickable */
}

/* Hover effects are usually disabled/ignored on touch devices */
@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
  }
}

.deployment-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: #444;
  margin: 0;
  text-transform: uppercase;
}

/* --- MOBILE ADAPTATIONS --- */
@media (max-width: 600px) {
  body {
    padding: 1.5rem 1rem; /* Even smaller padding on very small phones */
  }

  h1 {
    font-size: 1.8rem; /* Shrink title so it doesn't wrap awkwardly */
  }

  header {
    margin-bottom: 2rem;
  }

  .project-card {
    padding: 1.2rem; /* Slightly more room for text on mobile */
  }
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--accent);
}

.infra-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #334155;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.infra-card:hover {
  border-color: var(--accent);
}

.infra-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.infra-header h3 {
  margin: 0;
  color: var(--accent);
}

.infra-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.infra-card.active .infra-content {
  max-height: 500px; /* Adjust based on content length */
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #334155;
}

.tech-tag {
  display: inline-block;
  background: #0f172a;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 5px;
  margin-top: 10px;
  border: 1px solid #334155;
}

.controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.control-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: var(--accent);
  color: var(--bg-color);
}
