/* ─── Reset & Root ─── */
:root {
  --yellow-100: #fffdf0;
  --yellow-200: #fff8d6;
  --yellow-300: #f5e49a;
  --yellow-400: #e8cc6a;
  --gold-glow:   rgba(255,232,142,0.58);
  --blue-glow:   rgba(151,189,255,0.18);
  --ivory:      #fdf8eb;
  --navy:       #0c1b38;
  --navy-2:     #081229;
  --text:       #fdf9ef;
  --muted:      #d4c99a;
  --surface:    rgba(18, 28, 48, 0.88);
  --surface-2:  rgba(22, 34, 58, 0.92);
  --surface-3:  rgba(28, 40, 66, 0.88);
  --line:       rgba(255,240,180,0.10);
  --chip-bg:    rgba(255,248,210,0.06);
  --chip-line:  rgba(255,240,180,0.13);
  --chip-text:  rgba(253,248,226,0.88);
  --subtle-text: rgba(253,248,226,0.64);
  --arrow-text: rgba(255,248,214,0.66);
  --label-bg: rgba(255,248,200,0.075);
  --label-border: rgba(255,240,180,0.13);
  --label-text: var(--yellow-200);
  --done-bg: rgba(255,248,200,0.10);
  --ongoing-bg: rgba(180,225,255,0.10);
  --ongoing-text: #d4eeff;
  --body-bg:
    radial-gradient(ellipse at 12% 10%, rgba(255,236,156,0.08), transparent 22%),
    radial-gradient(ellipse at 84% 16%, rgba(115,150,230,0.08), transparent 25%),
    linear-gradient(180deg, #111f43 0%, #081735 44%, #050c1c 100%);
  --star-color: rgba(255,250,214,.92);
  --star-color-2: rgba(209,225,255,.58);
  --hero-glow: rgba(255,248,198,0.08);
  --selection: rgba(255,232,142,0.28);
  --shadow:     0 16px 42px rgba(0,0,0,0.26);
  --radius:     24px;
  --radius-sm:  10px;
  --radius-xs:  8px;
  --radius-pill: 999px;
}

body.theme-light {
  --yellow-100: #1b2b48;
  --yellow-200: #243756;
  --yellow-300: #667895;
  --yellow-400: #9a8133;
  --gold-glow: rgba(218,174,72,0.30);
  --blue-glow: rgba(126,158,224,0.20);
  --ivory: #fff9ec;
  --navy: #eef5ff;
  --navy-2: #fbf6e8;
  --text: #1d2d4b;
  --muted: #637590;
  --surface: rgba(255, 253, 245, 0.88);
  --surface-2: rgba(255, 253, 247, 0.92);
  --surface-3: rgba(239, 247, 255, 0.86);
  --line: rgba(90, 109, 145, 0.18);
  --chip-bg: rgba(255,255,255,0.72);
  --chip-line: rgba(90, 109, 145, 0.16);
  --chip-text: rgba(29, 45, 75, 0.90);
  --subtle-text: rgba(83, 99, 132, 0.82);
  --arrow-text: rgba(43, 58, 88, 0.64);
  --label-bg: rgba(255, 244, 203, 0.90);
  --label-border: rgba(185, 145, 55, 0.24);
  --label-text: #233756;
  --done-bg: rgba(239, 205, 121, 0.30);
  --ongoing-bg: rgba(177, 204, 255, 0.32);
  --ongoing-text: #2d4268;
  --body-bg:
    radial-gradient(ellipse at 16% -5%, rgba(255,224,145,0.42), transparent 30%),
    radial-gradient(ellipse at 86% 3%, rgba(202,222,255,0.72), transparent 34%),
    radial-gradient(ellipse at 50% 54%, rgba(255,249,224,0.64), transparent 44%),
    linear-gradient(180deg, #fff9ec 0%, #edf6ff 46%, #fbf5e8 100%);
  --star-color: rgba(56, 78, 124, .34);
  --star-color-2: rgba(214, 165, 70, .34);
  --hero-glow: rgba(230, 186, 79, 0.20);
  --selection: rgba(208,164,62,0.22);
  --shadow: 0 22px 58px rgba(79, 91, 122, 0.14);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}
img { user-select: none; -webkit-user-drag: none; display: block; }
.top-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
body {
  min-height: 100vh;
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  color: var(--text);
  background: var(--body-bg);
  overflow-x: hidden;
  transition: background .65s ease, color .4s ease;
}
body.theme-light .bg-dust {
  opacity: .16;
  mix-blend-mode: multiply;
  filter: saturate(.82) brightness(1.08);
}
body.theme-light .bg-spark {
  filter: drop-shadow(0 0 10px rgba(218,174,72,0.26)) saturate(.9);
}
::selection { background: var(--selection); }
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: .22;
  background-image:
    radial-gradient(circle, var(--star-color) 0 1px, transparent 1.6px),
    radial-gradient(circle, var(--star-color-2) 0 1px, transparent 1.8px);
  background-size: 92px 92px, 137px 137px;
  background-position: 12px 18px, 44px 72px;
  mask-image: linear-gradient(to bottom, black 0%, black 66%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .18;
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(255,244,198,0.055) 48%, transparent 55%),
    linear-gradient(68deg, transparent 0 58%, rgba(132,169,255,0.055) 62%, transparent 70%);
  mix-blend-mode: screen;
}
body.theme-light::before {
  opacity: .38;
  background-image:
    radial-gradient(circle, rgba(44,68,112,.40) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(214,164,70,.42) 0 1px, transparent 2px);
  background-size: 108px 108px, 168px 168px;
  background-position: 20px 26px, 70px 92px;
  mask-image: linear-gradient(to bottom, black 0%, black 72%, transparent 100%);
}
body.theme-light::after {
  opacity: .42;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.34), transparent 38%),
    radial-gradient(ellipse at 18% 30%, rgba(255,221,146,0.22), transparent 28%),
    radial-gradient(ellipse at 82% 34%, rgba(177,204,255,0.24), transparent 30%);
  mix-blend-mode: normal;
}
.theme-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 36%, rgba(255,248,208,0.20), transparent 32%),
    linear-gradient(180deg, rgba(6,13,31,0.96), rgba(13,26,54,0.92));
  mix-blend-mode: normal;
}
body.theme-light .theme-transition {
  background:
    radial-gradient(circle at 24% 10%, rgba(255,226,147,0.70), transparent 24%),
    radial-gradient(circle at 78% 16%, rgba(198,219,255,0.78), transparent 30%),
    linear-gradient(180deg, rgba(255,249,232,0.96), rgba(235,245,255,0.92));
}
body.theme-changing .theme-transition {
  animation: themeFade .94s cubic-bezier(.2,.8,.2,1) both;
}
body.theme-changing header,
body.theme-changing .site,
body.theme-changing footer {
  animation: contentFade .94s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes themeFade {
  0% {
    opacity: 0;
  }
  44% {
    opacity: .94;
  }
  100% {
    opacity: 0;
  }
}
@keyframes contentFade {
  0%, 100% { opacity: 1; filter: none; }
  44% { opacity: .54; filter: blur(1.5px); }
}

/* ─── 배경 레이어 (parallax target) ─── */
.bg-layer {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.bg-dust {
  position: absolute;
  opacity: 0.26;
  mix-blend-mode: screen;
  filter: brightness(1.2);
  /* 별가루가 화면을 풍성하게 덮도록 크게 */
}
.d1 { width: 700px; top: -4%;  left: -6%;  }
.d2 { width: 600px; top: 35%;  right: -8%; }
.d3 { width: 700px; bottom:-4%;left: 20%;  }

.bg-spark {
  position: absolute;
  opacity: 0;   /* JS에서 twinkle로 제어 */
  filter: drop-shadow(0 0 8px rgba(255,248,200,0.6));
}
.sp1 { width: 62px;  top: 8%;  left: 6%;  }
.sp2 { width: 84px;  top: 14%; right: 8%; }
.sp3 { width: 48px;  top: 42%; left: 12%; }
.sp4 { width: 70px;  top: 58%; right: 15%;}
.sp5 { width: 56px;  bottom:16%; left:7%; }
.sp6 { width: 40px;  bottom:9%;  right:22%;}

/* ─── Card ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255,255,255,0.035);
  backdrop-filter: blur(14px);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

/* ─── Header ─── */
header {
  position: sticky; top: 0; z-index: 10;
  padding: 16px 0 8px;
}
.nav-shell {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text);
  font-family: 'Inter', 'Noto Sans KR', sans-serif; font-weight: 850; font-size: 1.05rem;
}
.nav-star { width: 26px; filter: drop-shadow(0 0 8px rgba(255,240,180,0.55)); }
nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
nav a {
  text-decoration: none; color: var(--muted); font-weight: 800;
  padding: 8px 13px; border-radius: var(--radius-pill); transition: .18s;
}
nav a:hover { background: rgba(255,248,200,0.10); color: var(--text); }
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-sm) + 5px);
  background: rgba(255,248,200,0.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
}
.icon-action {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  transition: transform .18s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.icon-action:hover {
  transform: translateY(-1px);
  background: var(--surface-3);
}
.icon-action img {
  width: 19px;
  height: 19px;
  filter: drop-shadow(0 0 8px rgba(255,238,160,0.16));
}
body.theme-light .icon-action img,
body.theme-light .link-icon img,
body.theme-light .tech-chip img {
  filter: brightness(0) saturate(100%) invert(18%) sepia(23%) saturate(1052%) hue-rotate(182deg) brightness(92%) contrast(90%);
}
.theme-toggle {
  font: inherit;
}
.theme-icon {
  grid-area: 1 / 1;
  font-size: 1.08rem;
  line-height: 1;
  transition: opacity .28s ease, transform .42s cubic-bezier(.2,.8,.2,1);
}
.theme-icon-moon {
  opacity: 0;
  transform: translateY(12px) rotate(-60deg) scale(.72);
}
body.theme-light .theme-icon-sun {
  opacity: 0;
  transform: translateY(-12px) rotate(60deg) scale(.72);
}
body.theme-light .theme-icon-moon {
  opacity: 1;
  transform: translateY(0) rotate(0deg) scale(1);
}
/* ─── Layout ─── */
.wrap  { width: min(1760px, calc(100% - 28px)); margin: 0 auto; }
.site  {
  position: relative;
  z-index: 1;
  padding-bottom: 32px;
  display: grid;
  gap: 8px;
}
.site > *,
.hero,
.section,
.hero-main,
.stack-board,
.project-list,
.profile-links,
.link-card,
.project-card {
  min-width: 0;
}
.hero  {
  display: grid;
  grid-template-columns: 1fr;
  padding-top: 18px;
  position: relative;
}
.hero::before,
.hero::after,
#stack::before {
  content: "";
  position: absolute;
  pointer-events: none;
}
.hero::before {
  width: clamp(180px, 18vw, 320px);
  height: clamp(120px, 12vw, 210px);
  left: clamp(16px, 5vw, 86px);
  bottom: -42px;
  opacity: .34;
  background:
    radial-gradient(circle at 12% 25%, var(--star-color) 0 2px, transparent 2.8px),
    radial-gradient(circle at 58% 10%, var(--star-color-2) 0 1.5px, transparent 2.4px),
    radial-gradient(circle at 84% 64%, var(--star-color) 0 2px, transparent 3px),
    linear-gradient(118deg, transparent 0 19%, rgba(255,248,200,0.15) 20%, transparent 21% 54%, rgba(151,189,255,0.10) 55%, transparent 56%);
  filter: blur(.1px);
}
.hero::after {
  left: clamp(24px, 10vw, 180px);
  right: clamp(24px, 11vw, 200px);
  bottom: -19px;
  height: 1px;
  opacity: .24;
  background: linear-gradient(90deg, transparent, var(--star-color), rgba(151,189,255,0.40), transparent);
  box-shadow: 0 0 28px rgba(255,240,180,0.18);
}
body.theme-light .hero::before {
  opacity: .48;
  background:
    radial-gradient(circle at 12% 25%, rgba(40,65,108,.38) 0 2px, transparent 2.8px),
    radial-gradient(circle at 58% 10%, rgba(218,174,72,.52) 0 1.5px, transparent 2.4px),
    radial-gradient(circle at 84% 64%, rgba(40,65,108,.34) 0 2px, transparent 3px),
    linear-gradient(118deg, transparent 0 19%, rgba(218,174,72,0.22) 20%, transparent 21% 54%, rgba(120,155,220,0.18) 55%, transparent 56%);
}
body.theme-light .hero::after {
  opacity: .36;
  background: linear-gradient(90deg, transparent, rgba(218,174,72,.52), rgba(120,155,220,.28), transparent);
}

