:root {
    --bg: #ffffff;
    --ink: #1a1025;
    --muted: #5b4b6b;
    --purple: #7a3cff;
    --purple-2: #a78bfa;
    --card: #ffffff;
    --line: rgba(122,60,255,.18);
    --shadow: 0 10px 30px rgba(26,16,37,.10);
    --radius: 18px;
    --radius2: 24px;
    --max: 1100px;
    --chip: rgba(122,60,255,.10);
    --chip2: rgba(122,60,255,.16);
}

* {
    box-sizing: border-box
}

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

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "Noto Sans JP", Arial, "Apple Color Emoji","Segoe UI Emoji";
    color: var(--ink);
    background: var(--bg);
    position: relative;
}

/* Background: single full-bleed SVG (avoids gradient seams/banding) */
html {
    background-color: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1920'%20height='1080'%20viewBox='0%200%201920%201080'%3E%3Cdefs%3E%3CradialGradient%20id='a'%20cx='20%25'%20cy='0%25'%20r='80%25'%3E%3Cstop%20offset='0%25'%20stop-color='%23A78BFA'%20stop-opacity='.28'/%3E%3Cstop%20offset='55%25'%20stop-color='%23A78BFA'%20stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient%20id='b'%20cx='95%25'%20cy='10%25'%20r='70%25'%3E%3Cstop%20offset='0%25'%20stop-color='%237A3CFF'%20stop-opacity='.20'/%3E%3Cstop%20offset='50%25'%20stop-color='%237A3CFF'%20stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient%20id='c'%20cx='55%25'%20cy='120%25'%20r='85%25'%3E%3Cstop%20offset='0%25'%20stop-color='%23A78BFA'%20stop-opacity='.14'/%3E%3Cstop%20offset='55%25'%20stop-color='%23A78BFA'%20stop-opacity='0'/%3E%3C/radialGradient%3E%3Cfilter%20id='n'%20x='-20%25'%20y='-20%25'%20width='140%25'%20height='140%25'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='.8'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20.05%200'/%3E%3C/filter%3E%3C/defs%3E%3Crect%20width='1920'%20height='1080'%20fill='%23ffffff'/%3E%3Crect%20width='1920'%20height='1080'%20fill='url(%23a)'/%3E%3Crect%20width='1920'%20height='1080'%20fill='url(%23b)'/%3E%3Crect%20width='1920'%20height='1080'%20fill='url(%23c)'/%3E%3Crect%20width='1920'%20height='1080'%20filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Body stays transparent so the html background shows through */
body {
    background: transparent;
}

a {
    color: var(--purple);
    text-decoration: none
}

    a:hover {
        text-decoration: underline
    }

/* Layout */
.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 20px 16px 80px
}

header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: saturate(180%) blur(10px);
    background: rgba(255,255,255,.72);
    border-bottom: 1px solid var(--line);
}

.topbar {
    max-width: var(--max);
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px
}

.logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple), var(--purple-2));
    box-shadow: 0 10px 20px rgba(122,60,255,.20);
    position: relative;
}

    .logo:after {
        content: "";
        position: absolute;
        inset: 8px;
        border-radius: 10px;
        background: rgba(255,255,255,.25);
        border: 1px solid rgba(255,255,255,.35);
    }

.brand h1 {
    font-size: 14px;
    line-height: 1.2;
    margin: 0
}

.brand .sub {
    font-size: 12px;
    color: var(--muted)
}

nav {
    display: flex;
    gap: 10px;
    flex: 1;
    overflow: auto;
    scrollbar-width: none
}

    nav::-webkit-scrollbar {
        display: none
    }

.navlink {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--ink);
}

    .navlink:hover {
        background: var(--chip);
        border-color: var(--line);
        text-decoration: none
    }

    .navlink.active {
        background: rgba(122,60,255,.12);
        border-color: rgba(122,60,255,.30);
        color: var(--purple)
    }

