/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 12px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 600px;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 4rem 3rem;
    margin: 0 auto;
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 4rem;
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.tagline {
    font-size: 1.25rem;
    color: #666;
    font-weight: 400;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.025em;
}

/* Bio Section */
.bio-section {
    margin-bottom: 4rem;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    text-align: center;
    max-width: 500px;
    margin: 10px auto;
}

/* Links Section */
.links-section {
    margin-bottom: 4rem;
}

.links-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 200px;
    margin: 1rem auto 0;
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.link-card:hover {
    background: #ffffff;
    border-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.link-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

/* Footer */
.footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.footer-text {
    font-size: 0.9rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .container {
        padding: 3rem 2rem;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .bio-text {
        font-size: 1rem;
    }
    
    .links-grid {
        gap: 0.8rem;
        max-width: 160px;
    }

    .link-card {
        width: 40px;
        height: 40px;
        padding: 0.8rem;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .name {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .avatar {
        width: 60px;
        height: 60px;
    }
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.theme-toggle:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* Light Mode (Default) */
.light-mode {
    background-color: #fafafa;
    color: #333;
}

.light-mode .container {
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.light-mode .theme-toggle {
    background: #f8f9fa;
    color: #333;
}

.light-mode .moon-icon {
    display: none;
}

.light-mode .sun-icon {
    display: block;
}

.light-mode .link-card {
    background: #f8f9fa;
    color: #333;
}

.light-mode .link-card:hover {
    background: #ffffff;
    border-color: #e9ecef;
}

/* Dark Mode */
.dark-mode {
    background-color: #1a1a1a;
    color: #e4e4e4;
}

.dark-mode .container {
    background: #2d2d2d;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.dark-mode .name {
    color: #ffffff;
}

.dark-mode .section-title {
    color: #ffffff;
}

.dark-mode .tagline {
    color: #b0b0b0;
}

.dark-mode .bio-text {
    color: #c4c4c4;
}

.dark-mode .theme-toggle {
    background: #3a3a3a;
    color: #e4e4e4;
}

.dark-mode .sun-icon {
    display: none;
}

.dark-mode .moon-icon {
    display: block;
}

.dark-mode .link-card {
    background: #3a3a3a;
    color: #e4e4e4;
}

.dark-mode .link-card:hover {
    background: #4a4a4a;
    border-color: #555;
}

.dark-mode .footer {
    border-top-color: #444;
}

.dark-mode .footer-text {
    color: #b0b0b0;
}

/* Focus States for Accessibility */
.link-card:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        box-shadow: none;
        padding: 2rem;
    }
    
    .link-card {
        background: transparent;
        border: 1px solid #ccc;
    }
}
