* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;

}

html {
    background-color: rgb(10, 10, 10);
    color: rgb(10, 10, 10);
}

body {
    /* Fixed Safari/iPhone issue with 100svh */
    background-color: rgb(10, 10, 10);
    background-image: url('assets/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: -webkit-fill-available;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
    color: canvastext;
    padding: clamp(1rem, 5vw, 2rem);
    /* Added to prevent horizontal scrolling on mobile */
    overflow-x: hidden;
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(1rem, 3vw, 1.5rem);
    max-width: 500px;
    width: 100%;
}

.profile-image {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f2f2f3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-name {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgb(241, 241, 241);
    font-family: "Special Gothic Expanded One", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.profile-handle {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    opacity: 0.8;
}

.social-links {
    display: grid;
    /* Added -webkit prefixes for better Safari support */
    display: -webkit-grid;
    gap: 0.75rem;
    width: 95%;
    margin-top: 1rem;
    /* Added to prevent overflow on Safari */
    max-width: 100%;
    /* Additional fix for Safari grid alignment */
    -webkit-align-items: center;
    align-items: center;
    justify-items: center;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.2);
    /* Fixed aspect-ratio for Safari compatibility */
    aspect-ratio: 5;
    -webkit-aspect-ratio: 5;
    /* Fallback for older browsers */
    width: 80%;
}

.social-link:hover, .social-link:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    background: rgba(128, 128, 128, 0.15);
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon img {
    width: 100%;
    height: 100%;
    filter: invert(1);
}

.link-text {
    text-align: center;
    margin-top: 0.5rem;
}

@media (max-width: 480px) {
    .profile-image {
    width: 240px;
    height: 240px;
    }

    .social-link {
    font-size: 1rem;
    }
}


@media (prefers-color-scheme: dark) {
    body {
    color: rgb(19, 19, 19);
    }
    .social-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .social-link:hover, .social-link:focus {
    background: rgba(255, 255, 255, 0.1);
    }
}
