/* ========================================
   iOS 26 Liquid Glass BioLink
   True Liquid Glass — Not Glassmorphism
   ======================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Liquid Glass — transparent with edge highlights */
    --glass-bg: rgba(120, 120, 130, 0.18);
    --glass-bg-hover: rgba(140, 140, 150, 0.25);
    --glass-blur: 40px;
    --glass-saturation: 1.15;
    --glass-radius: 22px;
    --glass-radius-lg: 28px;

    /* Edge light — the key differentiator from glassmorphism */
    --edge-light: rgba(255, 255, 255, 0.65);
    --edge-light-hover: rgba(255, 255, 255, 0.85);
    --edge-subtle: rgba(255, 255, 255, 0.15);

    /* Text */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.4);

    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background: #0a0a0a;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ========================================
   Background — Bing Daily Wallpaper
   ======================================== */
.wallpaper-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.wallpaper-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1.5s ease;
    opacity: 0;
}

.wallpaper-img.loaded {
    opacity: 1;
}

/* Subtle dark overlay for readability — NOT colored */
.wallpaper-overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, 
            rgba(0,0,0,0.15) 0%, 
            rgba(0,0,0,0.05) 30%,
            rgba(0,0,0,0.1) 70%,
            rgba(0,0,0,0.4) 100%
        );
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 440px;
    margin: 0 auto;
    padding: 50px 20px 40px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 100vh;
}

/* ========================================
   LIQUID GLASS — Core Effect
   This is the TRUE liquid glass, not glassmorphism.
   Key: very transparent, prominent edge glow on top,
   subtle border, background shows through with distortion
   ======================================== */
.liquid-glass {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--edge-subtle);
    border-radius: var(--glass-radius);
    overflow: hidden;
    isolation: isolate;
    transition: all 0.4s var(--transition-smooth);

    /* Drop shadow — like the glass is floating above the background */
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 12px 48px rgba(0, 0, 0, 0.2),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
}

.liquid-glass:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        0 6px 28px rgba(0, 0, 0, 0.35),
        0 16px 56px rgba(0, 0, 0, 0.25),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.15);
}

/* --- Edge Top Glow ---
   THE KEY feature of liquid glass.
   A bright white/warm line at the top edge
   simulating light hitting the glass bevel */
.glass-edge-top {
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 1.5px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 10%,
        rgba(255, 255, 255, 0.45) 25%,
        rgba(255, 245, 210, 0.75) 40%,
        rgba(255, 240, 190, 0.9) 50%,
        rgba(255, 245, 210, 0.75) 60%,
        rgba(255, 255, 255, 0.45) 75%,
        rgba(255, 255, 255, 0.1) 90%,
        transparent 100%
    );
    z-index: 10;
    pointer-events: none;
    transition: all 0.4s ease;
}

/* Warm glow bloom behind the top edge — big soft bloom */
.glass-edge-top::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 10%;
    right: 10%;
    height: 24px;
    background: radial-gradient(
        ellipse at center top,
        rgba(255, 230, 170, 0.25) 0%,
        rgba(255, 240, 200, 0.12) 30%,
        rgba(255, 255, 255, 0.04) 60%,
        transparent 100%
    );
    filter: blur(6px);
}

/* Secondary thin edge line */
.glass-edge-top::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 80%,
        transparent 100%
    );
}

.glass-edge-top.circle {
    left: 15%;
    right: 15%;
    border-radius: 50%;
}

/* --- Edge Bottom (subtle) --- */
.glass-edge-bottom {
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 30%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 70%,
        transparent 100%
    );
    z-index: 10;
    pointer-events: none;
}

/* --- Inner Light Gradient ---
   Subtle top-to-bottom gradient inside the glass  */
.glass-inner-light {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.01) 30%,
        rgba(0, 0, 0, 0.02) 100%
    );
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

/* Hover: brighten the inner light */
.liquid-glass:hover .glass-edge-top {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 15%,
        rgba(255, 255, 255, 0.6) 35%,
        rgba(255, 245, 200, 0.85) 50%,
        rgba(255, 255, 255, 0.6) 65%,
        rgba(255, 255, 255, 0.2) 85%,
        transparent 100%
    );
}

.liquid-glass:hover .glass-inner-light {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.02) 40%,
        rgba(0, 0, 0, 0.02) 100%
    );
}

/* ========================================
   Profile Card
   ======================================== */
.profile-card {
    width: 100%;
    border-radius: var(--glass-radius-lg);
    padding: 36px 28px 24px;
    text-align: center;
    animation: glassAppear 0.8s var(--transition-smooth) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes glassAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Avatar */
.avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.avatar-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.liquid-glass-circle {
    background: rgba(140, 140, 140, 0.2);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 0 0 0.5px rgba(255,255,255,0.08) inset;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 50%;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.avatar-fallback svg {
    width: 100%;
    height: 100%;
}

/* Profile Info */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.profile-handle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.profile-bio {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 6px;
    font-weight: 300;
}

/* Status Pill — small liquid glass */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.72rem;
}

.liquid-glass-pill {
    background: rgba(140, 140, 140, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34C759;
    box-shadow: 0 0 6px rgba(52, 199, 89, 0.5);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* ========================================
   Links Section
   ======================================== */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Link Card */
.link-card {
    display: block;
    text-decoration: none;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    animation: glassAppear 0.7s var(--transition-smooth) forwards;
}

.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.18s; }
.link-card:nth-child(3) { animation-delay: 0.26s; }
.link-card:nth-child(4) { animation-delay: 0.34s; }
.link-card:nth-child(5) { animation-delay: 0.42s; }
.link-card:nth-child(6) { animation-delay: 0.50s; }

.link-card:hover {
    transform: translateY(-2px) scale(1.01);
}

.link-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

/* Link Content */
.link-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    position: relative;
    z-index: 5;
}

.link-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s var(--transition-smooth);
}

.link-icon svg {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
    transition: transform 0.3s var(--transition-spring);
}

.link-card:hover .link-icon {
    background: rgba(255, 255, 255, 0.12);
}

.link-card:hover .link-icon svg {
    transform: scale(1.1);
}

.link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.link-title {
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.link-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.link-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    transition: all 0.3s var(--transition-smooth);
    opacity: 0.5;
}

.link-arrow svg {
    width: 100%;
    height: 100%;
}

.link-card:hover .link-arrow {
    color: var(--text-primary);
    opacity: 1;
    transform: translateX(3px);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    margin-top: 16px;
    text-align: center;
    animation: glassAppear 0.8s var(--transition-smooth) 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.footer p {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 300;
}

.bing-credit {
    margin-bottom: 4px;
    font-style: italic;
    font-size: 0.65rem !important;
    color: var(--text-tertiary);
}

/* ========================================
   Mouse-relative Glow on Glass (added by JS)
   ======================================== */
.liquid-glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        400px circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.06),
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.liquid-glass:hover::after {
    opacity: 1;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .container {
        padding: 35px 16px 30px;
    }

    .profile-card {
        padding: 28px 20px 20px;
        border-radius: 22px;
    }

    .link-card {
        border-radius: 18px;
    }

    .profile-name {
        font-size: 1.4rem;
    }

    .link-content {
        padding: 12px 14px;
        gap: 12px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

/* Focus */
.link-card:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
