/* 
 * The Crimsonborn - Premium Redesign 
 * Core Variables & Reset 
 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    /* Color Palette */
    --color-bg: #050505;
    --color-surface: #121212;
    --color-surface-hover: #1a1a1a;
    --color-primary: #DC143C; /* Crimson */
    --color-primary-glow: rgba(220, 20, 60, 0.5);
    --color-text-main: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(220, 20, 60, 0.2);
    --radius-md: 12px;
    --radius-full: 9999px;
    
    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

/* Layout */
.app-container {
    position: relative;
    z-index: 10;
    max-width: 600px; /* Optimal reading width for link hubs */
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

/* Profile Section */
.profile-header {
    text-align: center;
    margin-bottom: var(--space-md);
    animation: fadeInDown 0.8s ease-out;
}

.profile-img-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-md);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-surface);
    box-shadow: 0 0 0 3px var(--color-primary), var(--shadow-glow);
    transition: var(--transition-medium);
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px var(--color-primary), 0 0 30px var(--color-primary-glow);
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: linear-gradient(to right, #fff, #ffcccc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.profile-title {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-sm);
}

.profile-bio {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Links Section */
.links-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    perspective: 1000px;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 1.25rem var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-main);
    text-decoration: none;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    animation: fadeInUp 0.5s ease-out backwards;
}

/* Staggered animation delays handled in JS or Nth-child */
.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:nth-child(7) { animation-delay: 0.7s; }
.link-card:nth-child(8) { animation-delay: 0.8s; }
.link-card:nth-child(9) { animation-delay: 0.9s; }

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.link-card:hover {
    transform: translateY(-4px) translateZ(10px);
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5), var(--shadow-glow);
}

.link-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.link-icon {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    width: 32px;
    text-align: center;
    margin-right: var(--space-lg);
    transition: var(--transition-fast);
}

.link-card:hover .link-icon {
    color: var(--color-primary);
    transform: scale(1.2);
}

.link-text {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Share Button (Action) */
.share-btn {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    transition: var(--transition-fast);
}

.share-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: rotate(15deg);
}

/* Footer */
footer {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-top: var(--space-lg);
    opacity: 0.6;
}

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

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

/* Utilities */
.hidden { display: none; }
.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;
}

/* Responsive */
@media (max-width: 480px) {
    .app-container {
        padding: var(--space-lg) var(--space-md);
    }
    
    .profile-name {
        font-size: 1.75rem;
    }
    
    .link-card {
        padding: 1rem var(--space-md);
    }
}
