/* ===================== Base ===================== */
html {
  scroll-behavior: smooth;
}

body {
  scroll-padding-top: 4rem;
}

section[id] {
  scroll-margin-top: 4rem;
}

/* Soft overall background tones */
.hero-bg {
  background: linear-gradient(180deg, #eef6ff 0%, #f4fbf8 55%, #ffffff 100%);
}

.section-bg-soft {
  background: linear-gradient(180deg, #f7fbfd 0%, #eef8f3 100%);
}

/* Hero background glow */
.hero-glow {
  background:
    radial-gradient(50% 40% at 50% 0%, rgba(52, 120, 246, 0.12) 0%, rgba(52, 120, 246, 0) 100%),
    radial-gradient(35% 35% at 88% 12%, rgba(40, 172, 134, 0.14) 0%, rgba(40, 172, 134, 0) 100%),
    radial-gradient(30% 30% at 10% 20%, rgba(52, 120, 246, 0.08) 0%, rgba(52, 120, 246, 0) 100%);
}

/* ===================== Nav ===================== */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.mobile-link:last-child {
  border-bottom: none;
}

/* Hero title readability */
.hero-title {
  color: #0f1e3d;
  text-shadow: 0 2px 18px rgba(15, 30, 61, 0.06);
}

/* ===================== Hero badges ===================== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #dbe9ff;
  color: #1f4bab;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px -4px rgba(15, 23, 42, 0.08);
}

.hero-badge-outline {
  background: #f0fdf9;
  border-color: #aeebd3;
  color: #186f57;
}

/* ===================== About keyword cards ===================== */
.keyword-card {
  text-align: center;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 0.9rem;
  padding: 1.1rem 0.6rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.keyword-card i {
  color: #3478f6;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: block;
}

.keyword-card p {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
}

.keyword-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -14px rgba(15, 23, 42, 0.25);
  border-color: #dbe9ff;
}

/* ===================== Portfolio project cards ===================== */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 768px) {
  .project-card {
    padding: 2.25rem;
  }
}

/* 카드 내부: 아이콘 + 본문 (모바일 1열 → 데스크톱 좌우) */
.project-card-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .project-card-main {
    flex-direction: row;
  }
}

/* ===================== Portfolio 카드 상단 썸네일 ===================== */
.project-card-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e6edf5;
  background: #f1f5f9;
  /* 이미지가 없을 때 보이는 fallback */
  background-image: linear-gradient(135deg, #f0f6ff 0%, #eefcf7 100%);
}

.project-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-thumb img {
  transform: scale(1.02);
}

/* 이미지 로딩 실패 시: 레이아웃 유지 + 차분한 플레이스홀더 */
.project-card-thumb.is-missing::after,
.preview-frame.is-missing::after {
  content: "사이트 미리보기";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -18px rgba(52, 120, 246, 0.32);
  border-color: #a9cbfa;
}

.project-card-icon {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.project-card-icon.icon-brand {
  background: #f0f6ff;
  color: #255fd6;
}

.project-card-icon.icon-mint {
  background: #eefcf7;
  color: #1c8c6c;
}

.project-card-body {
  flex: 1;
  min-width: 0;
}

.url-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1c8c6c;
  background: #eefcf7;
  border: 1px solid #d6f5e9;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.feature-tags li i {
  color: #28ac86;
  font-size: 0.72rem;
}

.site-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  background: #255fd6;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.site-visit-btn:hover {
  background: #1f4bab;
  transform: translateY(-1px);
}

/* ===================== Credentials ===================== */
.credential-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: #334155;
  box-shadow: 0 4px 14px -10px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.credential-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -16px rgba(15, 23, 42, 0.2);
}

.credential-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #eefcf7;
  color: #1c8c6c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ===================== Course steps ===================== */
.course-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.step-num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #fff;
  color: #255fd6;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================== Audience cards ===================== */
.audience-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 1.1rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audience-card i {
  color: #28ac86;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  display: block;
}

.audience-card p {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.5;
}

.audience-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -16px rgba(15, 23, 42, 0.18);
}

/* ===================== Follow-up course cards ===================== */
.follow-course-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.1rem;
  padding: 1.5rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.follow-course-card:hover {
  box-shadow: 0 10px 25px -12px rgba(15, 23, 42, 0.15);
  transform: translateY(-2px);
}

/* ===================== Features ===================== */
.feature-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.1rem;
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.feature-card:hover {
  box-shadow: 0 10px 25px -12px rgba(15, 23, 42, 0.15);
  transform: translateY(-2px);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto;
  border-radius: 0.9rem;
  background: #f0f6ff;
  color: #3478f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

/* ===================== Contact rows ===================== */
.contact-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #f8fafc;
  border: 1px solid #dbe9ff;
  border-radius: 0.9rem;
  padding: 0.85rem 1.1rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.contact-row:hover {
  box-shadow: 0 8px 20px -10px rgba(52, 120, 246, 0.3);
  transform: translateY(-2px);
}

.contact-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #f0f6ff;
  color: #255fd6;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================== Hero 미리보기 (실제 제작 사이트) ===================== */
.hero-preview {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dbe9ff;
  border-radius: 1.5rem;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.35);
}

@media (min-width: 640px) {
  .hero-preview {
    padding: 1.75rem;
  }
}

.hero-preview-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f4bab;
}

.hero-preview-desc {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #64748b;
}

/* 브라우저 목업 느낌의 캡처 카드 */
.preview-shot {
  display: block;
  text-decoration: none;
}

.preview-shot-main {
  margin-top: 1.1rem;
}

.preview-frame {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  background-image: linear-gradient(135deg, #f0f6ff 0%, #eefcf7 100%);
  box-shadow: 0 10px 26px -18px rgba(15, 23, 42, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.preview-shot:hover .preview-frame {
  transform: translateY(-4px);
  box-shadow: 0 20px 38px -20px rgba(52, 120, 246, 0.38);
  border-color: #b8d4ff;
}

/* 상단 브라우저 바 */
.preview-bar {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.preview-bar i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #cbd5e1;
}

.preview-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
}

/* 이미지가 없을 때도 프레임 높이가 유지되도록 */
.preview-frame.is-missing {
  aspect-ratio: 16 / 9;
}

.preview-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-align: center;
}

.preview-thumbs {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

/* 모바일에서 미리보기가 과하게 커지지 않도록 폭 제한 */
@media (max-width: 1023px) {
  .hero-preview {
    max-width: 30rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* 모션을 줄이도록 설정한 사용자 환경 존중 */
@media (prefers-reduced-motion: reduce) {
  .preview-shot:hover .preview-frame,
  .project-card:hover .project-card-thumb img {
    transform: none;
  }
}

/* ===================== Portfolio QR card ===================== */
.qr-card {
  background: #fff;
  border: 1px solid #dbe9ff;
  border-radius: 1.5rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 4px 14px -10px rgba(15, 23, 42, 0.1);
}

.qr-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f4bab;
}

.qr-desc {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.65;
  color: #64748b;
}

.qr-frame {
  margin: 1.1rem auto 0;
  width: fit-content;
  padding: 0.6rem;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 0.9rem;
}

.qr-frame img {
  display: block;
  width: 140px;
  height: 140px;
}

.qr-url {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #255fd6;
  word-break: break-all;
  transition: color 0.2s ease;
}

.qr-url:hover {
  color: #1f4bab;
  text-decoration: underline;
}

/* ===================== Floating mobile CTA ===================== */
#fab-contact {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #255fd6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 10px 25px -6px rgba(37, 95, 214, 0.55);
  z-index: 40;
}
