/* panbu.dev | native CSS, no framework.
   Theme follows the system (light or dark). One accent (purple, Root's own hue).
   Shape rule: surfaces 20px, app icons 22px squircle, buttons and tags fully round. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #eef0f5;
  --card: #fbfbfd;
  --card-2: #e6e8f0;
  --fg: #12141a;
  --muted: #545a68;
  --line: rgb(18 20 26 / 0.1);
  --accent: #6a53cf;       /* fills, white text on top (6:1) */
  --accent-text: #6a53cf;  /* accent used as text or star on the surface */
  --on-accent: #ffffff;
  --radius: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1017;
    --card: #131a24;
    --card-2: #1b2431;
    --fg: #eef0f6;
    --muted: #98a2b3;
    --line: rgb(255 255 255 / 0.08);
    --accent-text: #9c89ec;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--fg);
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Soft top light in the accent hue (background wash, not a glow on elements) */
.glow {
  position: absolute; inset: 0 0 auto 0; height: 560px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, color-mix(in oklab, var(--accent) 26%, transparent), transparent 72%);
}

.page { position: relative; width: 100%; max-width: 1040px; margin-inline: auto; padding: 96px 16px 64px; }

/* Profile */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar {
  width: 104px; height: 104px; border-radius: 30px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(140deg, #8f7bea, #5641b0); color: #fff; font-size: 44px; font-weight: 600;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.name { margin-top: 20px; font-size: 32px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.handle { margin-top: 6px; font-size: 15px; color: var(--muted); }
.bio { margin-top: 14px; max-width: 46ch; font-size: 17px; line-height: 1.6; }
.bio p + p { margin-top: 10px; }
.chips { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px;
  font-size: 13.5px; color: var(--muted); border: 1px solid var(--line); background: var(--card);
}
.chips i { font-size: 16px; color: var(--accent-text); }

/* Two buttons: segmented switch with a sliding thumb */
.switch {
  --pos: 0; position: relative; margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr);
  width: 100%; max-width: 560px; padding: 5px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
}
.switch__thumb {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 999px;
  background: var(--accent); transform: translateX(calc(var(--pos) * 100%));
  transition: transform .5s var(--ease);
}
.switch__btn {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 14px; border: 0; background: none; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--muted); transition: color .3s;
}
.switch__btn i { font-size: 18px; }
.switch__btn:hover { color: var(--fg); }
.switch__btn[aria-selected="true"] { color: var(--on-accent); }
.switch__btn:active { scale: .98; }
@media (max-width: 560px) { .switch__btn { padding: 0 6px; font-size: 13px; } .switch__btn i { display: none; } }