/* ─── Hero Main ─── */
.hero-main {
  padding: clamp(40px, 5vw, 72px);
  position: relative;
  overflow: hidden;
  max-width: 100%;
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 295px);
  align-items: center;
  gap: clamp(40px, 6vw, 92px);
}
.hero-main::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 48%;
  top: 27%;
  width: clamp(260px, 25vw, 460px);
  height: clamp(150px, 15vw, 270px);
  border-top: 1px solid rgba(255,248,200,0.18);
  border-right: 1px solid rgba(151,189,255,0.13);
  border-bottom: 1px solid rgba(151,189,255,0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  opacity: .88;
  pointer-events: none;
  transform: translateX(-24%);
  background:
    radial-gradient(circle at 8% 18%, rgba(255,248,200,0.42) 0 2.5px, transparent 3.4px),
    radial-gradient(circle at 36% 36%, rgba(151,189,255,0.24) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 68% 6%, rgba(151,189,255,0.30) 0 1.7px, transparent 2.8px),
    radial-gradient(circle at 92% 58%, rgba(255,248,200,0.32) 0 2.2px, transparent 3.2px),
    linear-gradient(20deg, transparent 0 36%, rgba(255,248,200,0.08) 37%, transparent 38%),
    linear-gradient(152deg, transparent 0 48%, rgba(151,189,255,0.08) 49%, transparent 50%);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 82%, transparent);
}
body.theme-light .hero-main::before {
  border-top-color: rgba(184,143,56,0.22);
  border-right-color: rgba(92,116,166,0.18);
  border-bottom-color: rgba(92,116,166,0.10);
  background:
    radial-gradient(circle at 8% 18%, rgba(184,143,56,0.44) 0 2.5px, transparent 3.4px),
    radial-gradient(circle at 36% 36%, rgba(92,116,166,0.20) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 68% 6%, rgba(92,116,166,0.24) 0 1.7px, transparent 2.8px),
    radial-gradient(circle at 92% 58%, rgba(184,143,56,0.32) 0 2.2px, transparent 3.2px),
    linear-gradient(20deg, transparent 0 36%, rgba(184,143,56,0.10) 37%, transparent 38%),
    linear-gradient(152deg, transparent 0 48%, rgba(92,116,166,0.08) 49%, transparent 50%);
}
.hero-main::after {
  content: "";
  position: absolute;
  width: 52%;
  aspect-ratio: 1;
  right: -12%;
  top: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow), transparent 66%);
  filter: blur(4px);
  pointer-events: none;
}
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  justify-items: start;
}
.hdeco { position: absolute; }
.hs1  { width: 94px; top: 16px;  right: 32px;  transform: rotate(12deg);
        opacity: .48; filter: drop-shadow(0 0 12px rgba(255,240,180,0.18)); }
