:root {
  --bg-top: #f5f9ff;
  --bg-bottom: #eef5f2;
  --surface: #ffffff;
  --surface-border: #d8e4df;
  --text: #13231f;
  --text-muted: #4c625b;
  --accent: #14624e;
  --accent-soft: #e6f4ef;
  --term-red-text: #8e1026;
  --term-red-hover: #b3122d;
  --term-red-bg: #ffe3e7;
  --term-red-border: #f5c2cb;
  --shadow: 0 14px 30px rgba(19, 35, 31, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: #ffffff;
}

.page {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.hero {
  margin-bottom: 2rem;
  animation: fade-slide 0.5s ease-out both;
}

.eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.cmu-wordmark {
  display: block;
  width: min(360px, 78vw);
  height: auto;
  margin: 0 0 0.8rem;
}

h1 {
  margin: 0 0 0.65rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.8rem, 2.2vw + 1.1rem, 2.8rem);
  line-height: 1.2;
}

.lead {
  margin: 0;
  max-width: 65ch;
  color: #3e534d;
  font-size: 1rem;
  line-height: 1.7;
}

.cards {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.3rem;
}

.card {
  position: relative;
  background: linear-gradient(165deg, #ffffff 0%, #f7fbff 58%, #f1f7f4 100%);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 24px rgba(19, 35, 31, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: fade-slide 0.45s ease-out both;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: -20%;
  top: 0;
  width: 140%;
  height: 4px;
  background: linear-gradient(90deg, #ffd6de 0%, #ffe8c8 35%, #dff1e9 100%);
  opacity: 0.95;
  pointer-events: none;
}

.card:nth-child(2n) {
  background: linear-gradient(165deg, #ffffff 0%, #fff8fb 62%, #f8fdfb 100%);
}

.card:nth-child(3n) {
  background: linear-gradient(165deg, #ffffff 0%, #f7fbff 50%, #fff7f1 100%);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.card:nth-child(2) {
  animation-delay: 0.06s;
}

.card:nth-child(3) {
  animation-delay: 0.12s;
}

.card:nth-child(4) {
  animation-delay: 0.18s;
}

.card:hover,
.card:focus-within {
  transform: translateY(-5px);
  border-color: #c7dcd1;
  box-shadow:
    0 22px 42px rgba(19, 35, 31, 0.14),
    0 0 0 1px rgba(199, 220, 209, 0.35);
}

.card a {
  display: grid;
  gap: 0.25rem;
  min-height: 150px;
  padding: 0.72rem 0.72rem 0.78rem;
  justify-items: center;
  align-content: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.term {
  width: fit-content;
  padding: 0;
  border-radius: 0;
  font-size: 1.42rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--term-red-text);
  background: transparent;
  border: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.card:hover .term,
.card:focus-within .term {
  color: var(--term-red-hover);
}

.title {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.28;
  font-weight: 800;
  color: #111111;
}

.manage-note {
  margin-top: 2rem;
  padding: 0.95rem 1rem;
  border-radius: 10px;
  border: 1px dashed #a9c6ba;
  background: rgba(255, 255, 255, 0.5);
  color: #2f5048;
  font-size: 0.93rem;
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .page {
    padding-top: 2.6rem;
  }

  .cmu-wordmark {
    width: min(300px, 82vw);
    margin-bottom: 0.65rem;
  }

  .lead {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .card a {
    min-height: 118px;
    padding: 0.58rem 0.58rem 0.62rem;
    gap: 0.2rem;
  }

  .term {
    font-size: 1.18rem;
  }

  .title {
    font-size: 1.85rem;
    line-height: 1.2;
  }
}
