/*
 * Noto Sans KR, self-hosted and subset to the characters actually used on
 * this page (see /public/fonts). Regenerate with pyftsubset if new text is
 * added and glyphs render with the system fallback font instead.
 */
@font-face {
  font-family: "Noto Sans KR";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/noto-sans-kr-400.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans KR";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/noto-sans-kr-500.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans KR";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/noto-sans-kr-700.woff2") format("woff2");
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  color-scheme: light;
  --bg: #f3eaff;
  --bg-deep: #e8dcf7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --ink: #55505f;
  --muted: #8e898f;
  --accent: #8e6cb7;
  --accent-deep: #6e4c98;
  --accent-soft: #efe7f8;
  --grape-gradient: linear-gradient(
    135deg,
    #65418f 0%,
    #9165b9 50%,
    #c19bdd 100%
  );
  --line: rgba(126, 99, 157, 0.14);
  --shadow:
    0 18px 50px rgba(99, 73, 131, 0.12), 0 3px 12px rgba(99, 73, 131, 0.06);
  --page-radial: rgba(255, 255, 255, 0.92);
  --page-start: #f7f0ff;
  --page-end: #eee3fb;
  --glow-top: rgba(225, 205, 250, 0.95);
  --glow-bottom: rgba(215, 196, 244, 0.9);
  --control-bg: rgba(255, 255, 255, 0.72);
  --control-border: rgba(255, 255, 255, 0.9);
  --control-hover: #ffffff;
  --control-shadow: rgba(91, 65, 122, 0.09);
  --control-shadow-hover: rgba(91, 65, 122, 0.14);
  --surface-border: rgba(255, 255, 255, 0.92);
  --avatar-ring: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98),
    rgba(224, 207, 246, 0.85)
  );
  --avatar-shadow: rgba(92, 62, 125, 0.2);
  --avatar-shadow-hover: rgba(92, 62, 125, 0.26);
  --social-bg: rgba(255, 255, 255, 0.62);
  --tag-ink: #716778;
  --tag-border: rgba(139, 101, 178, 0.08);
  --tag-hover: #e5d7f3;
  --notice-surface: rgba(255, 254, 255, 0.91);
  --notice-ink: #706975;
  --footer-ink: #9b8fa3;
  --dialog-surface: rgba(255, 255, 255, 0.94);
  --dialog-border: rgba(255, 255, 255, 0.95);
  --toast-bg: rgba(73, 59, 82, 0.92);
  --toast-ink: #ffffff;
  --radius-lg: 24px;
  --radius-md: 16px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15111c;
  --bg-deep: #21182a;
  --surface: rgba(39, 31, 48, 0.88);
  --surface-solid: #352a40;
  --ink: #e4dce9;
  --muted: #aaa0b2;
  --accent: #c49be3;
  --accent-deep: #d4adef;
  --accent-soft: #332641;
  --grape-gradient: linear-gradient(
    135deg,
    #b785dc 0%,
    #d2a6ec 50%,
    #ebccfa 100%
  );
  --line: rgba(210, 175, 235, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34), 0 3px 12px rgba(0, 0, 0, 0.22);
  --page-radial: rgba(122, 91, 151, 0.18);
  --page-start: #1c1624;
  --page-end: #110e16;
  --glow-top: rgba(115, 78, 145, 0.38);
  --glow-bottom: rgba(91, 62, 121, 0.34);
  --control-bg: rgba(45, 35, 55, 0.78);
  --control-border: rgba(210, 180, 235, 0.12);
  --control-hover: #352a40;
  --control-shadow: rgba(0, 0, 0, 0.25);
  --control-shadow-hover: rgba(0, 0, 0, 0.34);
  --surface-border: rgba(210, 180, 235, 0.1);
  --avatar-ring: linear-gradient(145deg, #4a3858, #2b2135);
  --avatar-shadow: rgba(0, 0, 0, 0.34);
  --avatar-shadow-hover: rgba(0, 0, 0, 0.44);
  --social-bg: rgba(45, 35, 55, 0.72);
  --tag-ink: #d2c5db;
  --tag-border: rgba(210, 175, 235, 0.1);
  --tag-hover: #49365a;
  --notice-surface: rgba(40, 32, 49, 0.92);
  --notice-ink: #d0c5d6;
  --footer-ink: #9f92a8;
  --dialog-surface: rgba(40, 32, 49, 0.96);
  --dialog-border: rgba(210, 180, 235, 0.12);
  --toast-bg: rgba(235, 222, 243, 0.94);
  --toast-ink: #302638;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #15111c;
    --bg-deep: #21182a;
    --surface: rgba(39, 31, 48, 0.88);
    --surface-solid: #352a40;
    --ink: #e4dce9;
    --muted: #aaa0b2;
    --accent: #c49be3;
    --accent-deep: #d4adef;
    --accent-soft: #332641;
    --grape-gradient: linear-gradient(
      135deg,
      #b785dc 0%,
      #d2a6ec 50%,
      #ebccfa 100%
    );
    --line: rgba(210, 175, 235, 0.18);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.34), 0 3px 12px rgba(0, 0, 0, 0.22);
    --page-radial: rgba(122, 91, 151, 0.18);
    --page-start: #1c1624;
    --page-end: #110e16;
    --glow-top: rgba(115, 78, 145, 0.38);
    --glow-bottom: rgba(91, 62, 121, 0.34);
    --control-bg: rgba(45, 35, 55, 0.78);
    --control-border: rgba(210, 180, 235, 0.12);
    --control-hover: #352a40;
    --control-shadow: rgba(0, 0, 0, 0.25);
    --control-shadow-hover: rgba(0, 0, 0, 0.34);
    --surface-border: rgba(210, 180, 235, 0.1);
    --avatar-ring: linear-gradient(145deg, #4a3858, #2b2135);
    --avatar-shadow: rgba(0, 0, 0, 0.34);
    --avatar-shadow-hover: rgba(0, 0, 0, 0.44);
    --social-bg: rgba(45, 35, 55, 0.72);
    --tag-ink: #d2c5db;
    --tag-border: rgba(210, 175, 235, 0.1);
    --tag-hover: #49365a;
    --notice-surface: rgba(40, 32, 49, 0.92);
    --notice-ink: #d0c5d6;
    --footer-ink: #9f92a8;
    --dialog-surface: rgba(40, 32, 49, 0.96);
    --dialog-border: rgba(210, 180, 235, 0.12);
    --toast-bg: rgba(235, 222, 243, 0.94);
    --toast-ink: #302638;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    "Noto Sans KR",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

img,
svg {
  display: block;
}

.background {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, var(--page-radial), transparent 36rem),
    linear-gradient(
      180deg,
      var(--page-start) 0%,
      var(--bg) 45%,
      var(--page-end) 100%
    );
}