.hs2  { width:  58px; bottom: 22px; right: 72px; transform: rotate(-8deg);
        opacity: .42; filter: drop-shadow(0 0 10px rgba(255,240,170,0.14)); }
.hsp1 { width:  42px; top: 80px;  left: 28px; opacity: .34; }
.hsp2 { width:  30px; bottom: 90px; left: 44%; opacity: .3; }

.pill {
  display: inline-flex; padding: 9px 14px; border-radius: var(--radius-pill);
  background: var(--label-bg); color: var(--label-text);
  border: 1px solid var(--label-border);
  font-size: 1.02rem;
  font-weight: 850;
  margin: 0;
}
h1 {
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  font-size: clamp(3.35rem, 5.35vw, 5.45rem);
  font-weight: 900;
  line-height: .96; margin: 0;
  color: var(--yellow-100);
  letter-spacing: -0.025em;
  text-shadow:
    0 6px 28px rgba(0,0,0,0.25),
    0 0 26px rgba(255,238,170,0.16);
}
h1 .name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  word-break: keep-all;
  overflow-wrap: normal;
}
h1 .name-ko {
  display: inline-block;
}
.latin-name {
  display: inline-flex;
  align-items: center;
  color: var(--yellow-100);
  font-size: clamp(1.1rem, 1.7vw, 1.42rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1;
  text-shadow: none;
  transform: translateY(-0.08em);
}
.hero-copy { max-width: 58ch; color: var(--muted); line-height: 1.84; font-size: 1.12rem; margin: 0; }

/* ─── Portrait ─── */
.portrait-card {
  position: relative;
  z-index: 2;
  min-height: 295px;
  aspect-ratio: 1 / 1.04;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-3);
  border: 1px solid rgba(255,240,180,0.10);
}
.portrait-card::before {
  content: none;
}
.portrait-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(72%, 196px);
  height: 24%;
  transform: translateX(-50%);
  z-index: -1;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at center, rgba(255,238,168,0.10), transparent 68%);
  filter: blur(18px);
}
.portrait-frame {
  position: relative;
  z-index: 2;
  width: min(86%, 252px);
  margin: 0;
  filter:
    drop-shadow(0 22px 34px rgba(0,0,0,0.36))
    drop-shadow(0 0 22px rgba(255,238,170,0.18));
}
.portrait-frame img {
  width: 100%;
  height: auto;
}
.portrait-caption {
  position: absolute;
  left: 24px; right: 24px; bottom: 22px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,240,180,0.14);
  border-radius: var(--radius-sm);
  background: rgba(7,15,36,0.52);
  backdrop-filter: blur(14px);
}

