@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700&display=swap");

/* ========== THEME VARIABLES ========== */
:root {
  --hue: 245;
  --primary: hsl(var(--hue), 55%, 55%);
  --primary-light: hsl(var(--hue), 55%, 65%);
  --primary-dark: hsl(var(--hue), 50%, 45%);
  --bg: hsl(var(--hue), 40%, 12%);
  --card: hsl(var(--hue), 40%, 18%);
  --border: hsl(var(--hue), 40%, 25%);
  --text: hsl(var(--hue), 20%, 85%);
  --text-light: hsl(var(--hue), 20%, 70%);
  --radius: 14px;
  --transition: 0.35s ease;
}

/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Syne", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ========== APP CONTAINER ========== */
.app-container {
  padding: 16px;
  animation: fadeIn 0.6s ease;
}

/* ========== HEADINGS ========== */
h1 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}

h2 {
  margin: 18px 0 10px;
  font-size: 1.1rem;
  color: var(--primary-light);
}

/* ========== INPUTS ========== */
.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

#searchInput {
  margin-top: 18px; /* or 16px for more spacing */
}


/* ========== BUTTONS ========== */
.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:active {
  transform: scale(0.97);
}

/* ========== TABS ========== */
.tab {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.tab.active {
  background: var(--primary);
  color: #fff;
}

/* ========== CATEGORY PILLS ===== */
.filter-container {
  margin: 16px 0; /* spacing from top/bottom */
}

.category-pills {
  display: flex;
  gap: 10px;
  position: relative;
  flex-wrap: wrap; /* wrap on small screens */
}

.pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-light);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.pill.active {
  background: var(--primary);
  color: #fff;
}

/* Sliding indicator */
.pill-indicator {
  position: absolute;
  bottom: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: left 0.3s ease, width 0.3s ease;
}

/* ========== TABLES ========== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}

/* Hide table on mobile, show cards instead */
.table {
  display: none;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--primary-light);
  font-weight: 600;
}

.table td a {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ========== PROJECT CARDS (MOBILE) ========== */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.project-card h3 {
  margin-bottom: 6px;
  font-size: 1.1rem;
  color: var(--primary-light);
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.project-card a {
  color: var(--primary-light);
  text-decoration: underline;
  margin-bottom: 8px;
}

.project-card .card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-card .card-actions button {
  flex: 1;
}

/* ========== DESCRIPTION / READ MORE ========== */
.desc {
  max-width: 100%;
  line-height: 1.4;
}

.read-more {
  color: var(--primary-light);
  cursor: pointer;
  font-size: 0.8rem;
  display: inline-block;
  margin-top: 4px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  margin-top: 24px;
  padding: 36px 20px;
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.empty-state h3 {
  margin-bottom: 8px;
  color: var(--primary-light);
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* ========== UTILITIES ========== */
.hidden {
  display: none;
}

button,
input,
select,
textarea {
  transition: all var(--transition);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= MEDIA QUERIES ================= */

/* ========== TABLET: 768px – 1150px ========== */
@media (min-width: 768px) and (max-width: 1150px) {
  /* Container wider for tablets */
  .app-container {
    max-width: 90%;
    padding: 24px;
    margin: auto;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .input {
    padding: 14px 16px;
  }

  .btn-primary {
    padding: 16px;
  }

  .tab {
    padding: 14px;
    font-size: 0.95rem;
  }

  /* Show table with horizontal scroll */
  .table {
    display: table;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: nowrap;
  }

  .desc {
    max-width: 300px;
  }

  .empty-state {
    padding: 36px 20px;
  }

  /* Hide mobile cards on tablet */
  .project-card {
    display: none;
  }
}

/* ========== DESKTOP: >1150px ========== */
@media (min-width: 1151px) {
  .app-container {
    max-width: 1100px;
    padding: 40px;
    margin: auto;
  }

  h1 {
    font-size: 2.2rem;
  }

  .table {
    display: table;
    font-size: 0.95rem;
  }

  .project-card {
    display: none;
  }
}

/* ========== MOBILE: <768px ========== */
@media (max-width: 767px) {
  /* Hide table on mobile */
  .table {
    display: none;
  }

  /* Project cards visible */
  .project-card {
    display: flex;
  }

  .app-container {
    padding: 16px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.1rem;
  }
}
