:root {
    color-scheme: light;
    --background: #f2f5f1;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --text: #142426;
    --muted: #677678;
    --line: rgba(20, 50, 53, 0.12);
    --line-strong: rgba(20, 50, 53, 0.22);
    --accent: #087c7e;
    --accent-soft: rgba(8, 124, 126, 0.09);
    --youtube: #ff3d32;
    --shadow: 0 18px 55px rgba(25, 55, 52, 0.09);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -10%, rgba(8, 124, 126, 0.1), transparent 32rem),
        var(--background);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 20px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

img,
svg {
    display: block;
}

.page {
    width: min(calc(100% - 32px), 720px);
    margin: 0 auto;
    padding: 64px 0 max(36px, env(safe-area-inset-bottom));
}

.profile {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 28px;
}

.avatar {
    position: relative;
    width: 116px;
    height: 116px;
}

.avatar img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border: 3px solid var(--surface-solid);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.avatar__ring {
    position: absolute;
    border: 1px solid transparent;
    border-radius: 50%;
    pointer-events: none;
}

.avatar__ring--outer {
    inset: -9px;
    border-top-color: var(--accent);
    border-right-color: rgba(8, 124, 126, 0.18);
    animation: rotate 11s linear infinite;
}

.avatar__ring--outer::before,
.avatar__ring--outer::after {
    position: absolute;
    width: 5px;
    height: 5px;
    content: "";
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(8, 124, 126, 0.5);
}

.avatar__ring--outer::before {
    top: 8px;
    right: 15px;
}

.avatar__ring--outer::after {
    bottom: 7px;
    left: 17px;
}

.avatar__ring--inner {
    inset: -4px;
    border-bottom-color: rgba(8, 124, 126, 0.48);
    animation: rotate 7s linear infinite reverse;
}

.avatar__status {
    position: absolute;
    right: 5px;
    bottom: 6px;
    z-index: 3;
    width: 15px;
    height: 15px;
    border: 3px solid var(--surface-solid);
    border-radius: 50%;
    background: #2bbb71;
}

.profile__copy {
    min-width: 0;
}

.handle {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 750;
}

h1 {
    margin: 0;
    font-size: clamp(1.65rem, 5vw, 2.15rem);
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.bio {
    max-width: 470px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
}

.socials {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 9px;
    margin-bottom: 24px;
}

.socials a {
    --social-color: var(--accent);
    display: grid;
    min-width: 0;
    min-height: 66px;
    place-items: center;
    gap: 4px;
    padding: 8px 4px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    color: var(--muted);
    backdrop-filter: blur(12px);
    transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.socials a:hover {
    border-color: color-mix(in srgb, var(--social-color) 38%, transparent);
    background: color-mix(in srgb, var(--social-color) 7%, var(--surface-solid));
    color: var(--social-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--social-color) 14%, transparent);
}

.socials a:focus-visible {
    outline: 2px solid var(--social-color);
    outline-offset: 2px;
}

.socials a:nth-child(1) {
    --social-color: #e52d27;
}

.socials a:nth-child(2) {
    --social-color: #0a66c2;
}

.socials a:nth-child(3) {
    --social-color: #008f95;
}

.socials a:nth-child(4) {
    --social-color: #c13584;
}

.socials a:nth-child(5) {
    --social-color: #6558d3;
}

.socials a:nth-child(6) {
    --social-color: #111111;
}

.socials svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transform-origin: center;
    transition: transform 180ms ease;
}