/* ─── Profile Links ─── */
.profile-links {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}
.link-card {
  position: relative;
  min-height: 96px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255,240,180,0.14);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow:
    0 16px 42px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,248,200,0.10);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.link-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(110deg, transparent 0%, rgba(255,248,210,0.16) 42%, transparent 68%);
  opacity: 0;
  transform: translateX(-28%);
  transition: opacity .22s ease, transform .45s ease;
  pointer-events: none;
}
.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,240,180,0.24);
  background: var(--surface-2);
}
.link-card:hover::after {
  opacity: 1;
  transform: translateX(28%);
}
.link-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255,248,200,0.10);
  border: 1px solid rgba(255,240,180,0.12);
  box-shadow: 0 0 22px rgba(255,238,160,0.09);
}
.link-icon img {
  width: 23px;
  height: 23px;
  filter: drop-shadow(0 0 10px rgba(255,238,160,0.26));
}
.text-icon {
  color: var(--yellow-100);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -.04em;
}
.mailbox-icon {
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0;
  filter: drop-shadow(0 0 10px rgba(255,238,160,0.18));
}
.link-text {
  display: grid;
  gap: 3px;
}
.link-text strong {
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  color: var(--yellow-100);
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1.1;
}
.link-text small {
  color: var(--subtle-text);
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.45;
}
.link-arrow {
  color: var(--arrow-text);
  font-weight: 900;
  transform: translateY(-1px);
}
.contact-section {
  padding-bottom: 18px;
}

