/* CSS Variables matching Linktree */
:root {
    --button-style-text: #1A0101;
    --button-style-background: #F6F3EB;
    --button-style-background-hover: color-mix(in srgb, var(--button-style-background) 93%, var(--button-style-contrast-color) 7%);
    --button-style-border: none;
    --button-style-border-color: transparent;
    --button-style-shadow: none;
    --button-style-shadow-color: #000000;
    --button-style-contrast-color: #000000;
    --button-style-radius: 28px;
    --button-style-inner-radius: min(var(--button-style-radius), max(4px, calc(var(--button-style-radius) - 8px)));
    --button-style-skeleton-color: rgba(0, 0, 0, 0.05);
    --desktop-frame-color: color-mix(in srgb, #EEE8DC 88%, black 12%);
    --header-font-family: 'Crimson Text', serif;
    --header-font-weight: 600;
    --header-text-color: #1A0101;
    --profile-container-desktop-width: 580px;
    --header-bio-font-size: 16px;
    --link-gap: 14px;
    --button-style-inner-padding: 16px;
    --link-preview-thumbnail-width: 160px;
    --linkRadius: var(--button-style-radius);
    --background-contrast-color: #000000;
    --backdrop-contrast-color: #000000;
    --bodyText: #1A0101;
    --linkBackground: var(--button-style-background);
    --linkText: var(--button-style-text);
    --linkHoverBackground: var(--button-style-background-hover);
    --linkHoverText: var(--button-style-text);
    --profileBackground: #EEE8DC;
    --defaultAvatarBackground: #000000;
    --defaultAvatarText: #FFFFFF;
    --profileTitleText: #1A0101;
    --profileDescriptionText: #1A0101;
    --socialLinkFill: #1A0101;
    --bannerBackground: #F6F3EB;
    --bannerText: #1A0101;
    --linkShadow: #000000;
    --profileFontFamilyPrimary: 'Crimson Text', serif;
    --profileFontFamilySecondary: 'Inter', sans-serif;
    --profileFontWeightNormal: 400;
    --profileFontWeightBold: 700;
    --profileDescriptionFontWeight: 500;
    --linkTextFontWeight: 500;
    --headerFontWeight: 700;
    --embedLinkTextFontWeight: 500;
    --signupSubmitTextFontWeight: 700;
    --bannerFontWeight: 700;
    --headerFontSize: normal;
    --embedLinkTextFontSize: 16px;
    --signupSubmitTextFontSize: 16px;
    --linkHeaderFontSize: 16px;
    --bannerFontSize: 14px;
    --profileDescriptionLineHeight: 1.5;
    --headerLineHeight: 1.5;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--profileFontFamilyPrimary), serif;
    background-color: var(--profileBackground);
    min-height: 100vh;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--profileBackground);
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--link-gap);
    padding-left: calc(var(--link-gap) + 4px);
    padding-right: calc(var(--link-gap) + 4px);
}

@media (min-width: 576px) {
    .top-bar {
        position: absolute;
        top: 14px;
        padding-left: calc(var(--link-gap) * 2);
        padding-right: calc(var(--link-gap) * 2);
    }
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.icon-btn:active {
    transform: scale(0.95);
}

.icon-btn svg {
    display: block;
}

/* Profile Container */
.profile-container {
    display: flex;
    flex-direction: column;
    min-height: 90vh;
    padding-top: 96px;
}

@media (min-width: 576px) {
    .profile-container {
        padding-top: 0;
        max-width: var(--profile-container-desktop-width);
        margin: 0 auto;
        min-height: calc(90vh - 40px);
        margin-top: 40px;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 24px 32px 0 rgba(0, 0, 0, 0.15);
        overflow: hidden;
    }
}

/* Profile Header */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 var(--link-gap);
    padding-bottom: 16px;
    text-align: center;
}

