/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #5B4E71;
    --bg-button: #380257;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-shadow: rgba(0, 0, 0, 0.5);
}

/* Accessibility - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Accessibility - Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bg-button);
    color: var(--text-primary);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #5B4E71 0%, #4A3C5E 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

/* Container */
.container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Profile Section */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

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

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

.profile-name {
    color: var(--text-primary);
    font-family: 'Red Hat Display', 'Inter', sans-serif;
    font-size: 3.25rem;
    font-variant: small-caps;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Links Section */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 64px;
    padding: 16px 24px;
    background-color: var(--bg-button);
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Red Hat Display', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--hover-shadow);
    background-color: #4A0269;
}

.link-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.link-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
}

.link-text {
    flex: 1;
    text-align: center;
}

/* Social Section */
.social-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 20px 0;
}

.social-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
}

.social-icon:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.social-icon i {
    font-size: 20px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 576px) {
    body {
        padding: 16px;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .profile-description {
        font-size: 0.85rem;
    }

    .link-button {
        min-height: 56px;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .link-icon {
        font-size: 1.25rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .social-icon i {
        font-size: 18px;
    }

    .footer {
        font-size: 0.75rem;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .container {
        max-width: 480px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-section,
.link-button,
.social-section,
.footer {
    animation: fadeIn 0.6s ease-out forwards;
}

.link-button:nth-child(1) { animation-delay: 0.05s; }
.link-button:nth-child(2) { animation-delay: 0.1s; }
.link-button:nth-child(3) { animation-delay: 0.15s; }
.link-button:nth-child(4) { animation-delay: 0.2s; }
.link-button:nth-child(5) { animation-delay: 0.25s; }
.link-button:nth-child(6) { animation-delay: 0.3s; }
.link-button:nth-child(7) { animation-delay: 0.35s; }
.link-button:nth-child(8) { animation-delay: 0.4s; }
.link-button:nth-child(9) { animation-delay: 0.45s; }
.link-button:nth-child(10) { animation-delay: 0.5s; }
.link-button:nth-child(11) { animation-delay: 0.55s; }
.link-button:nth-child(12) { animation-delay: 0.6s; }

/* Focus Styles for Accessibility */
.link-button:focus,
.social-icon:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Loading State */
.link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.link-button:hover::before {
    left: 100%;
}