.contact-section .section-head {
  position: relative;
}
.contact-section .section-head::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 8px;
  width: min(34vw, 340px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,248,200,0.20), transparent);
  opacity: .75;
}
body.theme-light .contact-section .section-head::after {
  background: linear-gradient(90deg, transparent, rgba(184,143,56,0.22), transparent);
}

/* ─── Hero Side ─── */
.hero-side { display: grid; gap: 18px; }
.about-card { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.orb-wrap { width: 160px; height: 160px; position: relative; flex-shrink: 0; }
.orb-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,248,200,0.18), transparent 60%);
  border: 1px solid rgba(255,240,180,0.12);
}
.orb-center {
  position: absolute; inset: 16px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Inter', 'Noto Sans KR', sans-serif; font-size: 2rem; color: #5b4514;
  font-weight: 900;
  background: radial-gradient(circle at 36% 30%, #fffbe8, #f8e38e 58%, #e0bc4a 100%);
  box-shadow: 0 0 32px rgba(255,235,140,0.28);
}
.about-text h2 {
  font-family: 'Inter', 'Noto Sans KR', sans-serif; font-size: 1.55rem;
  font-weight: 850;
  color: var(--yellow-100); margin-bottom: 10px;
}
.about-text p { color: var(--muted); line-height: 1.85; font-size: 1rem; margin-bottom: 10px; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--yellow-200); }

/* ─── Section ─── */
.section { padding: clamp(30px, 4vw, 52px) 0; }
.section-head { margin-bottom: 20px; }
.section-kicker {
  display: inline-flex; padding: 8px 13px; border-radius: var(--radius-pill);
  background: var(--label-bg); color: var(--label-text);
  border: 1px solid var(--label-border);
  font-weight: 900; margin-bottom: 10px; letter-spacing: .02em;
}
.section-head h2 {
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 900;
  color: var(--yellow-100);
}

/* ─── Stack ─── */
#stack {
  position: relative;
}
#stack::before {
  width: clamp(220px, 28vw, 440px);
  height: clamp(120px, 13vw, 210px);
  right: clamp(10px, 4vw, 80px);
  top: 8px;
  border-radius: 50%;
  opacity: .20;
  background:
    radial-gradient(circle at 18% 38%, var(--star-color) 0 2px, transparent 3px),
    radial-gradient(circle at 46% 22%, var(--star-color-2) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 72% 54%, var(--star-color) 0 2px, transparent 3px),
    radial-gradient(ellipse at center, rgba(255,248,200,0.13), transparent 62%);
  filter: blur(.2px);
}
body.theme-light #stack::before {
  opacity: .34;
  background:
    radial-gradient(circle at 18% 38%, rgba(42,68,112,.34) 0 2px, transparent 3px),
    radial-gradient(circle at 46% 22%, rgba(218,174,72,.48) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 72% 54%, rgba(42,68,112,.30) 0 2px, transparent 3px),
    radial-gradient(ellipse at center, rgba(255,218,130,0.20), transparent 62%);
}
.stack-board {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  position: relative;
}
.stack-group {
  grid-column: span 4;
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius);
}
.stack-group::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 38%, rgba(255,248,200,0.12), transparent 2px),
    radial-gradient(circle at 64% 60%, rgba(151,189,255,0.12), transparent 2px),
    radial-gradient(circle, rgba(255,248,200,0.06), transparent 64%);
  opacity: .68;
  pointer-events: none;
}
body.theme-light .stack-group::after {
  background:
    radial-gradient(circle at 35% 38%, rgba(218,174,72,0.18), transparent 2px),
    radial-gradient(circle at 64% 60%, rgba(58,86,132,0.14), transparent 2px),
    radial-gradient(circle, rgba(255,224,145,0.16), transparent 64%);
}
.stack-group:first-child,
.stack-group:nth-child(2) {
  grid-column: span 6;
}
.stack-group h3 {
  position: relative;
  z-index: 1;
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  color: var(--yellow-100);
  font-size: 1.34rem;
  font-weight: 850;
  margin-bottom: 16px;
}
.tech-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tech-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--chip-line);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.tech-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255,238,160,0.18));
}