/* Grid */
.panel { margin-top: 48px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.grid--servers { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }

/* Cards */
.card {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .3s;
}
a.card:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
.card__body { padding: 0 20px 22px; }
.card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.desc { margin-top: 10px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* Banner: purple with soft diagonal waves, drawn in CSS */
.banner {
  position: relative; overflow: hidden; background-size: cover; background-position: center;
  background: linear-gradient(135deg, #7660d6, #5641b0);
}
.banner::before, .banner::after {
  content: ""; position: absolute; inset: -20% -10%; background: rgb(30 20 90 / .22);
  clip-path: polygon(0 62%, 22% 44%, 48% 58%, 74% 34%, 100% 48%, 100% 100%, 0 100%);
  transition: transform .8s var(--ease);
}
.banner::after { background: rgb(255 255 255 / .07); clip-path: polygon(0 20%, 30% 34%, 58% 12%, 82% 28%, 100% 10%, 100% 0, 0 0); }
.card:hover .banner::before { transform: translateX(-3%) translateY(-2%); }
.card:hover .banner::after { transform: translateX(3%); }
.banner--img { background-size: cover; background-position: center; }
.banner--img::before, .banner--img::after { display: none; }
.banner--app { height: 148px; }
.banner--server { height: 110px; }

/* Icon overlapping the banner, ringed in the page color */
.icon {
  position: relative; z-index: 1; width: 76px; height: 76px; margin: -38px 0 0 20px; border-radius: 22px;
  display: grid; place-items: center; overflow: hidden; color: #fff; font-size: 34px; font-weight: 700;
  background: linear-gradient(140deg, #8f7bea, #5641b0);
  box-shadow: 0 0 0 5px var(--card);
}
.icon img { width: 100%; height: 100%; object-fit: cover; }
.icon--lg { width: 84px; height: 84px; margin-top: -42px; font-size: 38px; }
.app .card__body { padding-top: 16px; }

/* Ratings */
.meta { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.meta__by { font-size: 14px; color: var(--muted); }
.rating { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.rating b { font-weight: 600; }
.stars { display: inline-flex; gap: 2px; color: var(--accent-text); font-size: 14px; }
.rating--top { color: var(--fg); gap: 5px; }
.rating--top i { color: var(--accent-text); }
.rating--top em { font-style: normal; color: var(--muted); }
.rating--none { color: var(--muted); font-size: 13.5px; }
.rating--none i { color: var(--muted); }

/* Server specifics */
.server__top { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 20px; }
.server .card__body { padding-top: 14px; }
.card h3 + .facts { margin-top: 12px; }
.facts { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--muted); }
.facts span { display: inline-flex; align-items: center; gap: 7px; }
.facts i { font-size: 17px; color: var(--accent-text); }
.tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  color: var(--accent-text); background: color-mix(in oklab, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
}

/* App detail (small dashboard) */
.detail { max-width: 720px; margin-inline: auto; }
.back {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.back:hover { color: var(--fg); background: var(--card); }
.dash { margin-top: 20px; overflow: hidden; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.banner--dash { height: 200px; }
.dash__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 24px; }
.icon--xl { width: 104px; height: 104px; margin: -52px 0 0; font-size: 46px; border-radius: 28px; }
.dash__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 4px; }
.dash__actions .cta { height: 44px; padding: 0 20px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; background: var(--accent); color: var(--on-accent); transition: background-color .2s, filter .2s; }
.dash__actions .cta:hover { filter: brightness(1.08); }
.dash__actions .cta--ghost { background: none; color: var(--fg); border: 1px solid var(--line); }
.dash__actions .cta--ghost:hover { background: var(--card-2); filter: none; }
.dash__body { padding: 20px 24px 28px; }
.dash h2 { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.dash__desc { max-width: 62ch; font-size: 16px; line-height: 1.65; }
.dash__h { margin-top: 32px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.dash__h + .desc { margin-top: 10px; }
.dash__h + .desc + .desc { margin-top: 12px; }
.dash__h + .highlights { margin-top: 14px; }
.link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.tiles { margin-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--card-2); }
.tile__k { font-size: 13px; color: var(--muted); }
.tile__v { font-size: 16px; font-weight: 500; }
.tile .stars { font-size: 13px; }
.highlights { display: grid; grid-template-columns: 1fr; gap: 12px; }
.highlights li { display: flex; gap: 14px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); }
.highlights i { font-size: 26px; color: var(--accent-text); flex: none; }
.highlights h3 { font-size: 16px; font-weight: 600; }
.highlights p { margin-top: 4px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
@media (min-width: 640px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .highlights { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .detail > * { animation: rise .7s var(--ease) both; }
  .detail .dash { animation-delay: .08s; }
}

/* Gallery: one screenshot at a time */
.slider { position: relative; margin-top: 14px; }
.slider__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: 16px; border: 1px solid var(--line); background: var(--card-2);
}
.slider__track::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; scroll-snap-align: center; padding: 0; border: 0; background: none; cursor: zoom-in;
  aspect-ratio: 2 / 1; display: block;
}
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, left top); }
.slider__btn {
  position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; cursor: pointer; font-size: 20px; color: var(--fg);
  border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background-color .2s, color .2s, scale .2s;
}
.slider__btn:hover { background: var(--accent); color: var(--on-accent); }
.slider__btn:active { scale: .95; }
.slider__prev { left: 12px; }
.slider__next { right: 12px; }
@media (prefers-reduced-motion: no-preference) { .slider__track { scroll-behavior: smooth; } }

.lightbox {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0;
  background: transparent; color: #fff; overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; justify-items: center; }
.lightbox::backdrop { background: rgb(6 8 12 / .88); backdrop-filter: blur(6px); }
.lightbox img { grid-column: 2; max-width: 100%; max-height: 86dvh; border-radius: 14px; border: 1px solid rgb(255 255 255 / .1); }
.lb__btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgb(255 255 255 / .18); background: rgb(20 24 32 / .8); color: #fff; font-size: 20px;
  transition: background-color .2s, scale .2s;
}
.lb__btn:hover { background: var(--accent); }
.lb__btn:active { scale: .96; }
.lb__prev { grid-column: 1; grid-row: 1; }
.lb__next { grid-column: 3; grid-row: 1; }
.lb__close { position: absolute; top: 16px; right: 16px; }
@media (max-width: 600px) { .lightbox[open] { grid-template-columns: 44px 1fr 44px; } .lb__btn { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] img { animation: rise .4s var(--ease) both; }
}

/* Privacy policy page */
.policy__body { padding-top: 32px; }
.policy h1 { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.policy__sub { margin-top: 10px; font-size: 16px; }
.policy__date { margin-top: 4px; font-size: 14px; color: var(--muted); }
.toc { margin-top: 28px; padding: 18px 20px; border-radius: 16px; background: var(--card-2); }
.toc ol { display: grid; gap: 8px; list-style: none; padding: 0; }
.toc a { font-size: 15px; color: var(--muted); transition: color .2s; }
.toc a:hover { color: var(--fg); }
.policy section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.policy h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.policy p, .policy li { font-size: 15.5px; line-height: 1.7; color: var(--muted); }
.policy p { margin-top: 12px; }
.policy strong { color: var(--fg); font-weight: 600; }
.policy ul { margin-top: 12px; display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.policy li::marker { color: var(--accent-text); }
.note { padding: 14px 16px; border-radius: 14px; background: color-mix(in oklab, var(--accent) 12%, transparent); border-left: 3px solid var(--accent); }
.data { width: 100%; margin-top: 16px; border-collapse: collapse; }
.data th { padding: 10px 12px; text-align: left; font-size: 13px; font-weight: 600; color: var(--fg); border-bottom: 1px solid var(--line); }
.data td { padding: 14px 12px; vertical-align: top; font-size: 14.5px; line-height: 1.55; color: var(--muted); border-bottom: 1px solid var(--line); }
.data tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .data thead { display: none; }
  .data, .data tbody, .data tr, .data td { display: block; }
  .data tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .data tbody tr:last-child { border-bottom: 0; }
  .data td { padding: 4px 0; border: 0; }
  .data td::before { content: attr(data-label); display: block; font-size: 12.5px; color: var(--muted); opacity: .8; }
}
.policy__end { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }

.site__host { display: inline-flex; align-items: center; gap: 6px; }
.site__host i { color: var(--accent-text); }

.footer { padding: 24px 16px 40px; text-align: center; font-size: 13px; color: var(--muted); }

/* Motion: entry and panel switch, gated by reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .9s var(--ease) both; animation-delay: var(--d, 0s); }
  .panel:not([hidden]) .card { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + .1s); }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
}
@media (prefers-reduced-motion: reduce) {
  .switch__thumb, .card, .banner::before, .banner::after { transition: none; }
}
