:root {
  --bg: #f4eee5;
  --bg-glow: #fbe3d6;
  --card: #fffcf7;
  --face: #fffaf2;
  --ink: #221d18;
  --muted: #7a7065;
  --line: rgba(34, 29, 24, .09);
  --dot: rgba(34, 29, 24, .085);
  --shadow: rgba(60, 35, 20, .35);
  --accent: #d9443a;
  --blush: #f6b4a6;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110e;
    --bg-glow: #2a1813;
    --card: #1e1a16;
    --face: #f4ece1;
    --ink: #f3ece2;
    --muted: #a39889;
    --line: rgba(243, 236, 226, .09);
    --dot: rgba(243, 236, 226, .06);
    --shadow: rgba(0, 0, 0, .7);
    --accent: #ff6b5e;
    --blush: #f3a596;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
:lang(ja) body, body:lang(ja) { font-family: "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", "Meiryo", "Pretendard Variable", system-ui, sans-serif; }

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 45% at 50% 0%, var(--bg-glow), transparent 70%),
    radial-gradient(circle, var(--dot) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(#000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(#000 0%, #000 55%, transparent 100%);
}

.wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

/* ---------- language switch ---------- */
.lang {
  position: relative;
  align-self: flex-end;
  display: inline-flex;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 18px -14px var(--shadow);
}
.lang button {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .25s;
}
.lang button[aria-pressed="true"] { color: var(--card); }
.lang button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--ink);
  transition: transform .5s var(--spring), width .5s var(--spring);
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 0 32px;
}
.name {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -.025em;
  font-variation-settings: "opsz" 144;
}
.name em { font-style: italic; padding-left: .02em; }

/* ---------- link groups ---------- */
.group + .group { margin-top: 26px; }
.label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links li { position: relative; }

.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 11px 16px 11px 12px;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 0 var(--line), 0 10px 26px -20px var(--shadow);
  transition: transform .45s var(--spring), box-shadow .35s var(--out), border-color .3s;
}
.link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
  box-shadow: 0 1px 0 var(--line), 0 16px 30px -18px var(--shadow);
}
.link:active { transform: scale(.975); transition-duration: .12s; }
.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand, var(--ink));
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
  transition: transform .5s var(--spring);
}
.link:hover .ico { transform: rotate(-6deg) scale(1.06); }
.ico svg { width: 20px; height: 20px; fill: currentColor; }
.ico svg.stroke { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; width: 23px; height: 23px; }
.ico svg.stroke .fill { fill: currentColor; stroke: none; }
.ico-x { background: var(--ink); color: var(--card); }
.ico-img { overflow: hidden; background: none; box-shadow: inset 0 0 0 1px var(--line); }
.ico-img img { display: block; width: 100%; height: 100%; object-fit: cover; }

.txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.t { font-size: 15.5px; font-weight: 650; letter-spacing: -.005em; }
.s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .45s var(--spring), stroke .25s;
}
.link:hover .arrow { transform: translate(2px, -2px); stroke: var(--accent); }

/* email rows: copy button on the right */
.mail .link { padding-right: 84px; }
.copy {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 12px;
  height: 34px;
  margin: auto 0;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .4s var(--spring), background .2s, color .2s;
}
.copy:hover { background: var(--ink); color: var(--card); }
.copy:active { transform: scale(.92); transition-duration: .1s; }
.copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .03em;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px) scale(.9);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--card);
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 14px 30px -14px var(--shadow);
  transition: transform .5s var(--spring), opacity .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- entrance ---------- */
.reveal { animation: rise .8s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 55ms + 60ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* 언어 바뀔 때 글자 살짝 튀기 */
.swap { animation: swap .45s var(--spring); }
@keyframes swap {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 600px) {
  .hero { padding: 64px 0 44px; }
  .name { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