@media (min-width: 576px) {
    .profile-header {
        padding-left: calc(var(--link-gap) * 2);
        padding-right: calc(var(--link-gap) * 2);
        padding-top: 96px;
    }
}

.profile-picture {
    margin-bottom: 16px;
}

.profile-picture img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-title {
    font-family: var(--header-font-family, var(--profileFontFamilyPrimary));
    font-weight: var(--header-font-weight, 600);
    font-size: 1.5rem;
    color: var(--header-text-color, var(--bodyText));
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    margin: 0;
    line-height: 1.5;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--profileTitleText);
    transition: transform 0.2s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: scale(1.075);
}

.social-link svg {
    display: block;
}

/* Links Container */
.links-container {
    display: flex;
    flex-direction: column;
    gap: var(--link-gap);
    padding: 0 var(--link-gap);
    padding-bottom: 16px;
    margin-top: 24px;
}

@media (min-width: 576px) {
    .links-container {
        padding-left: calc(var(--link-gap) * 2);
        padding-right: calc(var(--link-gap) * 2);
    }
}

/* Link Button */
.link-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 64px;
    background-color: var(--button-style-background);
    border: var(--button-style-border);
    border-radius: var(--button-style-radius);
    box-shadow: var(--button-style-shadow);
    color: var(--button-style-text);
    text-decoration: none;
    transition: transform 75ms ease, box-shadow 75ms ease, background-color 75ms ease;
    overflow: hidden;
}

.link-button:hover {
    background-color: var(--button-style-background-hover);
}

.link-button:focus {
    outline: none;
}

.link-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding: 12px 64px 12px 64px;
    min-height: 64px;
    text-align: center;
}

.link-thumbnail {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--button-style-inner-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.link-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-text {
    font-family: 'Inter', var(--profileFontFamilySecondary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--button-style-text);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (min-width: 576px) {
    .link-text {
        font-size: 16px;
    }
}

/* Share Button */
.share-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: var(--button-style-text);
    opacity: 0.5;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.share-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.share-btn svg {
    display: block;
}

/* Profile Footer */
.profile-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 16px 64px 16px;
    position: relative;
    z-index: 10;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 24px;
    text-align: center;
}

.contact-phone {
    font-family: 'Inter', var(--profileFontFamilySecondary);
    font-size: 14px;
    font-weight: 500;
    color: var(--bodyText);
    margin: 0;
}

.contact-email {
    font-family: 'Inter', var(--profileFontFamilySecondary);
    font-size: 14px;
    font-weight: 500;
    color: var(--bodyText);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-email:hover {
    opacity: 0.7;
}

.contact-business {
    font-family: 'Crimson Text', var(--profileFontFamilyPrimary);
    font-size: 12px;
    font-weight: 600;
    color: var(--bodyText);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    background-color: #FFFFFF;
    border: 1px solid #E5DFD3;
    border-radius: 12px;
    color: #1A0101;
    font-family: 'Inter', var(--profileFontFamilySecondary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.footer-cta:hover {
    background-color: #F6F3EB;
    border-color: #F0EBE4;
}

.footer-cta:active {
    background-color: #F0EBE4;
    border-color: #F0EBE4;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 32px;
    font-size: 10px;
    font-family: 'Inter', var(--profileFontFamilySecondary);
    line-height: 1.5;
    color: var(--background-contrast-color);
}

.footer-link {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    padding: 0;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-link:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
    border-radius: 2px;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: inline;
    }
}

/* View on mobile indicator */
.view-on-mobile {
    position: fixed;
    bottom: 8px;
    right: 32px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (min-width: 1022px) {
    .view-on-mobile {
        opacity: 1;
    }
}

.view-on-mobile p {
    font-family: 'Inter', var(--profileFontFamilySecondary);
    font-size: 14px;
    font-weight: 500;
    color: var(--backdrop-contrast-color);
    text-align: center;
    margin: 0;
}

.mobile-icon {
    position: relative;
    width: 120px;
    height: 120px;
}

.mobile-icon svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
