:root {
    /* Modern Color Palette */
    --color-background: #0a0a0a;
    --color-surface: #1a1a1a;
    --color-primary: #667eea;
    --color-primary-hover: #764ba2;
    --color-accent: #f093fb;
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-text-muted: #808080;
    --color-border: #333333;
    --color-shadow: rgba(0, 0, 0, 0.5);
    
    /* Spacing System */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Typography */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    
    /* Border Radius */
    --border-radius-sm: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --border-radius-full: 50%;
    
    /* Animations */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
    
    /* Z-index */
    --z-negative: -1;
    --z-normal: 1;
    --z-elevated: 10;
    --z-sticky: 100;
    --z-modal: 1000;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-primary);
    background: linear-gradient(135deg, var(--color-background) 0%, #1a1a2e 100%);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading states */
.profile-img {
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.profile-img[src] {
    opacity: 1;
}

/* Main Content */
main {
    display: grid;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Profile Section */
.profile {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: var(--border-radius-full);
    object-fit: cover;
    object-position: center;
    border: 4px solid var(--color-primary);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
}

.profile-img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(102, 126, 234, 0.5);
}

.profile-name {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.02em;
}

.profile-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.emoji {
    font-style: normal;
    font-size: 1.2em;
}

/* Social Links Section */
.social-section {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-full);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.social-link::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 var(--transition-slow);
}

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

.social-link:hover {
    transform: translateY(-4px) scale(1.1);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.social-icon {
    width: 30px;
    height: 30px;
    transition: all var(--transition-normal);
    z-index: var(--z-normal);
    opacity: 0.9;
    /* Remove problematic filters for now */
}

.social-icon:hover,
.social-link:hover .social-icon {
    opacity: 1;
    transform: scale(1.1);
    /* Remove problematic filters for now */
}

/* Fallback icons for when images fail to load */
.social-link.icon-fallback::before {
    content: attr(data-icon);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--color-text-primary);
    filter: none;
}

/* Links Section */
.links-section {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.links {
    display: grid;
    gap: var(--spacing-md);
    width: 100%;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: var(--color-surface);
    color: var(--color-text-primary);
    text-decoration: none;
    padding: var(--spacing-md);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--color-border);
    transition: all var(--transition-normal);
    font-weight: 500;
    font-size: var(--font-size-base);
    gap: var(--spacing-md);
    position: relative;
    overflow: hidden;
    min-height: 70px;
    backdrop-filter: blur(10px);
}

.link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left var(--transition-slow);
}

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

.link-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    color: var(--color-text-primary);
}

.link-button:active {
    transform: translateY(0);
}

.button-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
    transition: all var(--transition-normal);
    opacity: 0.9;
    display: block;
    /* Remove problematic filters for now */
}

.link-button:hover .button-icon {
    opacity: 1;
    transform: scale(1.05);
    /* Remove problematic filters for now */
}

/* Fallback for button icons */
.link-button.button-fallback::before {
    content: attr(data-icon);
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    filter: none;
    flex-shrink: 0;
}

.link-button.button-fallback .button-fallback-icon {
    display: flex !important;
    font-size: 32px;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-button span {
    flex: 1;
    text-align: left;
    font-weight: 500;
    line-height: 1.4;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    backdrop-filter: blur(10px);
}

footer p {
    margin: 0;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Focus States for Accessibility */
.social-link:focus,
.link-button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Loading Animation */
.profile-img[loading] {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (min-width: 480px) {
    main {
        padding: var(--spacing-xl) var(--spacing-lg);
        gap: var(--spacing-2xl);
    }
    
    .profile-img {
        width: 175px;
        height: 175px;
    }
    
    .profile-name {
        font-size: var(--font-size-4xl);
    }
    
    .profile-description {
        font-size: var(--font-size-xl);
    }
    
    .social-links {
        gap: var(--spacing-xl);
    }
    
    .social-link {
        width: 70px;
        height: 70px;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
    }
    
    .link-button {
        font-size: var(--font-size-lg);
        padding: var(--spacing-lg);
        min-height: 80px;
    }
}

@media (min-width: 768px) {
    main {
        max-width: 700px;
        padding: var(--spacing-2xl);
    }
    
    .profile-img {
        width: 200px;
        height: 200px;
    }
}

@media (min-width: 1024px) {
    main {
        max-width: 800px;
    }
    
    .links {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .link-button:hover {
        transform: translateY(-4px) scale(1.02);
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-img,
    .social-icon,
    .button-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Light mode support - force dark theme for better design */
@media (prefers-color-scheme: light) {
    /* Keep dark theme even in light mode preference for better visual design */
    body {
        background: linear-gradient(135deg, var(--color-background) 0%, #1a1a2e 100%);
    }
}