/* ─── Projects ─── */
.project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.project-card {
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
}
.project-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: clamp(84px, 12vw, 148px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,248,200,0.11), transparent 58%),
    radial-gradient(circle at 68% 36%, rgba(150,180,255,0.08), transparent 48%);
  opacity: .55;
  pointer-events: none;
}
.project-card.featured {
  background: var(--surface);
}
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.badge {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: var(--label-bg);
  border: 1px solid var(--label-border);
  color: var(--label-text);
  font-weight: 900;
}
.state {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--label-border);
  font-weight: 900;
}
.state.done    { color: var(--label-text); background: var(--done-bg); }
.state.ongoing { color: var(--ongoing-text); background: var(--ongoing-bg); }
.project-body  { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; position: relative; z-index: 1; }
.project-body h3 {
  font-family: 'Inter', 'Noto Sans KR', sans-serif; font-size: 2.1rem;
  font-weight: 900;
  color: var(--yellow-100); margin-bottom: 10px;
}
.project-body p { color: var(--muted); line-height: 1.88; max-width: 64ch; }
.project-star  { width: 96px; transform: rotate(10deg); flex-shrink: 0;
                 filter: drop-shadow(0 0 14px rgba(255,238,160,0.25)); }
.project-spark { width: 80px; flex-shrink: 0; opacity: .75; }

@media (min-width: 1180px) {
  header {
    padding-top: 18px;
  }
  .wrap {
    width: min(1840px, calc(100% - 36px));
  }
  .site {
    gap: 12px;
  }
  .hero {
    padding-top: 20px;
  }
  .hero-main {
    min-height: clamp(500px, 45vh, 670px);
    grid-template-columns: minmax(0, 1.42fr) minmax(300px, 440px);
    gap: clamp(58px, 8vw, 150px);
  }
  .hero-copy {
    max-width: 72ch;
  }
  .portrait-card {
    min-height: clamp(335px, 23vw, 430px);
  }
  .portrait-frame {
    width: min(88%, 342px);
  }
  .section {
    padding: clamp(36px, 4.4vw, 66px) 0;
  }
  .section-head {
    margin-bottom: 24px;
  }
  .stack-board,
  .project-list,
  .profile-links {
    gap: 18px;
  }
  .project-card {
    min-height: 258px;
    padding: clamp(28px, 2.2vw, 38px);
  }
  .project-body h3 {
    font-size: clamp(2.1rem, 2.5vw, 2.95rem);
  }
}

/* ─── Footer ─── */
footer {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 22px 0 32px;
  color: rgba(253,243,200,0.45);
  font-size: .93rem; font-weight: 700;
}
body.theme-light footer {
  color: rgba(50,63,91,0.72);
  text-shadow: 0 1px 0 rgba(255,255,255,0.72);
}
.footer-star { width: 20px; opacity: .75; filter: drop-shadow(0 0 5px rgba(255,240,170,0.4)); }

