/* Firefly-inspired UI, MIT notice: assets/firefly-license.txt */
:root {
  --paper: #fafaf8;
  --ink: #242d38;
  --muted: #435266;
  --blue: #4c6c99;
  --selected: rgba(76, 108, 153, 0.14);
  --ff-primary: #4c6c99;
  --ff-primary-hover: #3b5780;
  --ff-tonal: rgba(255, 255, 255, 0.06);
  --ff-tonal-hover: rgba(255, 255, 255, 0.14);
  --ff-tonal-active: rgba(76, 108, 153, 0.10);
  --ff-border: rgba(255, 255, 255, 0.32);
  --glass-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.025) 48%, rgba(255, 255, 255, 0.06));
  --glass-sheen: linear-gradient(45deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.15) 22%, transparent 40%, transparent 60%, rgba(255, 255, 255, 0.80) 82%, rgba(255, 255, 255, 1));
  --glass-shadow: 0 8px 24px rgba(31, 47, 63, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.80), inset 0 -1px 1px rgba(36, 45, 56, 0.12);
  --glass-filter: blur(2px) saturate(115%) brightness(1.02);
  --glass-text-shadow: 0 1px 1px rgba(255, 255, 255, 0.96), 0 0 3px rgba(255, 255, 255, 0.82);
  --radius-card: 24px;
  --radius-btn: 16px;
  --radius-pill: 9999px;
  --serif: Georgia, 'Times New Roman', serif;
  --cjk-serif: 'Songti SC', 'STSong', 'SimSun', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
}
button, a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1, h2, p {
  margin: 0;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
main:focus, section:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}

.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background: var(--paper);
}
.wallpaper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.wallpaper:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(250, 250, 248, .98) 0, rgba(250, 250, 248, .93) 14px, rgba(250, 250, 248, .1) 46px, transparent 70px, transparent calc(100% - 22px), rgba(250, 250, 248, .96) 100%);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: max(15px, env(safe-area-inset-left, 0px));
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  transform: translateY(calc(-100% - 20px - env(safe-area-inset-top, 0px)));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 44px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 4px;
  border-radius: var(--radius-btn);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.2px;
  transition: color 180ms ease;
  flex-shrink: 1;
  min-width: 0;
}
.brand:hover {
  color: var(--blue);
}
.brand-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: block;
  flex-shrink: 0;
}
.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--glass-surface);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  flex-shrink: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease;
}
.nav-link:hover {
  color: var(--blue);
  background: var(--ff-tonal-hover);
}
.nav-link:active {
  background: var(--selected);
  color: var(--ff-primary-hover);
}

.card-base, .glass {
  position: relative;
  background: var(--glass-surface);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
}

.card-base, .glass, .nav-pill, .brand {
  text-shadow: var(--glass-text-shadow);
}

@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .card-base::before, .glass::before, .nav-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 1px;
    border-radius: inherit;
    background: var(--glass-sheen);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
  }
}

.contact-icon, .copy-button svg {
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.95));
}

