:root {
  --cf-orange: #f38020;
  --cf-amber: #f9a03c;
  --cf-soft: #fff7ed;
  --cf-border: #fed7aa;
  --ink: #1d1d1f;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --blue: #2563eb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fffaf5;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  background:
    radial-gradient(circle at top right, rgba(249, 160, 60, 0.32), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border-bottom: 1px solid var(--cf-border);
}

.nav,
.main,
.hero {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 20px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cf-orange), var(--cf-amber));
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(243, 128, 32, 0.24);
}

.nav-actions a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.hero {
  padding: 26px 0 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cf-orange);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 700px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.search-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 680px;
  margin-top: 20px;
  padding: 8px;
  border: 1px solid var(--cf-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(243, 128, 32, 0.14);
}

.search-panel input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: none;
  font-size: 16px;
}

.search-panel span {
  white-space: nowrap;
  color: var(--muted);
  font-weight: 700;
}

.main {
  padding: 20px 0 64px;
}

.filters {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-group {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.filter-label {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.chip.active {
  color: #fff;
  border-color: var(--cf-orange);
  background: var(--cf-orange);
}

.muted-row .chip.active {
  border-color: var(--blue);
  background: var(--blue);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  display: grid;
  gap: 16px;
  min-height: 250px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.06);
}

.project-card.featured {
  border-color: var(--cf-border);
  box-shadow: 0 14px 42px rgba(243, 128, 32, 0.15);
}

.card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.project-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--cf-orange), var(--cf-amber));
  font-weight: 900;
}

.project-card h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.project-card p {
  color: var(--muted);
  line-height: 1.6;
}

.pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--cf-soft);
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: auto;
}

.button.primary {
  color: #fff;
  border-color: var(--cf-orange);
  background: var(--cf-orange);
}

.button.ghost {
  background: #fff;
}

.empty-state {
  padding: 56px 24px;
  border: 1px dashed var(--cf-border);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.empty-icon {
  color: var(--cf-orange);
  font-size: 48px;
}

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(249, 160, 60, 0.22), transparent 30rem),
    #f8fafc;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.admin-topbar,
.admin-actions,
.list-head,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
}

.admin-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.admin-card.narrow {
  max-width: 420px;
  margin: 12vh auto 0;
}

.form {
  display: grid;
  gap: 14px;
}

.form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.form-head h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label input {
  width: auto;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-item.hidden-project {
  opacity: 0.62;
  background: #f9fafb;
}

.admin-item h3 {
  margin: 0 0 4px;
}

.admin-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-item-actions .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

@media (max-width: 860px) {
  .hero {
    padding: 32px 0 40px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .search-panel,
  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .filter-label {
    min-height: auto;
  }

  .admin-layout,
  .form-row {
    grid-template-columns: 1fr;
  }

  .nav {
    height: auto;
    padding: 16px 0;
    align-items: flex-start;
    flex-direction: column;
  }
}
