/* ============================================
   Juan Ilabaca · Qvixote — Link Tree
   style.css
   ============================================ */

/* --- Reset & base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #0A0A0F;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #D3D1C7;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}

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

/* --- Hero --- */
.hero {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

/* Scanline animation */
.scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(127, 119, 221, 0.55), transparent);
    animation: scan 3s ease-in-out infinite;
    top: 0;
    pointer-events: none;
}

@keyframes scan {
    0%   { top: 0;    opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

/* Avatar */
.avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #1A1A2E;
    border: 2px solid #7F77DD;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

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

.avatar-initials {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #7F77DD;
    letter-spacing: -1px;
}

/* Name */
.name-block {
    text-align: center;
}

.name-main {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(22px, 6vw, 32px);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
}

.name-gamer {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 700;
    color: #5DCAA5;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-top: 6px;
}

/* --- Bio --- */
.bio {
    width: 100%;
    padding: 0 0 1.5rem;
    text-align: center;
}

.bio p {
    font-size: 14px;
    line-height: 1.7;
    color: #888780;
    max-width: 360px;
    margin: 0 auto;
}

.divider {
    width: 40px;
    height: 1px;
    background: rgba(127, 119, 221, 0.27);
    margin: 0 auto 1.5rem;
}

/* --- Link cards --- */
.links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #1A1A2E;
    border: 1px solid #2a2a45;
    border-radius: 10px;
    text-decoration: none;
    color: #D3D1C7;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.link-card:hover {
    border-color: #7F77DD;
    transform: translateX(3px);
}

.link-card--special {
    border-color: #5DCAA5;
    background: #0d1f1a;
}

.link-card--special:hover {
    border-color: #5DCAA5;
    filter: brightness(1.1);
    transform: translateX(3px);
}

/* Icon container */
.link-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-icon svg {
    width: 20px;
    height: 20px;
}

/* Text */
.link-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.link-label {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-sub {
    font-size: 12px;
    color: #888780;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Arrow */
.link-arrow {
    color: #444441;
    font-size: 18px;
    margin-left: auto;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.link-card:hover .link-arrow {
    color: #7F77DD;
}

/* Badge */
.badge {
    font-size: 10px;
    font-weight: 500;
    color: #5DCAA5;
    background: #0d2920;
    border: 1px solid rgba(93, 202, 165, 0.2);
    border-radius: 4px;
    padding: 3px 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

/* --- Footer --- */
.footer {
    margin-top: 2.5rem;
    font-size: 11px;
    color: #444441;
    letter-spacing: 0.05em;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 400px) {
    .link-card {
        padding: 12px 14px;
        gap: 12px;
    }

    .link-label {
        font-size: 14px;
    }
}

/* --- Accesibilidad --- */
@media (prefers-reduced-motion: reduce) {
    .scanline {
        animation: none;
        display: none;
    }

    .link-card {
        transition: none;
    }
}

.link-card:focus-visible {
    outline: 2px solid #7F77DD;
    outline-offset: 2px;
}

.link-card--special:focus-visible {
    outline-color: #5DCAA5;
}
