:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #ffffff;
  --ink: #111111;
  --muted: #575757;
  --line: #dddddd;
  --link: #6d28d9;
  --link-hover: #4c1d95;
  --focus: rgba(109, 40, 217, 0.24);
  --measure: 36rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg), var(--bg-2));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.56;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(var(--measure), calc(100vw - 2rem));
  margin: 0 auto;
  padding: 4.8rem 0 7rem;
}

h1,
p {
  margin-block: 0;
}

h1 {
  margin-bottom: 0.32rem;
  font-size: 1.22rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
}

.subtitle {
  margin-bottom: 1.35rem;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.42;
}

p + p {
  margin-top: 1.05rem;
}

.contact {
  margin-top: 1.35rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.13em;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  border-radius: 0.18rem;
  outline: 2px solid var(--focus);
  outline-offset: 0.16rem;
}

.appearance-control {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 5;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  line-height: 1;
}

.appearance-toggle,
.appearance-panel {
  background: rgba(19, 23, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0.7rem 2rem rgba(0, 0, 0, 0.2), 0 0 0.6rem rgba(255, 255, 255, 0.08) inset;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.appearance-toggle {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.52rem;
  min-width: 3.05rem;
  height: 1.72rem;
  margin-left: auto;
  padding: 0 0.55rem;
  color: inherit;
  border-radius: 999px;
  cursor: pointer;
}

.toggle-chevron {
  font-size: 1rem;
  transform: translateY(-0.02rem);
}

.appearance-control.is-open .toggle-chevron {
  transform: translateY(-0.02rem) rotate(180deg);
}

.toggle-dots {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  gap: 3px;
}

.toggle-dots span {
  width: 4px;
  aspect-ratio: 1;
  background: currentColor;
  border-radius: 999px;
  opacity: 0.82;
}

.appearance-panel {
  width: min(16.5rem, calc(100vw - 2rem));
  margin-bottom: 0.44rem;
  padding: 0.58rem;
  border-radius: 0.72rem;
}

.appearance-panel[hidden] {
  display: none;
}

.appearance-panel__header,
.setting-row {
  display: grid;
  align-items: center;
}

.appearance-panel__header {
  grid-template-columns: 1fr auto;
  margin-bottom: 0.24rem;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 500;
}

.appearance-hint {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  line-height: 1.25;
}

.appearance-panel__actions {
  display: flex;
  align-items: center;
  gap: 0.24rem;
}

.appearance-panel__actions button {
  min-height: 1.2rem;
  padding: 0 0.3rem;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.28rem;
  cursor: pointer;
  font: inherit;
}

.setting-row {
  grid-template-columns: 4.7rem 1.45rem 1fr auto;
  gap: 0.38rem;
  min-height: 1.72rem;
  color: rgba(255, 255, 255, 0.64);
}

.setting-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-row input[type="color"] {
  width: 1.42rem;
  height: 1.42rem;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0.38rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 0 0.5rem rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.setting-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.setting-row input[type="color"]::-webkit-color-swatch {
  border: 0;
}

.setting-row input[type="text"] {
  min-width: 0;
  height: 1.28rem;
  padding: 0 0.34rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.28rem;
  font: 10.5px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.picker-button {
  min-height: 1.28rem;
  padding: 0 0.42rem;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.5), rgba(0, 97, 255, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.32rem;
  cursor: pointer;
  font: 10px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.picker-button:hover,
.picker-button:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.72), rgba(0, 97, 255, 0.48));
}

@media (max-width: 640px) {
  .page {
    width: min(var(--measure), calc(100vw - 1.5rem));
    padding-top: 3rem;
  }

  .appearance-control {
    right: 0.65rem;
    bottom: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
