/* --- 1. 기본 설정 (Base Styles) --- */
:root {
  color-scheme: light;
  --navy: #102a56;
  --blue-gray: #526789;
  --muted: #8792a5;
  --border: #e2e8f1;
  --soft: #f0f3f8;
  --white: #ffffff;
  --shadow: 0 12px 34px rgba(21, 43, 79, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--white);
}

body {
  margin: 0;
  color: var(--navy);
  background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR",
    "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* --- 2. 상단 헤더 --- */
.site-header {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 88px;
  padding: 20px clamp(22px, 6vw, 64px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  font-size: clamp(25px, 4.4vw, 39px);
  font-weight: 750;
  letter-spacing: -1.7px;
  line-height: 1;
}

.brand-primary {
  color: var(--navy);
}

.brand-secondary {
  color: #8b929d;
  font-weight: 500;
}

/* --- 3. 프로필 레이아웃 및 아바타 / 슬라이드 --- */
.profile-page {
  width: min(100% - 40px, 720px);
  margin: 0 auto;
  padding: 48px 0 52px;
}

.profile-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 42px;
  text-align: center;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 34px;
  color: var(--white);
  background: #18243a;
  box-shadow: var(--shadow);
}

.avatar span {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -3px;
}

/* 슬라이드 전용 스타일 */
.avatar-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-slide.active {
  opacity: 1;
}

.avatar-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 4. 커스텀 링크 카드 (link1, link2...) --- */
.link-cards-container {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.link-card {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: #c6d2e5;
  box-shadow: 0 15px 36px rgba(21, 43, 79, 0.08);
}

.link-card-image-wrap {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  overflow: hidden;
  background: var(--soft);
}

.link-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 20px 24px;
  gap: 4px;
}

.link-card-content strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--navy);
}

.link-card .chevron {
  margin-left: 0;
  margin-right: 24px;
  font-size: 36px;
}

/* --- 5. 대표 링크 카드 (imageMain 사용 시) --- */
.featured-card {
  display: block;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.featured-card:hover {
  transform: translateY(-2px);
  border-color: #c6d2e5;
  box-shadow: 0 15px 36px rgba(21, 43, 79, 0.08);
}

.featured-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 380px;
  overflow: hidden;
  background-color: #ffffff;
}

.featured-art img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: contain;
  background-color: #ffffff;
}

.featured-content {
  padding: 20px 18px 22px;
  text-align: center;
}

.featured-content h2 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--navy);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tag {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--blue-gray);
  background: var(--soft);
  font-size: 14px;
  font-weight: 600;
}

/* --- 6. 소셜 링크 카드 (Instagram, Naver Blog) --- */
.social-links {
  display: grid;
  gap: 16px;
}

.social-card {
  display: flex;
  align-items: center;
  min-height: 126px;
  padding: 22px 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.social-card:hover {
  transform: translateY(-2px);
  border-color: #c6d2e5;
  box-shadow: 0 15px 36px rgba(21, 43, 79, 0.08);
}

.social-icon {
  display: grid;
  flex: 0 0 72px;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-right: 24px;
  border-radius: 19px;
}

.social-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.instagram-icon {
  background: linear-gradient(145deg, #793bdb 0%, #ed168e 42%, #ff8a32 72%, #ffd24a 100%);
}

.instagram-icon rect,
.instagram-icon circle {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3.5;
}

.instagram-icon .icon-dot {
  fill: #ffffff;
  stroke: none;
}

.naverblog-icon {
  background: #000000;
}

.naverblog-icon path {
  fill: #ffffff;
}

.social-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 5px;
}

.social-copy strong {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.social-handle {
  overflow: hidden;
  color: var(--blue-gray);
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  margin-left: 16px;
  color: var(--navy);
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
}

/* --- 7. 하단 문의 (Contact Footer) --- */
.profile-footer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding: 38px 12px 0;
  text-align: center;
}

.profile-footer .footer-label {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.profile-footer a {
  color: #3478df;
  font-size: 19px;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

/* --- 8. 모바일 반응형 & 애니메이션 제어 --- */
@media (max-width: 520px) {
  .site-header {
    min-height: 76px;
    padding: 20px 24px;
  }

  .profile-page {
    width: calc(100% - 32px);
    padding-top: 34px;
    padding-bottom: 38px;
  }

  .profile-intro {
    margin-bottom: 32px;
  }

  .avatar {
    width: 126px;
    height: 126px;
    border-radius: 29px;
  }

  .avatar span {
    font-size: 33px;
  }

  .link-card {
    min-height: 84px;
    border-radius: 17px;
  }

  .link-card-image-wrap {
    flex-basis: 84px;
    width: 84px;
    height: 84px;
  }

  .link-card-content {
    padding: 16px 18px;
  }

  .link-card-content strong {
    font-size: 19px;
  }

  .link-card .chevron {
    margin-right: 18px;
    font-size: 30px;
  }

  .featured-art,
  .featured-art img {
    max-height: 280px;
  }

  .featured-content {
    padding: 18px 14px 20px;
  }

  .featured-content h2 {
    font-size: 22px;
  }

  .social-card {
    min-height: 104px;
    padding: 17px;
    border-radius: 17px;
  }

  .social-icon {
    flex-basis: 58px;
    width: 58px;
    height: 58px;
    margin-right: 15px;
    border-radius: 15px;
  }

  .social-copy strong {
    font-size: 20px;
  }

  .social-handle {
    font-size: 15px;
  }

  .chevron {
    margin-left: 8px;
    font-size: 34px;
  }

  .profile-footer {
    padding-top: 32px;
    gap: 8px;
    align-items: baseline;
  }

  .profile-footer .footer-label {
    font-size: 17px;
    line-height: 1.2;
  }

  .profile-footer a {
    font-size: 17px;
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-card,
  .link-card {
    transition: none;
  }
}