.socials a:hover svg,
.socials a:focus-visible svg {
    animation: social-signal 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.socials a:nth-child(4) svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.socials span {
    overflow: hidden;
    width: 100%;
    font-size: 0.66rem;
    font-weight: 750;
    text-align: center;
    text-overflow: ellipsis;
}

.primary-actions {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 10px;
    margin-bottom: 48px;
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    font-size: 0.94rem;
    font-weight: 750;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(25, 55, 52, 0.1);
}

.button--primary {
    border-color: var(--text);
    background: var(--text);
    color: #fff;
}

.button--primary svg {
    width: 21px;
    fill: var(--youtube);
}

.button--secondary {
    background: var(--surface);
    backdrop-filter: blur(12px);
}

.section {
    margin-bottom: 42px;
}

.section__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section__heading h2 {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section__heading > span {
    color: var(--muted);
    font-size: 0.76rem;
}

.featured-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 24px;
    gap: 0 16px;
    align-items: start;
    overflow: hidden;
    padding: 14px 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    backdrop-filter: blur(12px);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.featured-card:hover,
.link-row:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.featured-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    grid-column: 1 / -1;
    margin-bottom: 18px;
    border-radius: 12px;
    object-fit: contain;
    background: #1466a0;
}

.featured-card__copy {
    min-width: 0;
}

.label {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.featured-card h3 {
    margin: 5px 0 4px;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.featured-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.arrow {
    color: var(--accent);
    font-size: 1rem;
    transition: transform 160ms ease;
}

.featured-card:hover .arrow,
.link-row:hover .arrow {
    transform: translate(2px, -2px);
}

.link-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    backdrop-filter: blur(12px);
}

.link-row {
    --resource-color: var(--accent);
    display: grid;
    min-height: 82px;
    grid-template-columns: 44px 1fr 20px;
    gap: 15px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.link-row:last-child {
    border-bottom: 0;
}

.link-row:hover,
.link-row:focus-visible {
    position: relative;
    z-index: 1;
    background: color-mix(in srgb, var(--resource-color) 7%, var(--surface-solid));
}

.link-row:focus-visible {
    outline: 2px solid var(--resource-color);
    outline-offset: -2px;
}

.link-row--video {
    --resource-color: #e52d27;
}

.link-row--playlist {
    --resource-color: #087c7e;
}

.link-row--podcast {
    --resource-color: #7a57d1;
}

.link-row--writing {
    --resource-color: #d56722;
}

.link-row--discord {
    --resource-color: #5865f2;
}

.link-row__icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--resource-color);
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.link-row__icon svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.link-row__icon--play svg {
    fill: currentColor;
    stroke: none;
}

.link-row:hover .link-row__icon,
.link-row:focus-visible .link-row__icon {
    background: color-mix(in srgb, var(--resource-color) 13%, white);
    box-shadow: 0 7px 18px color-mix(in srgb, var(--resource-color) 18%, transparent);
    animation: resource-signal 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.link-row:hover .arrow,
.link-row:focus-visible .arrow {
    color: var(--resource-color);
}

.link-row__copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.link-row__copy strong {
    font-size: 1rem;
}

.link-row__copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 42px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.66rem;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes social-signal {
    0% {
        transform: scale(1) rotate(0);
    }

    @keyframes resource-signal {
        0% {
            transform: scale(1) rotate(0);
        }

        50% {
            transform: scale(1.1) rotate(-4deg);
        }

        100% {
            transform: scale(1) rotate(0);
        }
    }

    45% {
        transform: scale(1.22) rotate(-7deg);
    }

    72% {
        transform: scale(0.96) rotate(3deg);
    }

    100% {
        transform: scale(1.08) rotate(0);
    }
}

@media (max-width: 560px) {
    .page {
        width: min(calc(100% - 28px), 720px);
        padding-top: 38px;
    }

    .profile {
        grid-template-columns: 94px 1fr;
        gap: 20px;
        margin-bottom: 28px;
    }

    .avatar {
        width: 84px;
        height: 84px;
    }

    .avatar__status {
        right: 1px;
        bottom: 2px;
    }

    h1 {
        font-size: 1.45rem;
    }

    .bio {
        margin-top: 7px;
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .socials {
        grid-template-columns: repeat(6, minmax(48px, 1fr));
        gap: 6px;
        overflow-x: auto;
        margin-right: -14px;
        padding-right: 14px;
        scrollbar-width: none;
    }

    .socials::-webkit-scrollbar {
        display: none;
    }

    .socials a {
        min-height: 58px;
    }

    .socials svg {
        width: 22px;
        height: 22px;
    }

    .socials span {
        display: none;
    }

    .primary-actions {
        grid-template-columns: 1fr;
        margin-bottom: 40px;
    }

    .featured-card {
        grid-template-columns: 1fr 18px;
        gap: 0 12px;
        padding: 10px 10px 16px;
    }

    .featured-card img {
        width: 100%;
        aspect-ratio: 16 / 9;
        margin-bottom: 15px;
    }

    .featured-card h3 {
        font-size: 1.08rem;
    }

    .label {
        font-size: 0.65rem;
    }

    .link-row {
        min-height: 76px;
        padding: 12px 14px;
    }
}

@media (max-width: 370px) {
    .profile {
        grid-template-columns: 80px 1fr;
        gap: 16px;
    }

    .avatar {
        width: 72px;
        height: 72px;
    }

    .bio {
        font-size: 0.84rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