.profile-card {
  padding: 28px 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.author-name, .hero-copy h1 {
  font-family: var(--cjk-serif);
  font-size: clamp(34px, 9.6vw, 44px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.english-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 4.6vw, 19px);
  line-height: 1.35;
  color: var(--muted);
  letter-spacing: -0.2px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.theme-pill {
  width: 20px;
  height: 4px;
  background: var(--blue);
  border-radius: 2px;
  margin: 14px auto 0;
}
.profile-quote {
  margin-top: 20px;
  width: 100%;
}
.motto-text, .motto {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.09em;
  color: var(--ink);
  text-align: center;
}
.motto {
  margin-top: 18px;
}
.profile-tags, .interests {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag-chip, .interests span {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--ff-tonal);
  border: 1px solid var(--ff-border);
  border-radius: var(--radius-pill);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.contact-panel {
  margin-top: 14px;
  padding: 20px 18px 14px;
}
.contact-title, .contact-panel h2 {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 12px;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-content: center;
  align-items: center;
  min-height: 72px;
  padding: 10px 14px;
  font-size: 16px;
  line-height: 1.5;
  border-radius: var(--radius-btn);
  background: var(--ff-tonal);
  border: 1px solid var(--ff-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), inset 0 -1px 0 rgba(36, 45, 56, 0.04);
}
.contact-label {
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.contact-value {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: normal;
}
.contact-icon {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 20px;
  height: 20px;
  justify-self: center;
  color: var(--blue);
  transition: transform 180ms ease, color 180ms ease;
}
a.contact-row {
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
a.contact-row:active {
  background: var(--selected);
  transform: scale(0.99);
}
div.whatsapp-contact {
  cursor: default;
}
.copy-button {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--blue);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.copy-button svg {
  width: 18px;
  height: 18px;
}
.copy-button:disabled {
  cursor: default;
  opacity: 0.6;
}
.copy-button:active:not(:disabled) {
  background: var(--selected);
  transform: scale(0.92);
}
.contact-status {
  min-height: 1.7em;
  margin-top: 8px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  a.contact-row:hover {
    background: var(--ff-tonal-hover);
    border-color: rgba(76, 108, 153, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 108, 153, 0.08);
  }
  a.contact-row:hover .contact-icon {
    transform: translate(2px, -2px);
    color: var(--ff-primary-hover);
  }
  .copy-button:hover:not(:disabled) {
    background: var(--selected);
    color: var(--ff-primary-hover);
  }
}

@media (max-width: 374px) {
  .site-shell {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .contact-panel {
    padding: 16px 12px 10px;
  }
  .contact-row {
    padding: 8px 10px;
  }
  .author-name, .hero-copy h1 {
    font-size: clamp(30px, 9.5vw, 36px);
  }
  .motto-text, .motto {
    font-size: 15px;
  }
}

@media (max-width: 320px) {
  .site-header {
    gap: 4px;
  }
  .brand {
    font-size: 13px;
    gap: 6px;
    padding: 0 2px;
  }
  .brand-icon {
    width: 20px;
    height: 20px;
  }
  .nav-pill {
    padding: 2px;
  }
  .nav-link {
    padding: 0 8px;
    font-size: 12px;
  }
}

@media (min-width: 1024px) {
  .wallpaper img {
    position: absolute;
    right: 0;
    top: 0;
    width: 59%;
    height: 100%;
    object-fit: cover;
    object-position: 55% 40%;
  }
  .wallpaper:after {
    background: linear-gradient(90deg, var(--paper) 0%, rgba(250, 250, 248, .95) 35%, rgba(250, 250, 248, .4) 58%, transparent 75%), linear-gradient(to bottom, rgba(250, 250, 248, .96) 0, transparent 70px, transparent calc(100% - 35px), rgba(250, 250, 248, .97) 100%);
  }
  .site-shell {
    max-width: 1160px;
    padding: calc(24px + env(safe-area-inset-top, 0px)) max(48px, env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) max(48px, env(safe-area-inset-left, 0px));
  }
  .site-header {
    max-width: 440px;
    margin-bottom: 20px;
  }
  main#content, .home-view {
    max-width: 440px;
    padding-top: 36px;
    padding-top: calc(clamp(32px, 5svh, 56px) + env(safe-area-inset-top, 0px));
  }
  .profile-card {
    padding: 32px 24px 28px;
  }
  .author-name, .hero-copy h1 {
    font-size: 44px;
  }
  .english-name {
    font-size: 20px;
  }
  .motto-text, .motto {
    font-size: 17px;
  }
  .contact-panel {
    margin-top: 20px;
    padding: 22px 20px 16px;
  }
  .contact-row {
    grid-template-columns: 68px minmax(0, 1fr) 44px;
    grid-template-rows: auto;
    column-gap: 10px;
    row-gap: 0;
    min-height: 56px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .contact-label {
    grid-column: 1;
    grid-row: 1;
  }
  .contact-value {
    grid-column: 2;
    grid-row: 1;
    font-size: 14px;
  }
  .contact-icon, .copy-button {
    grid-column: 3;
    grid-row: 1;
  }
}

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

@media (prefers-reduced-transparency: reduce) {
  .card-base, .glass, .nav-pill {
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .contact-row {
    background: rgba(255, 255, 255, 0.72);
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card-base, .glass, .nav-pill {
    background: rgba(255, 255, 255, 0.96);
  }
}
