@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #030303;
    --surface: #0a0a0a;
    --surface-2: #111111;
    --border: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.1);
    --text: #ebebeb;
    --text-dim: #555;
    --text-muted: #333;
    --accent: #7c6aef;
    --accent-soft: rgba(124, 106, 239, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.12);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}

::selection {
    background: rgba(124, 106, 239, 0.3);
    color: #fff;
}

.page {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: revealIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-d1 { animation-delay: 0.05s; }
.reveal-d2 { animation-delay: 0.12s; }
.reveal-d3 { animation-delay: 0.2s; }
.reveal-d4 { animation-delay: 0.3s; }
.reveal-d5 { animation-delay: 0.4s; }
.reveal-d6 { animation-delay: 0.5s; }
.reveal-d7 { animation-delay: 0.6s; }
.reveal-d8 { animation-delay: 0.7s; }

@keyframes revealIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */

.header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
}

.avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    transition: border-color 0.3s;
}

.avatar:hover {
    border-color: var(--border-hover);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-glow {
    position: absolute;
    inset: -8px;
    border-radius: 20px;
    background: radial-gradient(circle at center, rgba(124, 106, 239, 0.08), transparent 70%);
    z-index: -1;
}

.header-text {
    flex: 1;
}

.name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.aka-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.aka-row span {
    font-size: 11px;
    font-weight: 500;
    color: #666;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 1px 7px;
    white-space: nowrap;
}

.handle {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 2px;
}

.handle::before {
    content: '@';
}

.bio {
    margin-top: 16px;
    margin-bottom: 32px;
    font-size: 14px;
    line-height: 1.6;
    color: #999;
    max-width: 480px;
}

/* ── Stats ── */

.stats {
    display: flex;
    gap: 24px;
    margin-bottom: 36px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value .iconify {
    font-size: 18px;
    color: var(--text-dim);
}

.stat-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* ── Section ── */

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 14px;
}

.section + .section {
    margin-top: 36px;
}

/* ── Links Grid ── */

.links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.link-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

.link-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.link-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px color-mix(in srgb, var(--card-color, var(--accent)) 12%, transparent);
}

.link-card:hover::after {
    opacity: 1;
}

.link-card:hover .link-icon {
    background: color-mix(in srgb, var(--card-color, var(--accent)) 12%, transparent);
}

.link-card:active {
    transform: translateY(-1px);
}

.link-card.full-width {
    grid-column: 1 / -1;
}

.link-icon {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-icon .iconify {
    font-size: 18px;
    color: var(--text-dim);
    transition: color 0.3s;
}

.link-icon .custom-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    color: var(--text-dim);
    transition: color 0.3s;
}

.link-card:hover .link-icon .iconify {
    color: var(--card-color, var(--accent));
}

.link-card:hover .link-icon .custom-icon {
    color: var(--card-color, var(--accent));
}

.link-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.link-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Activity Carousel ── */

.activity-carousel {
    position: relative;
}

.activity-card {
    display: block;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-sizing: border-box;
}

.activity-card:not(.active) {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
}

.activity-card.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
}
}

.activity-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.activity-card.active:hover {
    transform: translateY(-2px) translateX(0);
}

.activity-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.activity-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s;
}

.activity-dots .dot.active {
    background: rgba(255, 255, 255, 0.3);
}

.activity-dots .dot:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bsky-post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bsky-icon {
    font-size: 16px;
    color: #555;
    transition: color 0.3s;
}

.bsky-post:hover .bsky-icon {
    color: #0055ff;
}

.gh-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.gh-icon {
    font-size: 16px;
    color: #555;
    transition: color 0.3s;
}

.gh-card:hover .gh-icon {
    color: #c9d1d9;
}

.gh-card-handle {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
}

.gh-card-total {
    font-size: 11px;
    color: #444;
    margin-left: auto;
}

.gh-mosaic {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    grid-auto-flow: column;
    gap: 3px;
    overflow: hidden;
}

.gh-mosaic .cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.3s;
}

.gh-mosaic .cell.l1 { background: rgba(124, 106, 239, 0.15); }
.gh-mosaic .cell.l2 { background: rgba(124, 106, 239, 0.3); }
.gh-mosaic .cell.l3 { background: rgba(124, 106, 239, 0.5); }
.gh-mosaic .cell.l4 { background: rgba(124, 106, 239, 0.75); }

.gh-card:hover .cell.l1 { background: rgba(124, 106, 239, 0.25); }
.gh-card:hover .cell.l2 { background: rgba(124, 106, 239, 0.4); }
.gh-card:hover .cell.l3 { background: rgba(124, 106, 239, 0.6); }
.gh-card:hover .cell.l4 { background: rgba(124, 106, 239, 0.85); }

.shiki-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.shiki-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    color: #555;
    transition: color 0.3s;
}

.shiki-card:hover .shiki-icon {
    color: #888;
}

.shiki-card-handle {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
}

.shiki-card-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shiki-entry {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shiki-cover {
    width: 36px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.shiki-entry-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.shiki-entry-status {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 5px;
    border-radius: 4px;
    color: #111;
    flex-shrink: 0;
}

.shiki-entry-status.completed { background: #4caf50; }
.shiki-entry-status.watching { background: #ff9800; }
.shiki-entry-status.planned { background: #607d8b; }
.shiki-entry-status.on_hold { background: #9c27b0; }
.shiki-entry-status.dropped { background: #f44336; }
.shiki-entry-status.rewatching { background: #2196f3; }

.shiki-entry-title {
    font-size: 12px;
    color: #bbb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.shiki-entry-score {
    font-size: 10px;
    color: #666;
    flex-shrink: 0;
}

.bsky-post-handle {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
}

.bsky-post-text {
    font-size: 13px;
    line-height: 1.5;
    color: #bbb;
    white-space: pre-wrap;
    word-break: break-word;
}

.bsky-post-media {
    margin-top: 10px;
    display: grid;
    gap: 4px;
    border-radius: 10px;
    overflow: hidden;
}

.bsky-post-media:empty {
    display: none;
}

.bsky-post-media.img-1 { grid-template-columns: 1fr; }
.bsky-post-media.img-2 { grid-template-columns: 1fr 1fr; }
.bsky-post-media.img-3 { grid-template-columns: 1fr 1fr; }
.bsky-post-media.img-4 { grid-template-columns: 1fr 1fr; }

.bsky-post-media img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.bsky-post:hover .bsky-post-media img {
    opacity: 0.9;
}

.bsky-post-external {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}

.bsky-post-external-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bsky-post-external-icon .iconify {
    font-size: 14px;
    color: var(--text-dim);
}

.bsky-post-external-info {
    min-width: 0;
}

.bsky-post-external-title {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsky-post-external-url {
    font-size: 10px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsky-post-footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.bsky-post-date {
    font-size: 10px;
    color: #444;
}

/* ── Footer ── */

.footer {
    margin-top: 52px;
    text-align: center;
}

.footer a {
    display: inline-block;
    text-decoration: none;
}

.footer-logo {
    height: 28px;
    opacity: 0.12;
    transition: opacity 0.3s;
}

.footer a:hover .footer-logo {
    opacity: 0.25;
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .links-grid {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 40px 16px 60px;
    }
}