/* ─── Reveal ─── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 980px) {
  .hero-main {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 250px);
    min-height: auto;
  }
  .portrait-card { min-height: 250px; }
  .portrait-frame { width: min(86%, 212px); }
  .profile-links { grid-template-columns: 1fr; }
  .project-list { grid-template-columns: 1fr; }
  .stack-group,
  .stack-group:first-child,
  .stack-group:nth-child(2),
  .stack-group:nth-child(3),
  .stack-group:nth-child(4),
  .stack-group:nth-child(5) {
    grid-column: span 12;
  }
}
@media (max-width: 700px) {
  body {
    min-width: 320px;
  }
  header {
    padding: 10px 0 6px;
  }
  .wrap { width: calc(100% - 18px); }
  .nav-shell {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
  }
  .brand {
    font-size: 1rem;
  }
  .nav-right {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
  }
  nav {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 6px;
    min-width: 0;
  }
  nav a {
    padding: 7px 9px;
    font-size: .94rem;
  }
  .nav-actions {
    justify-self: end;
    gap: 1px;
    padding: 3px;
  }
  .icon-action { width: 36px; height: 36px; }
  .site {
    gap: 0;
    padding-bottom: 22px;
  }
  .hero {
    padding-top: 12px;
  }
  .hero-main {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
    min-height: auto;
    border-radius: 24px;
  }
  .hero::before,
  .hero::after,
  #stack::before {
    display: none;
  }
  .hero-content,
  .hero-copy,
  .pill {
    min-width: 0;
    max-width: 100%;
  }
  .pill {
    white-space: normal;
    align-items: flex-start;
    line-height: 1.45;
  }
  .hero-copy {
    overflow-wrap: anywhere;
    word-break: keep-all;
    font-size: 1.02rem;
    line-height: 1.82;
  }
  .portrait-card {
    width: min(100%, 280px);
    justify-self: center;
    min-height: 214px;
    padding: 12px;
  }
  .portrait-card::after {
    bottom: 16px;
    width: min(68%, 150px);
  }
  .portrait-frame { width: min(84%, 178px); }
  .section { padding: 26px 0; }
  .section-head { margin-bottom: 12px; }
  .section-head h2 { font-size: clamp(1.65rem, 9vw, 2.2rem); }
  .profile-links { gap: 10px; }
  .link-card {
    min-height: 88px;
    padding: 16px;
    gap: 12px;
    border-radius: var(--radius);
  }
  .link-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); }
  .link-text small { font-size: .86rem; }
  .stack-board {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 12px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .stack-board::-webkit-scrollbar { height: 0; }
  .stack-group {
    flex: 0 0 min(82vw, 320px);
    grid-column: auto;
    padding: 14px;
    border-radius: var(--radius);
    scroll-snap-align: start;
  }
  .hero-content { gap: 12px; }
  h1 {
    margin: 0;
    font-size: clamp(2.7rem, 15vw, 3.65rem);
  }
  h1 .name-row {
    gap: 8px;
    align-items: baseline;
  }
  .latin-name { font-size: 1.02rem; }
  .stack-group h3 { font-size: .98rem; margin-bottom: 8px; }
  .tech-list { gap: 6px; }
  .tech-chip { min-height: 28px; padding: 4px 8px; font-size: .76rem; gap: 6px; }
  .tech-chip img { width: 14px; height: 14px; }
  .project-list {
    gap: 12px;
  }
  .project-card {
    min-height: 0;
    padding: 18px;
  }
  .project-card::after {
    right: 10px;
    bottom: 8px;
    width: 92px;
    opacity: .38;
  }
  .project-top {
    margin-bottom: 12px;
  }
  .project-body {
    flex-direction: column;
    gap: 0;
  }
  .project-body h3 {
    font-size: clamp(1.62rem, 8vw, 2rem);
    margin-bottom: 8px;
  }
  .project-body p {
    line-height: 1.74;
  }
  .project-star, .project-spark {
    display: none;
  }
}

@media (max-width: 420px) {
  html {
    scroll-padding-top: 128px;
  }
  .nav-shell {
    padding: 13px;
  }
  .nav-right {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }
  nav {
    gap: 3px;
  }
  nav a {
    padding: 6px 6px;
    font-size: .86rem;
  }
  .nav-actions {
    justify-self: end;
  }
  .icon-action {
    width: 32px;
    height: 32px;
  }
  .icon-action img {
    width: 17px;
    height: 17px;
  }
  .theme-icon {
    font-size: .98rem;
  }
  .hero-main {
    padding: 20px;
  }
  .pill {
    font-size: .94rem;
  }
  .portrait-card {
    width: min(100%, 270px);
  }
  .link-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .link-arrow {
    display: none;
  }
}

/* ─── Mobile dedicated layout ─── */
@media (max-width: 700px) {
  html {
    scroll-padding-top: 116px;
  }
  body {
    min-width: 320px;
    background-attachment: fixed;
  }
  body::before {
    opacity: .18;
    background-size: 78px 78px, 116px 116px;
  }
  body::after {
    opacity: .13;
  }
  body.theme-light::before {
    opacity: .30;
  }
  header {
    padding: 8px 0 5px;
  }
  .wrap {
    width: min(100% - 18px, 430px);
  }
  .nav-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 20px;
  }
  .brand {
    min-width: 0;
    flex: 0 0 auto;
    gap: 7px;
    font-size: .88rem;
  }
  .nav-star {
    width: 22px;
  }
  .nav-right {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
  }
  .nav-actions {
    justify-self: end;
    flex: 0 0 auto;
    padding: 2px;
    gap: 1px;
    border-radius: 15px;
  }
  .icon-action {
    width: 31px;
    height: 31px;
  }
  .icon-action img {
    width: 16px;
    height: 16px;
  }
  .theme-icon {
    font-size: .92rem;
  }
  nav {
    width: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  body.theme-light nav {
    background: transparent;
  }
  nav a {
    display: grid;
    place-items: center;
    padding: 7px 5px;
    border-radius: 999px;
    font-size: .76rem;
    line-height: 1;
  }
  .site {
    gap: 18px;
    padding-bottom: 24px;
  }
  .hero {
    padding-top: 10px;
  }
  .hero::before,
  .hero::after,
  #stack::before {
    display: none;
  }
  .hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(96px, 29vw, 126px);
    grid-template-areas:
      "title portrait"
      "pill pill"
      "copy copy";
    align-items: center;
    gap: 13px 14px;
    min-height: 0;
    padding: clamp(17px, 5vw, 22px);
    border-radius: 26px;
    overflow: hidden;
  }
  .hero-main::after {
    width: 230px;
    right: -110px;
    top: -80px;
    opacity: .9;
  }
  .hero-main::before {
    display: none;
  }
  .hero-deco .hs1 {
    width: 68px;
    top: 26px;
    right: 78px;
    opacity: .28;
  }
  .hero-deco .hs2,
  .hero-deco .hsp1,
  .hero-deco .hsp2 {
    display: none;
  }
  .hero-content {
    display: contents;
  }
  .hero-content h1 {
    grid-area: title;
    margin: 0;
    min-width: 0;
  }
  h1 .name-row {
    display: grid;
    gap: 2px;
    align-items: start;
  }
  .name-ko {
    font-size: clamp(2.75rem, 14vw, 3.55rem);
    line-height: .92;
    letter-spacing: -.08em;
  }
  .latin-name {
    font-size: clamp(.92rem, 3.8vw, 1.04rem);
    line-height: 1.1;
    margin-left: 3px;
  }
  .pill {
    grid-area: pill;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 10px 13px;
    border-radius: 18px;
    white-space: normal;
    font-size: .88rem;
    line-height: 1.58;
    word-break: keep-all;
  }
  .hero-copy {
    grid-area: copy;
    width: 100%;
    max-width: none;
    font-size: .94rem;
    line-height: 1.92;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .portrait-card {
    grid-area: portrait;
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
    justify-self: end;
    padding: 0;
    border-radius: 22px;
    background:
      radial-gradient(circle at 50% 15%, rgba(255,248,200,0.08), transparent 44%),
      var(--surface-3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 14px 30px rgba(0,0,0,0.14);
  }
  body.theme-light .portrait-card {
    background:
      radial-gradient(circle at 50% 12%, rgba(255,225,150,0.20), transparent 42%),
      rgba(236,246,255,0.78);
  }
  .portrait-card::after {
    display: none;
  }
  .portrait-frame {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
  }
  .portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
  }
  .section {
    padding: 12px 0 24px;
  }
  .section-head {
    margin-bottom: 12px;
  }
  .section-kicker {
    padding: 7px 11px;
    margin-bottom: 8px;
    font-size: .84rem;
  }
  .section-head h2 {
    font-size: clamp(2rem, 10vw, 2.7rem);
    line-height: .98;
    letter-spacing: -.055em;
  }
  .stack-board {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 1px 2px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .stack-board::-webkit-scrollbar {
    height: 0;
  }
  .stack-group {
    flex: 0 0 min(78vw, 292px);
    padding: 15px;
    border-radius: 22px;
    scroll-snap-align: start;
  }
  .stack-group::after {
    width: 58px;
    height: 58px;
    right: 12px;
    top: 12px;
    opacity: .46;
  }
  .stack-group h3 {
    font-size: .98rem;
    line-height: 1.18;
    margin-bottom: 11px;
  }
  .tech-list {
    gap: 7px;
  }
  .tech-chip {
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 10px;
    font-size: .78rem;
    gap: 7px;
  }
  .tech-chip img {
    width: 15px;
    height: 15px;
  }
  .project-list {
    gap: 12px;
  }
  .project-card {
    min-height: 0;
    padding: 18px;
    border-radius: 22px;
  }
  .project-top {
    margin-bottom: 13px;
  }
  .badge,
  .state {
    padding: 7px 11px;
    font-size: .88rem;
  }
  .project-body {
    flex-direction: column;
    gap: 0;
  }
  .project-body h3 {
    font-size: clamp(1.8rem, 8vw, 2.25rem);
    margin-bottom: 8px;
  }
  .project-body p {
    font-size: .94rem;
    line-height: 1.88;
    max-width: none;
  }
  .project-star,
  .project-spark {
    display: none;
  }
  .profile-links {
    gap: 10px;
    position: relative;
  }
  .link-card {
    min-height: 82px;
    padding: 15px;
    gap: 12px;
    border-radius: 22px;
  }
  .contact-section .section-head::after {
    width: 44%;
    bottom: 5px;
  }
  .link-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }
  .link-text strong {
    font-size: 1.05rem;
  }
  .link-text small {
    font-size: .84rem;
    line-height: 1.6;
  }
  .link-arrow {
    display: none;
  }
}

@media (max-width: 360px) {
  .wrap {
    width: calc(100% - 14px);
  }
  .hero-main {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 12px;
    padding: 16px;
  }
  .name-ko {
    font-size: clamp(2.45rem, 13vw, 3rem);
  }
  .latin-name {
    font-size: .86rem;
  }
  .pill,
  .hero-copy {
    font-size: .9rem;
  }
  nav a {
    font-size: .7rem;
    padding: 6px 4px;
  }
  .brand {
    font-size: .82rem;
    gap: 5px;
  }
  .nav-star {
    width: 20px;
  }
  .nav-right {
    gap: 4px;
  }
  .icon-action {
    width: 29px;
    height: 29px;
  }
  .icon-action img {
    width: 15px;
    height: 15px;
  }
}
