:root {
    --ink: #111;
    --muted: #8a8a8a;
    --line: #ededed;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    background: #fff;
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}

body {
    display: grid;
    justify-items: center;
    padding: clamp(48px, 22vh, 200px) 16px 64px;
    background: #fff;
    color: var(--ink);
    font: 400 15px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-feature-settings: "cv11";
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--ink);
    color: #fff;
}

.card {
    width: min(100%, 420px);
    animation: card-in 800ms var(--ease) both;
}

/* header */

.top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 500ms var(--ease);
}

.avatar:hover {
    transform: scale(1.08) rotate(-4deg);
}

.name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    cursor: default;
}

.top .muted {
    font-size: 14px;
}

.muted {
    color: var(--muted);
}

/* tabs */

.tabs {
    position: relative;
    display: flex;
    gap: 4px;
    margin: 28px 0 20px;
    padding: 4px;
    border-radius: 10px;
    background: #f4f4f4;
}

.tabs button {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 7px 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: color 250ms ease;
}

.tabs button:hover,
.tabs button[aria-selected="true"] {
    color: var(--ink);
}

.pill {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 0;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 450ms var(--ease), width 450ms var(--ease);
}

/* panels */

.view {
    position: relative;
    transition: height 450ms var(--ease);
}

.panel {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
    visibility: hidden;
    transition: opacity 300ms ease, filter 300ms ease, transform 450ms var(--ease), visibility 0s 300ms;
}

.panel.on {
    position: relative;
    opacity: 1;
    filter: none;
    transform: none;
    visibility: visible;
    transition: opacity 350ms ease 80ms, filter 350ms ease 80ms, transform 450ms var(--ease) 80ms;
}

.panel p + p {
    margin-top: 12px;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.row:first-child {
    padding-top: 0;
}

.row > :last-child {
    color: var(--muted);
    text-align: right;
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #cfcfcf;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color 200ms ease, color 200ms ease;
}

a:hover {
    color: var(--ink);
    text-decoration-color: currentColor;
}

.row > a:last-child {
    color: var(--ink);
}

.posts {
    list-style: none;
}

.posts time {
    color: var(--muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.all {
    margin-top: 14px;
    font-size: 14px;
}

.all a {
    color: var(--muted);
}

.foot {
    margin-top: 24px;
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
    border-radius: 4px;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

@media (max-width: 400px) {
    .tabs {
        gap: 0;
    }

    .tabs button {
        font-size: 12.5px;
    }

    .row {
        flex-direction: column;
        gap: 0;
    }

    .row > :last-child {
        text-align: left;
    }
}

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