.glow {
  position: absolute;
  width: 23rem;
  height: 23rem;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.55;
}

.glow--top {
  top: -9rem;
  left: calc(50% - 26rem);
  background: radial-gradient(circle, var(--glow-top), transparent 68%);
}

.glow--bottom {
  right: calc(50% - 29rem);
  bottom: -10rem;
  background: radial-gradient(circle, var(--glow-bottom), transparent 68%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  pointer-events: none;
}

.page-shell {
  width: min(100% - 32px, 480px);
  margin: 0 auto;
  padding: 18px 0 52px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.wordmark {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.wordmark span:last-child,
.profile h1,
.card h2,
.footer-mark {
  color: var(--accent-deep);
  background: var(--grape-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: var(--control-bg);
  border: 1px solid var(--control-border);
  border-radius: 999px;
  box-shadow: 0 6px 20px var(--control-shadow);
  cursor: pointer;
  place-items: center;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.icon-button:hover {
  background: var(--control-hover);
  box-shadow: 0 8px 24px var(--control-shadow-hover);
  transform: translateY(-2px);
}

.icon-button:focus-visible,
.avatar-button:focus-visible,
.social-link:focus-visible,
.wordmark:focus-visible,
.tag-link a:focus-visible,
.heading-link:focus-visible {
  outline: 3px solid rgba(142, 108, 183, 0.35);
  outline-offset: 3px;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-button [hidden] {
  display: none;
}

.icon-button--small {
  width: 36px;
  height: 36px;
  box-shadow: none;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 32px;
  text-align: center;
}

.avatar-button {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: zoom-in;
}

.avatar-ring {
  position: relative;
  display: block;
  width: 122px;
  height: 122px;
  padding: 5px;
  background: var(--avatar-ring);
  border-radius: 50%;
  box-shadow: 0 16px 38px var(--avatar-shadow);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.avatar-button:hover .avatar-ring {
  box-shadow: 0 20px 44px var(--avatar-shadow-hover);
  transform: translateY(-3px) rotate(-1deg);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile h1 {
  margin: 22px 0 2px;
  color: var(--accent-deep);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: normal;
}

.ornament {
  width: 240px;
  height: 28px;
  margin: 9px 0 2px;
  background-image: url("ornament-1x.png");
  background-image: -webkit-image-set(
    url("ornament-1x.png") 1x,
    url("ornament-2x.png") 2x,
    url("ornament-3x.png") 3x
  );
  background-image: image-set(
    url("ornament-1x.png") 1x,
    url("ornament-2x.png") 2x,
    url("ornament-3x.png") 3x
  );
  background-repeat: no-repeat;
  background-position: center;
  background-size: 240px 28px;
}

.intro {
  margin: 5px 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.035em;
}

.intro span {
  margin: 0 4px;
  color: #ba9ed8;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 14px;
  background: var(--social-bg);
  border: 1px solid var(--control-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.social-link:hover {
  background: var(--control-hover);
  transform: translateY(-2px);
}

.social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.social-link .external-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  opacity: 0.6;
}

.cards {
  display: grid;
  gap: 15px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.card::before {
  position: absolute;
  top: 0;
  left: 26px;
  width: 46px;
  height: 3px;
  background: linear-gradient(90deg, #a67bd1, #d9c3ee);
  border-radius: 0 0 4px 4px;
  content: "";
}

.card-heading {
  margin-bottom: 17px;
}

.card h2 {
  margin: 0;
  color: var(--accent-deep);
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.heading-link {
  display: inline-flex;
  align-items: baseline;
  color: inherit;
  text-decoration: none;
}

.heading-link:hover,
.heading-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes card-highlight-flash {
  0%,
  100% {
    box-shadow: var(--shadow);
    background-color: var(--surface);
  }
  20%,
  60% {
    box-shadow:
      0 0 0 3px var(--accent-deep),
      var(--shadow);
    background-color: var(--accent-soft);
  }
}

.card:target {
  animation: card-highlight-flash 1.6s ease-in-out 1;
}

.tag-list,
.notice-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  padding: 7px 11px;
  color: var(--tag-ink);
  background: var(--accent-soft);
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

.tag-list .tag-link {
  padding: 0;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.tag-list .tag-link:hover {
  color: var(--accent-deep);
  background: var(--tag-hover);
  transform: translateY(-1px);
}

.tag-list .tag-link a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: inherit;
}

.tag-list .tag-link .external-icon {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.62;
}

.card--notice {
  background: var(--notice-surface);
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-list li {
  position: relative;
  padding-left: 18px;
  color: var(--notice-ink);
  font-size: 0.82rem;
  line-height: 1.55;
}

.notice-list li::before {
  position: absolute;
  top: 0;
  left: 2px;
  color: #a77bc8;
  font-weight: 700;
  content: "-";
}

.notice-list small {
  color: var(--muted);
  font-size: 0.74rem;
}

.notice-divider {
  height: 1px;
  margin: 19px 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--line) 15%,
    var(--line) 85%,
    transparent
  );
}

.notice-list--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px 0 0;
  color: var(--footer-ink);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.footer p {
  margin: 6px 0 0;
}

.footer-mark {
  color: #aa83cc;
  font-size: 1rem;
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 96px 0;
  text-align: center;
}

.error-page .error-emoji {
  font-size: 3rem;
}

.error-page h1 {
  margin: 0;
  color: var(--accent-deep);
  background: var(--grape-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.6rem;
}

.error-page p {
  margin: 0;
  color: var(--muted);
}

.error-page .home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 20px;
  color: var(--accent-deep);
  background: var(--control-bg);
  border: 1px solid var(--control-border);
  border-radius: 999px;
  box-shadow: 0 6px 20px var(--control-shadow);
  text-decoration: none;
  font-weight: 500;
}

.error-page .home-link:hover {
  background: var(--control-hover);
}

.image-dialog {
  width: min(100% - 40px, 460px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-lg);
  outline: 0;
}

.image-dialog::backdrop {
  background: rgba(57, 45, 67, 0.58);
  backdrop-filter: blur(8px);
}

.image-dialog[open] {
  animation: dialog-in 180ms ease-out both;
}

.dialog-inner {
  padding: 12px;
  background: var(--dialog-surface);
  border: 1px solid var(--dialog-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(35, 22, 46, 0.28);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 10px 10px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 0.9rem;
}

.dialog-inner > img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 17px;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: 24px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  color: var(--toast-ink);
  background: var(--toast-bg);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(55, 39, 69, 0.22);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 640px) {
  .page-shell {
    padding-top: 26px;
    padding-bottom: 70px;
  }

  .profile {
    padding-top: 46px;
    padding-bottom: 38px;
  }

  .card {
    padding: 28px;
  }
}

@media (max-width: 380px) {
  .page-shell {
    width: min(100% - 24px, 480px);
  }

  .card {
    padding: 21px 18px;
  }

  .notice-list--compact {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .wordmark span:last-child,
  .profile h1,
  .card h2,
  .footer-mark {
    color: LinkText;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}
