@import url("/fonts/pretendard/pretendard-subset.css");

:root {
  color-scheme: light dark;
  --bg-1: #8fa6b8;
  --bg-2: #56708a;
  --bg-3: #2b3d52;
  --bg-gradient: radial-gradient(120% 80% at 50% 0%, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  --noise-opacity: 0.3;
  --card: #ffffff;
  --text: #26303a;
  --text-2: #7d8b97;
  --divider: #e6eaee;
  --row-hover: rgba(63, 111, 148, 0.06);
  --accent: #3f6f94;
  --on-accent: #ffffff;
  --track: #e3e9ef;
  --focus: #3f6f94;
  --danger: #b23b3b;
  --warning: #9a6a12;
  --success: #2f7a4f;
  --nav-icon: rgba(255, 255, 255, 0.75);
  --nav-icon-active: #ffffff;
  --on-bg-text: rgba(255, 255, 255, 0.78);
  --radius-card: 4px;
  --radius-control: 4px;
  --shadow-card: 0 2px 14px rgba(10, 20, 30, 0.14);
  --overlay: rgba(10, 20, 30, 0.55);
  --font: "Pretendard", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --dur-slide: 320ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #4f6475;
    --bg-2: #2f4153;
    --bg-3: #16212d;
    --card: #1d2530;
    --text: #e4e9ee;
    --text-2: #95a3b0;
    --divider: #313c48;
    --row-hover: rgba(228, 233, 238, 0.05);
    --accent: #e4e9ee;
    --on-accent: #1d2530;
    --track: #2c3744;
    --focus: #e4e9ee;
    --danger: #f08a84;
    --warning: #e6b85c;
    --success: #7fc79a;
    --shadow-card: 0 2px 14px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-3); }
body {
  min-height: 100vh;
  margin: 0;
  padding: 36px 16px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-gradient);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
  background-image: url("/noise.svg");
}
a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.16em; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.nav {
  min-height: 44px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 28px;
  view-transition-name: navigation;
}
.nav a {
  width: 44px;
  height: 44px;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--nav-icon);
  text-decoration: none;
  transition: color 150ms ease;
}
.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] { color: var(--nav-icon-active); }
.nav a:focus-visible { outline-color: #fff; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav a::before {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  padding: 3px 7px;
  border-radius: var(--radius-control);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-card);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 3px);
  transition: opacity 150ms ease, transform 150ms ease;
}
.nav a:hover::before,
.nav a:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
.nav a[aria-current="page"]::after,
body:not(:has(.panel:target)) .nav a[href="#home"]::after,
body:has(#home:target) .nav a[href="#home"]::after,
body:has(#hermes:target) .nav a[href="#hermes"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: var(--card);
}

.card {
  width: 100%;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  view-transition-name: card;
}
.card--namecard { max-width: 400px; }
.card--public { max-width: 760px; padding: 40px; overflow: visible; }
.panel { display: none; }
#home { display: flex; }
main:has(.panel:target) #home:not(:target) { display: none; }
.panel:target { display: block; animation: slide-in var(--dur-slide) var(--ease); }
.panel--home {
  aspect-ratio: 9 / 5;
  padding: 24px 28px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
}
.logo { display: block; }
.identity { margin-top: auto; }
.name { margin: 0; font-size: 26px; font-weight: 300; line-height: 1.2; }
.subtitle { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.next {
  width: 40px;
  height: 40px;
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--card);
  text-decoration: none;
}
.next svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.panel--hermes { padding: 24px 28px; font-size: 13px; line-height: 1.65; }
.panel--hermes h2 { margin: 0 0 1em; font-size: 16px; font-weight: 500; }
.panel--hermes p { margin: 0 0 1em; }
.panel--hermes ul { margin: -0.5em 0 1em; padding-left: 1.35em; }
.card--not-found {
  aspect-ratio: 9 / 5;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card--not-found h1 { margin: 0; font-size: 24px; font-weight: 300; }
.card--not-found p { margin: 0.5em 0 0; }
.prose h1 { margin: 0 0 0.75em; font-size: 24px; font-weight: 300; line-height: 1.3; }
.prose h2 { margin: 2em 0 0.6em; font-size: 17px; font-weight: 500; line-height: 1.4; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1em; padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose code { font-family: var(--font-mono); font-size: 0.88em; overflow-wrap: anywhere; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.5; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: top; }
th { color: var(--text-2); font-weight: 500; }
.foot { margin-top: 20px; color: var(--on-bg-text); font-size: 12px; view-transition-name: footer; }
.foot a { color: inherit; }

@keyframes slide-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@view-transition { navigation: auto; }
::view-transition-old(card) { animation: slide-out-left var(--dur-slide) var(--ease) both; }
::view-transition-new(card) { animation: slide-in-right var(--dur-slide) var(--ease) both; }
@keyframes slide-out-left { to { opacity: 0; transform: translateX(-40px); } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(40px); } }

@media (max-width: 599px) {
  body { padding: 24px 16px; justify-content: flex-start; }
  .nav { gap: 18px; margin-top: 12px; margin-bottom: 28px; }
  .nav a[aria-current="page"]::before,
  body:not(:has(.panel:target)) .nav a[href="#home"]::before,
  body:has(#home:target) .nav a[href="#home"]::before,
  body:has(#hermes:target) .nav a[href="#hermes"]::before {
    content: attr(data-mobile-label);
    top: 100%;
    bottom: auto;
    background: transparent;
    color: var(--on-bg-text);
    box-shadow: none;
    opacity: 1;
    transform: translateX(-50%);
  }
  .card--public { padding: 20px; }
  .panel--home, .card--not-found { padding: 20px 22px; }
  .panel--hermes { padding: 22px; }
  .name { font-size: 24px; }
  table { min-width: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
