/* Hallmark · macrostructure: bespoke link-in-bio (kapak + sola yaslı profil + gruplu bağlantı satırları)
 * tone: utilitarian-night · anchor hue: 27 (marka kırmızısı) · nav: yok (tek sayfa) · footer: Ft2 inline single line
 * Renkler ve yazı tipleri tokens.css'ten gelir.
 */

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

html,
body {
    overflow-x: clip;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* Bannerdaki kırmızı ufuk çizgisinin karşılığı */
    border-top: 3px solid var(--color-accent);
}

img,
svg {
    display: block;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

.page {
    width: 100%;
    max-width: 35rem;
    margin-inline: auto;
    padding: 0 var(--space-md) calc(var(--space-xl) + env(safe-area-inset-bottom));
}

/* --- Profil ---------------------------------------------------------------- */

.profile {
    padding-top: var(--space-2xl);
    animation: rise var(--dur-enter) var(--ease-out) both;
}

.profile.has-cover {
    padding-top: 0;
}

.cover {
    position: relative;
    margin-inline: calc(var(--space-md) * -1);
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: var(--color-surface);
}

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

.cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent, var(--color-paper));
}

@media (min-width: 35rem) {
    .cover {
        margin-inline: 0;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
}

.profile-top {
    position: relative;
    z-index: var(--z-raised);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md);
}

.has-cover .profile-top {
    margin-top: -3.25rem;
}

.avatar {
    width: 6.5rem;
    height: 6.5rem;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-surface);
    box-shadow: 0 0 0 3px var(--color-paper), 0 0 0 4px var(--color-rule-strong);
}

.avatar-initials {
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-ink);
}

.share {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--color-rule);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-ink);
    cursor: pointer;
    transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-press) var(--ease-out);
}

.share .icon {
    width: 1.05rem;
    height: 1.05rem;
}

.share:active {
    transform: translateY(1px);
}

.name {
    margin: var(--space-lg) 0 var(--space-2xs);
    font-family: var(--font-display);
    /* Syne çok geniş bir yüz: 320px'te "Cihan Seven" tek satıra sığsın diye vw'ye bağlı */
    font-size: clamp(1.875rem, 9.2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    min-width: 0;
}

.meta {
    margin: var(--space-xs) 0 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-muted);
}

.meta .dot {
    color: var(--color-accent);
}

.bio {
    margin: var(--space-sm) 0 0;
    max-width: 32rem;
    text-wrap: pretty;
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin: var(--space-lg) 0 0;
    padding: 0;
    list-style: none;
}

/* Simgeler satıra sığmak için 2rem'e kadar küçülür, 2.75rem'den büyümez:
   telefonda 8 simge tek satırda kalır, daha fazlası düzgünce alt satıra geçer. */
.socials li {
    flex: 1 1 2rem;
    max-width: 2.75rem;
}

@media (max-width: 30rem) {
    .socials {
        gap: var(--space-2xs);
    }
}

.socials a {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--color-rule);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-ink);
    transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-press) var(--ease-out);
}

.socials .icon {
    width: 1.15rem;
    height: 1.15rem;
}

.socials a:active {
    transform: translateY(1px);
}

/* --- Bağlantılar ----------------------------------------------------------- */

.links {
    margin-top: var(--space-xl);
    animation: rise var(--dur-enter) var(--ease-out) 90ms both;
}

.group + .group {
    margin-top: var(--space-xl);
}

.group-title {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.group-title::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    flex: none;
    background: var(--color-accent);
}

.link-list {
    display: grid;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-height: 4rem;
    padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xs);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-ink);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-press) var(--ease-out);
}

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

.link-media {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    flex: none;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--color-paper);
}

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

.link-text {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 0.125rem;
    padding-block: var(--space-2xs);
}

.link:not(:has(.link-media)) .link-text {
    padding-left: var(--space-xs);
}

.link-title {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.link-sub {
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--color-muted);
}

.link-arrow {
    width: 0.7rem;
    height: 0.7rem;
    flex: none;
    fill: currentColor;
    color: var(--color-muted);
    transition: transform var(--dur-short) var(--ease-out);
}

.link.is-featured {
    border-color: var(--color-accent-fill);
    background: var(--color-accent-fill);
    color: var(--color-on-accent);
}

.link.is-featured .link-media {
    background: var(--color-accent-deep);
}

.link.is-featured .link-sub,
.link.is-featured .link-arrow {
    color: var(--color-on-accent-muted);
}

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

@media (hover: hover) {
    .share:hover,
    .socials a:hover {
        background: var(--color-surface-2);
        border-color: var(--color-rule-strong);
    }

    .link:hover {
        background: var(--color-surface-2);
        border-color: var(--color-rule-strong);
    }

    .link:hover .link-arrow {
        transform: translateX(2px);
    }

    .link.is-featured:hover {
        background: var(--color-accent-fill-hover);
        border-color: var(--color-accent-fill-hover);
    }
}

/* --- Alt bilgi ------------------------------------------------------------- */

.foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-xs) var(--space-md);
    margin-top: var(--space-3xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-rule);
    font-size: 0.875rem;
    color: var(--color-muted);
}

.foot a {
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.foot a:hover {
    color: var(--color-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- Paylaşım bildirimi ---------------------------------------------------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
    z-index: var(--z-toast);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    background: var(--color-ink);
    color: var(--color-paper);
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 0.5rem);
    transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out), visibility 0s linear var(--dur-short);
}

.toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile,
    .links {
        animation: fade 150ms linear both;
    }

    .link,
    .share,
    .socials a,
    .link-arrow,
    .toast {
        transition-property: opacity, background-color, border-color;
    }
}
