.portfolio-page h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Сітка карток */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

/* Картка */
.project-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

/* Верхній скрін */
.project-card-thumb {
  height: 190px;
  background-size: cover;
  background-position: center;
}

/* Нижня частина */
.project-card-body {
  padding: 1.2rem 1.35rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  font-size: 0.7rem;
  font-weight: 500;
  color: #1d4ed8;
}

.project-card-summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5563;
}

.project-card-links {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #2563eb;
}

.quiz {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f9fafb;
}

.quiz-question {
  margin-bottom: 1.1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #ffffff;
}

.quiz-question p {
  margin: 0 0 0.5rem;
}

.quiz-question label {
  display: block;
  margin-bottom: 0.25rem;
  cursor: pointer;
}

.quiz-explanation {
  margin-top: 0.4rem;
  font-size: 0.86rem;
  color: #4b5563;
  display: none;
}

.answer-correct {
  background: #ecfdf3;
  border-radius: 8px;
}

.answer-wrong {
  background: #fef2f2;
  border-radius: 8px;
}

.answer-missed {
  background: #eff6ff;
  border-radius: 8px;
}

.quiz-correct {
  border: 1px solid #22c55e;
}

.quiz-wrong {
  border: 1px solid #ef4444;
}

.quiz-submit {
  margin-top: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: #2563eb;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
}

.quiz-submit:hover {
  background: #1d4ed8;
}

.quiz-result {
  margin-top: 0.7rem;
  font-weight: 500;
}