.lang {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

    .lang a {
        font-size: 12px;
        padding: 8px 10px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: #fff;
        color: var(--ink);
        text-decoration: none;
    }

        .lang a[aria-current="page"] {
            border-color: rgba(122,60,255,.45);
            background: rgba(122,60,255,.10);
            color: var(--purple)
        }

/* Hero */
.hero {
    padding: 26px 0 10px
}

.heroCard {
    border: 1px solid var(--line);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
    background: rgba(255,255,255,.86);
    overflow: hidden;
}

.heroInner {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 22px
}
    /* Center the left avatar block horizontally within its column */
    .heroInner > div:first-child {
        display: flex;
        justify-content: center
    }
/* When stacked on mobile, keep avatar centered */
@media (max-width: 620px) {
    .heroInner > div:first-child {
        justify-content: center
    }
}

.avatar {
    width: 180px;
    aspect-ratio: 1/1;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(122,60,255,.22), rgba(167,139,250,.18));
    border: 1px solid rgba(122,60,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .avatar span {
        font-size: 12px;
        color: var(--muted);
        text-align: center;
        padding: 10px
    }

.avatarImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.badgeRow {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px
}

.badgeDot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(122,60,255,.25);
    background: linear-gradient(135deg, rgba(122,60,255,.18), rgba(167,139,250,.14));
    box-shadow: 0 6px 14px rgba(122,60,255,.10);
    flex: 0 0 auto;
}

.titleRow {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between
}

.titleLeft {
    min-width: 0
}

.titleRow h2 {
    line-height: 1.1;
    margin: 0;
    font-size: 22px;
    letter-spacing: .2px
}

.nameLine {
    min-width: 0
}

#name {
    white-space: nowrap
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end
}

.chip {
    font-size: 12px;
    color: var(--purple);
    background: rgba(122,60,255,.10);
    border: 1px solid rgba(122,60,255,.22);
    padding: 6px 10px;
    border-radius: 999px;
}

.metaGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin-top: 10px
}

.meta {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.78)
}

    .meta .k {
        font-size: 12px;
        color: var(--muted)
    }

    .meta .v {
        margin-top: 4px;
        font-size: 14px
    }

.links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 14px;
    border: 1px solid rgba(122,60,255,.30);
    background: rgba(122,60,255,.08);
    color: var(--purple);
    font-size: 13px;
    text-decoration: none;
}

    .btn:hover {
        background: rgba(122,60,255,.12);
        text-decoration: none
    }

    .btn.secondary {
        border-color: var(--line);
        color: var(--ink);
        background: #fff
    }

/* Sections */
section {
    scroll-margin-top: 86px;
    margin-top: 22px
}

.secHead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 10px
}

    .secHead h3 {
        margin: 0;
        font-size: 16px
    }

    .secHead p {
        margin: 0;
        font-size: 13px;
        color: var(--muted)
    }

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px
}

.card {
    grid-column: span 12;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.86);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cardInner {
    padding: 14px
}

.cardTitle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px
}

    .cardTitle h4 {
        margin: 0;
        font-size: 15px
    }

.pill {
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--line);
    background: #fff;
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.desc {
    margin: 8px 0 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.55
}

/* Carousel / Media */
.media {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(122,60,255,.06), rgba(255,255,255,.0));
    padding: 12px;
}

.frame {
    width: 100%;
    aspect-ratio: 4 / 3; /* default; can switch per item */
    border-radius: 16px;
    border: 1px solid rgba(122,60,255,.22);
    background: rgba(122,60,255,.03);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

    .frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: none
    }

    .frame .ph {
        font-size: 12px;
        color: var(--muted);
        text-align: center;
        padding: 12px
    }

.carouselBar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px
}

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

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(122,60,255,.35);
    background: rgba(255,255,255,.9);
    cursor: pointer;
}

    .dot[aria-current="true"] {
        background: rgba(122,60,255,.35)
    }

.carBtns {
    display: flex;
    gap: 8px
}

.iconBtn {
    border: 1px solid rgba(122,60,255,.30);
    background: rgba(122,60,255,.08);
    color: var(--purple);
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px;
}

    .iconBtn:hover {
        background: rgba(122,60,255,.12)
    }

/* Masonry / Waterfall */
.masonry {
    column-count: 1;
    column-gap: 14px;
    margin-top: 12px;
}

.mItem {
    display: block;
    break-inside: avoid;
    margin: 0 0 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 24px rgba(26,16,37,.08);
    overflow: hidden;
    text-decoration: none;
}

    .mItem:hover {
        border-color: rgba(122,60,255,.35);
        text-decoration: none
    }

.mFrame {
    width: 100%;
    aspect-ratio: 1 / 1; /* default; overridden by data-aspect */
    background: rgba(122,60,255,.03);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

    .mFrame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: none
    }

    .mFrame .ph {
        font-size: 12px;
        color: var(--muted);
        text-align: center;
        padding: 12px
    }

