/* =============================================================
   Hero / Landing — 홍다경 Portfolio
   태그라인 좌측 + 인물 우측, 손그림 두들 + 진입 애니메이션
   ============================================================= */

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 68px);
  display: flex; align-items: center;
  background:
    radial-gradient(70% 70% at 78% 62%, rgba(233, 255, 112, 0.22), transparent 60%),
    radial-gradient(80% 70% at 8% 95%, rgba(239, 158, 120, 0.13), transparent 55%),
    var(--color-paper);
}

.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--space-12);
}

/* ---------------- Text column ---------------- */
.hero__copy { position: relative; z-index: 3; }

.hero__eyebrow {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  color: var(--color-subtext);
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.5);
  margin-bottom: var(--space-6);
}

.hero__title {
  font-size: var(--fs-display);
  font-weight: var(--fw-extra);
  line-height: 1.18;
  letter-spacing: var(--ls-tight);
  margin: 0 0 var(--space-6);
}
.hero__title .line { display: block; transform-origin: left center; white-space: nowrap; }
.hero__title .line--1 { transform: rotate(-1.5deg); }
.hero__title .line--2 { transform: rotate(0.8deg);  margin-left: 0.6ch; }
.hero__title .line--3 { transform: rotate(-0.6deg); }

.hero__title .name {
  font-size: 1.18em;
  background: linear-gradient(180deg, var(--color-ink), #2f4a39);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 라임 형광펜 — 진입 시 좌→우로 칠해짐 */
.hl {
  position: relative; white-space: nowrap;
  padding: 0 0.08em;
}
.hl::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em;
  height: 0.62em; background: var(--color-lime); z-index: -1;
  border-radius: 2px;
  transform: scaleX(0); transform-origin: left center;
  animation: hlSweep .7s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: 1.05s;
}
.hl--coral::before { background: var(--color-coral); opacity: 0.85; }

.hero__subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  color: var(--color-subtext);
  max-width: 42ch;
  margin: 0 0 var(--space-8);
  padding-left: var(--space-4);
  border-left: 3px solid var(--color-coral);
}

.hero__cta { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* ---------------- Photo column ---------------- */
.hero__figure {
  position: relative; z-index: 2;
  justify-self: end;
}
.hero__photo-frame {
  position: relative;
  width: min(440px, 80vw);
  aspect-ratio: 4 / 5;
  border-radius: 52% 48% 47% 53% / 47% 45% 55% 53%;  /* organic blob */
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: blobMorph 14s ease-in-out infinite alternate;
}
.hero__photo-frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: 74% 16%;
  display: block;
}
/* blob 뒤 라임 그림자 레이어 */
.hero__figure::after {
  content: ""; position: absolute; inset: 0;
  transform: translate(18px, 22px) rotate(-4deg);
  border-radius: 52% 48% 47% 53% / 47% 45% 55% 53%;
  background: var(--color-lime); z-index: -1; opacity: 0.55;
}

/* ---------------- Doodles (손그림) ---------------- */
.hero__doodles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.doodle { position: absolute; color: var(--color-ink); }
.doodle svg { display: block; width: 100%; height: 100%; overflow: visible; }

.doodle--star1  { top: 14%;  left: 6%;   width: 42px; color: var(--color-coral); animation: twinkle 2.4s ease-in-out infinite; }
.doodle--star2  { top: 82%;  left: 52%;  width: 28px; color: var(--color-ink);  animation: twinkle 3.1s ease-in-out .6s infinite; }
.doodle--star3  { top: 20%;  right: 30%; width: 22px; color: var(--color-coral); animation: twinkle 2.7s ease-in-out 1.1s infinite; }
.doodle--heart1 { top: 30%;  right: 10%; width: 34px; color: var(--color-coral); animation: floaty 4s ease-in-out infinite; }
.doodle--heart2 { bottom: 16%; right: 26%; width: 24px; color: var(--color-coral); animation: floaty 5s ease-in-out .8s infinite; }
.doodle--squiggle1 { top: 8%; left: 30%; width: 120px; color: var(--color-ink); }
.doodle--squiggle2 { bottom: 20%; left: 4%; width: 90px; color: var(--color-lime-deep); }
.doodle--arrow1 { top: 46%; left: 44%; width: 110px; color: var(--color-ink); transform: rotate(6deg); }
.doodle--arrow2 { bottom: 10%; left: 33%; width: 70px; color: var(--color-coral); }
.doodle--spark  { top: 24%;  right: 6%;  width: 30px; color: var(--color-lime-deep); animation: twinkle 2s ease-in-out .3s infinite; }
.doodle--circle { top: 8%; right: 4%; width: 150px; color: var(--color-coral); transform: rotate(-8deg); }

/* 그려지는 선(stroke draw) */
.draw-path { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400);
  animation: drawIn 1.1s ease forwards; }
.draw-d1 { animation-delay: 1.3s; }
.draw-d2 { animation-delay: 1.6s; }
.draw-d3 { animation-delay: 1.9s; }

/* ---------------- Entrance: fade-up (stagger) ---------------- */
.reveal { opacity: 0; transform: translateY(28px); animation: fadeUp .8s cubic-bezier(.2,.8,.2,1) forwards; }
.d-0 { animation-delay: .15s; }
.d-1 { animation-delay: .35s; }
.d-2 { animation-delay: .60s; }
.d-3 { animation-delay: .85s; }
.d-4 { animation-delay: 1.05s; }
.hero__figure.reveal { transform: translateY(28px) scale(.98); }

/* ---------------- Keyframes ---------------- */
@keyframes fadeUp   { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes hlSweep  { to { transform: scaleX(1); } }
@keyframes drawIn   { to { stroke-dashoffset: 0; } }
@keyframes twinkle  { 0%,100% { transform: scale(.7) rotate(0deg); opacity:.5; }
                      50%      { transform: scale(1.15) rotate(12deg); opacity:1; } }
@keyframes floaty   { 0%,100% { transform: translateY(0) rotate(-6deg); }
                      50%      { transform: translateY(-14px) rotate(6deg); } }
@keyframes blobMorph {
  0%   { border-radius: 52% 48% 47% 53% / 47% 45% 55% 53%; }
  100% { border-radius: 45% 55% 52% 48% / 53% 50% 50% 47%; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-12); text-align: left; }
  .hero__title .line { white-space: normal; }
  .hero__figure { justify-self: center; order: -1; }
  .hero__photo-frame { width: min(320px, 78vw); }
  .doodle--arrow1, .doodle--squiggle1, .doodle--star2 { display: none; }
}

/* ---------------- 접근성: 모션 최소화 ---------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .hl::before { transform: scaleX(1); animation: none; }
  .draw-path { stroke-dashoffset: 0; animation: none; }
  .doodle, .hero__photo-frame { animation: none !important; }
}
