:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-youtube: #ff0000;
    --accent-instagram: #e4405f;
    --accent-telegram: #0088cc;
    --accent-linkedin: #0077b5;
    --accent-substack: #ff6719;
    --accent-mentor: #6366f1;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --card-bg: rgba(0, 0, 0, 0.03);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-hover: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .background-gradient {
    background: radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.9) 0%, transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(248, 248, 248, 0.9) 0%, transparent 50%);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top left, rgba(30, 30, 40, 0.8) 0%, transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(20, 20, 30, 0.8) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    background: var(--card-hover);
    border-color: var(--text-primary);
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

.profile-section {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.netology-link {
    color: inherit;
}

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

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.avatar img {
    width: 110%;
    height: 100%;
}

.avatar-container:hover .avatar {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.status-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    animation: pulse 2s infinite;
}

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

.profile-info {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.bio {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 400;
    opacity: 0.8;
    max-width: 400px;
    margin: 0 auto;
}

.links-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-card:hover {
    transform: translateY(-2px);
    background: var(--card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.link-card:hover::before {
    opacity: 1;
}

.link-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.link-icon svg {
    width: 24px;
    height: 24px;
}

.link-card.youtube .link-icon {
    background: rgba(255, 0, 0, 0.15);
    color: var(--accent-youtube);
}

.link-card.instagram .link-icon {
    background: rgba(228, 64, 95, 0.15);
    color: var(--accent-instagram);
}

.link-card.telegram .link-icon {
    background: rgba(0, 136, 204, 0.15);
    color: var(--accent-telegram);
}

.link-card.linkedin .link-icon {
    background: rgba(0, 119, 181, 0.15);
    color: var(--accent-linkedin);
}

.link-card.substack .link-icon {
    background: rgba(255, 103, 25, 0.15);
    color: var(--accent-substack);
}

.link-card.mentor .link-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-mentor);
}

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

.link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.link-title {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.link-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.link-arrow {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-left: 1rem;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.link-card:hover .link-arrow {
    transform: translateX(4px);
    opacity: 1;
    color: var(--text-primary);
}

.footer {
    margin-top: auto;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 1rem;
    line-height: 1.5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.copyright {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    opacity: 0.5;
    font-weight: 400;
}

@media (max-width: 640px) {
    .container {
        padding: 2rem 1rem;
    }

    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1rem;
    }

    .bio {
        font-size: 0.875rem;
    }

    .link-card {
        padding: 1rem 1.25rem;
    }

    .link-icon {
        width: 44px;
        height: 44px;
        margin-right: 0.875rem;
    }

    .link-icon svg {
        width: 22px;
        height: 22px;
    }

    .link-title {
        font-size: 1rem;
    }

    .link-description {
        font-size: 0.8125rem;
    }

    .disclaimer {
        font-size: 0.6875rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 400px) {
    .avatar {
        width: 100px;
        height: 100px;
    }

    .avatar svg {
        width: 50px;
        height: 50px;
    }

    .name {
        font-size: 1.75rem;
    }
}

@media (hover: none) {
    .link-card:hover {
        transform: none;
    }

    .link-card:active {
        transform: scale(0.98);
    }

    .link-arrow {
        opacity: 1;
    }
}