@media (min-width: 520px) {
    .masonry {
        column-count: 2;
    }
}

@media (min-width: 980px) {
    .masonry {
        column-count: 3;
    }
}

/* Project items: auto width per content, wrap to next line */
.tagWrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px
}

.tagLink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 13px;
    line-height: 1.25;
    max-width: 100%;
    text-decoration: none;
}

    .tagLink:hover {
        border-color: rgba(122,60,255,.35);
        text-decoration: none
    }

/* Name + badges inline */
.nameLine {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}
/* Keep badges visually stable next to the name */
.badgeMiniRow {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap; /* keep in one row */
    max-width: 260px; /* prevent pushing layout too wide */
    overflow: hidden; /* avoid breaking the grid */
}

    .badgeMiniRow .badgeDot {
        width: 16px;
        height: 16px;
        box-shadow: none
    }

.badgeImg {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(122,60,255,.25);
    background: rgba(255,255,255,.9);
    flex: 0 0 auto;
    display: block;
}
/* On small screens, allow horizontal scroll instead of wrapping */
@media (max-width: 520px) {
    .badgeMiniRow {
        max-width: 100%;
        overflow: auto;
        scrollbar-width: none
    }

        .badgeMiniRow::-webkit-scrollbar {
            display: none
        }
}

/* Footer */
footer {
    margin-top: 26px;
    color: var(--muted);
    font-size: 12px
}

.footCard {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.78);
    padding: 14px
}

/* Responsive */
@media (min-width: 860px) {
    .card.world {
        grid-column: span 6
    }
}

@media (max-width: 620px) {
    .brand {
        min-width: 0
    }

    .heroInner {
        grid-template-columns: 1fr;
    }

    .avatar {
        width: 160px
    }

    .metaGrid {
        grid-template-columns: 1fr
    }

    .titleRow {
        flex-direction: column
    }

    .chips {
        justify-content: flex-start
    }
}

/* Utilities */
.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0
}

.small {
    font-size: 12px;
    color: var(--muted)
}

.note {
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 0
}
.langBtn{
  font-size:12px; padding:8px 10px; border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  cursor:pointer;
}
.langBtn:hover{background:rgba(122,60,255,.06)}
.langBtn[aria-current="page"]{
  border-color:rgba(122,60,255,.45);
  background:rgba(122,60,255,.10);
  color:var(--purple);
}

.langBtn {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

    .langBtn:hover {
        background: rgba(122,60,255,.06)
    }

    .langBtn[aria-current="page"] {
        border-color: rgba(122,60,255,.45);
        background: rgba(122,60,255,.10);
        color: var(--purple);
    }
    /* Avatars masonry: more columns than default */
.masonry.masonryAvatars{ column-count: 2; }

@media (min-width: 520px){
  .masonry.masonryAvatars{ column-count: 3; }
}

@media (min-width: 980px){
  .masonry.masonryAvatars{ column-count: 4; }
}

@media (min-width: 1280px){
  .masonry.masonryAvatars{ column-count: 5; }
}

/* Memes masonry: keep existing behavior (optional, explicit) */
@media (min-width: 520px){
  .masonry.masonryMemes{ column-count: 2; }
}
@media (min-width: 980px){
  .masonry.masonryMemes{ column-count: 3; }
}
/* Masonry: use natural image ratio (no forced aspect) */
.mFrame{
  aspect-ratio: auto;
  height: auto;
  display:block;
  padding: 0;
}
.mFrame img{
  width:100%;
  height:auto;
  display:block;
  object-fit: initial; /* 或直接刪掉也行 */
}
/* Header logo size */
.logo{
  width: 44px;
  height: 44px;
  border-radius: 18px;   /* 圓角方塊 */
  overflow: hidden;
  flex: 0 0 auto;
}

.logoImg{
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 填滿且裁切 */
  display: block;
}
/* Footer (QR warning) */
.footer{
  margin-top: 28px;
  padding: 0 0 46px;
}

.footerCard{
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 16px 16px 12px;
}

.footerCard h3{
  margin: 0 0 10px;
  font-size: 15px;
}

.footerP{
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.footerP + .footerP{
  border-top: 1px dashed rgba(122,60,255,.22);
  padding-top: 10px;
}

.footerMeta{
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

#footerMadeBy{
  font-size: 12px;
  color: var(--muted);
}
