:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(31, 41, 55, 0.8);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-1: #0068ff; /* Extreme IT Blue */
    --accent-2: #00bfff; /* Lighter Blue */
    --accent-glow: rgba(0, 104, 255, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans Thai', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(0, 104, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 104, 255, 0.05) 1px, transparent 1px);
    background-size: 35px 35px;
    background-position: center top;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 680px;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-container {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    padding: 3px;
    background: var(--accent-1);
    box-shadow: 0 0 25px var(--accent-glow);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-container:hover {
    transform: scale(1.08) rotate(5deg);
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-color);
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    color: var(--text-main);
}

.profile-bio {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.profile-email {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
}

.profile-email a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.profile-email a:hover {
    color: var(--accent-1);
}

/* Links Section */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 1.1rem 1.5rem;
    border-radius: 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* Stagger animation delay */
.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }
.link-card:nth-child(5) { animation-delay: 0.5s; }
.link-card:nth-child(6) { animation-delay: 0.6s; }

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

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

.link-card:hover {
    transform: translateY(-4px) scale(1.01);
    background: var(--card-hover);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.link-icon {
    font-size: 1.5rem;
    width: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1rem;
    color: var(--accent-1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.link-card:hover .link-icon {
    transform: scale(1.15);
}

.link-title {
    flex-grow: 1;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follower-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 20px;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    white-space: nowrap;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.link-card:hover .follower-badge {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.link-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.4;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.link-card:hover .link-arrow {
    opacity: 1;
    color: var(--text-main);
    animation: bounceRight 1.5s infinite;
}

/* Footer */
.footer {
    margin-top: 3.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.7;
    animation: fadeIn 1s ease-out 0.8s backwards;
}

/* Keyframes */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-25px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(2px); }
    50% { transform: translateX(8px); }
}



/* Responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 2.5rem 1rem;
    }
    
    .avatar-container {
        width: 95px;
        height: 95px;
    }
    
    .link-card {
        padding: 1rem 1.25rem;
        border-radius: 16px;
    }
    
    .link-title {
        font-size: 1rem;
    }
    
    .profile-name {
        font-size: 1.6rem;
    }
}

/* Extra small devices (iPhone SE etc.) */
@media (max-width: 360px) {
    .container {
        padding: 1.5rem 0.8rem;
    }
    
    .avatar-container {
        width: 85px;
        height: 85px;
        margin-bottom: 1rem;
    }
    
    .profile-name {
        font-size: 1.4rem;
    }
    
    .link-card {
        padding: 0.8rem 1rem;
    }
    
    .link-icon {
        width: 38px;
        font-size: 1.3rem;
        margin-right: 0.75rem;
    }
    
    .link-title {
        font-size: 0.95rem;
    }
    
    .follower-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        margin-right: 0.2rem;
    }
}
