:root {
  color-scheme: light;
  --background: #f4f6fb;
  --surface: #ffffff;
  --text: #182034;
  --muted: #6b7280;
  --border: #e3e7f0;
  --primary: #5b5ce2;
  --primary-dark: #4647bd;
  --status-bg: #fff7db;
  --status-text: #8c6500;
  --shadow: 0 16px 40px rgba(34, 45, 80, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(91, 92, 226, 0.12), transparent 32rem),
    var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-header,
.section-heading,
.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-header {
  margin-bottom: 64px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.subtitle {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.primary-button,
.secondary-button {
  border-radius: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 14px 20px;
  border: 0;
  color: white;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(91, 92, 226, 0.28);
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 3px solid rgba(91, 92, 226, 0.28);
  outline-offset: 3px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.project-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 290px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: card-in 360ms ease both;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(34, 45, 80, 0.13);
}

.project-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #4a4bc4;
  background: #e9e9ff;
  font-size: 0.8rem;
  font-weight: 850;
}

.accent-pink {
  color: #a2396f;
  background: #ffe5f1;
}

.accent-green {
  color: #26785b;
  background: #dcf8ec;
}

.status {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--status-text);
  background: var(--status-bg);
  font-size: 0.76rem;
  font-weight: 800;
}

.project-card h3 {
  margin: 28px 0 10px;
  font-size: 1.28rem;
}

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

.secondary-button {
  width: 100%;
  margin-top: auto;
  padding: 11px 16px;
  border: 1px solid var(--border);
  color: var(--text);
  background: #f9fafc;
}

.secondary-button:hover {
  border-color: #cfd4e2;
  background: #f1f3f8;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 840px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 28px, 520px);
    padding: 42px 0;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 46px;
  }

  .primary-button {
    width: 100%;
  }

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

  .project-card {
    min-height: 265px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
