:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #eef1f4;
    --border-default: #d1d9e0;
    --border-muted: #e1e4e8;
    --text-primary: #1f2328;
    --text-secondary: #59636e;
    --text-muted: #8c959f;
    --accent-green: #1a7f37;
    --accent-blue: #0969da;
    --accent-purple: #8250df;
    --accent-orange: #bf8700;
    --accent-red: #d1242f;
    --accent-pink: #bf3989;
    --accent-cyan: #0891b2;
    --accent-yellow: #9a6700;
    --shadow-sm: 0 1px 2px rgba(31, 35, 40, 0.04);
    --shadow-md: 0 3px 6px rgba(31, 35, 40, 0.08);
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #010409;
    --bg-tertiary: #161b22;
    --border-default: #30363d;
    --border-muted: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #8d96a0;
    --text-muted: #636c76;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 768px;
    margin: 0 auto;
    padding: 90px 0px;
    position: relative;
}

/* Switchers Container */
.switchers-container {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 8px;
    padding: 0 12px;
    height: 40px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    min-width: 70px;
    justify-content: space-between;
}

.lang-current:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-default);
}

.lang-arrow {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 8px;
    padding: 4px;
    min-width: 100px;
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    text-align: left;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.lang-btn.active {
    color: var(--bg-primary);
    background: var(--accent-blue);
}

/* Theme Switcher */
.theme-switcher {
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.theme-switcher:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-default);
    transform: translateY(-1px);
}

.theme-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    fill: none;
}

/* Light bulb OFF state (light theme) */
[data-theme="light"] .theme-icon,
:root:not([data-theme]) .theme-icon {
    color: var(--text-muted);
    fill: none;
}

[data-theme="light"] .theme-switcher:hover .theme-icon,
:root:not([data-theme]) .theme-switcher:hover .theme-icon {
    color: var(--text-secondary);
}

/* Light bulb ON state (dark theme) */
[data-theme="dark"] .theme-icon {
    color: #fbbf24;
    fill: #fef3c7;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.4));
}

[data-theme="dark"] .theme-switcher:hover .theme-icon {
    color: #f59e0b;
    fill: #fef3c7;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}

/* Header */
.profile {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
}

.profile-logo::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #00d4ff 0%, #1ec9e8 25%, #fd8c00 50%, #ff6b35 75%, #00d4ff 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateBorder 3s linear infinite;
}

@keyframes rotateBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.profile-logo:hover img {
    transform: scale(1.05);
}

[data-theme="dark"] .profile-logo img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.username {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.verified {
    width: 20px;
    height: 20px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.verified svg {
    width: 12px;
    height: 12px;
    fill: white;
}

.bio {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-muted);
    white-space: nowrap;
}

.stat-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-blue);
}

/* About Section */
.about-wrapper {
    margin-top: 40px;
}

.about-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0 0 0;
}

.about-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-highlight {
    color: var(--text-primary) !important;
    font-weight: 600;
}

/* Experience Stats */
.experience-section {
    margin-top: 40px;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.experience-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.experience-item::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0.04;
    transition: all 0.3s ease;
    z-index: 0;
}

.experience-item:nth-child(1)::before {
    background: url('data:image/svg+xml,<svg viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492zM5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0z"/><path d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 0 1-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 0 1-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 0 1 .52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 0 1 1.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 0 1 1.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 0 1 .52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 0 1-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 0 1-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 0 0 2.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 0 0 1.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 0 0-1.115 2.693l.16.291c.415.764-.42 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 0 0-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 0 0-2.692-1.115l-.292.16c-.764.415-1.6-.42-1.184-1.185l.159-.291A1.873 1.873 0 0 0 1.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 0 0 3.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 0 0 2.692-1.115l.094-.319z"/></svg>') center / contain no-repeat;
}

.experience-item:nth-child(2)::before {
    background: url('data:image/svg+xml,<svg viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.828 1.828l1.937.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.828l-.645 1.937a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828l.645-1.937zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.734 1.734 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69a1.734 1.734 0 0 0-1.097-1.097l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.734 1.734 0 0 0 3.407 2.31l.387-1.162zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L10.863.1z"/></svg>') center / contain no-repeat;
}

.experience-item:nth-child(3)::before {
    background: url('data:image/svg+xml,<svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M12 0L1.608 6v12L12 24l10.392-6V6L12 0zm-1.5 17.52l-4.5-2.6V9.08l4.5 2.6v5.84zm.75-7.02L6.75 7.9 12 5.3l5.25 2.6-5.25 2.6h-.75zm6 4.42l-4.5 2.6v-5.84l4.5-2.6v5.84z"/></svg>') center / contain no-repeat;
}

.experience-item:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.experience-item:hover::before {
    opacity: 0.08;
    transform: scale(1.1) rotate(5deg);
}

.experience-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-blue);
    filter: drop-shadow(0 2px 4px rgba(9, 105, 218, 0.2));
    position: relative;
    z-index: 1;
}

.experience-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.experience-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Links Section */
.links-section {
    margin-top: 40px;
}

/* Tech Stack */
.tech-section {
    margin-top: 28px;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.tech-item:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.tech-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.tech-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.tech-icon-font {
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-icon-img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.section-header {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-muted);
}

.section-intro {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-left: 4px;
    font-style: italic;
}

/* Collapsible section */
.section-header.collapsible {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.section-header.collapsible:hover {
    color: var(--accent-blue);
}

.section-header.collapsible::after {
    display: none;
}

.collapse-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.section-header.collapsible.active .collapse-icon {
    transform: rotate(180deg);
}

.solutions-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}

.solutions-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Link Cards */
.link-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    animation: cardReveal 0.4s ease-out backwards;
}

.link-card:nth-child(1) { animation-delay: 0.05s; }
.link-card:nth-child(2) { animation-delay: 0.1s; }
.link-card:nth-child(3) { animation-delay: 0.15s; }
.link-card:nth-child(4) { animation-delay: 0.2s; }
.link-card:nth-child(5) { animation-delay: 0.25s; }
.link-card:nth-child(6) { animation-delay: 0.3s; }
.link-card:nth-child(7) { animation-delay: 0.35s; }
.link-card:nth-child(8) { animation-delay: 0.4s; }
.link-card:nth-child(9) { animation-delay: 0.45s; }
.link-card:nth-child(10) { animation-delay: 0.5s; }

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

.link-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.link-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--card-accent, var(--accent-green));
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    border: 1px solid var(--border-muted);
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.link-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.link-arrow {
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
    flex-shrink: 0;
    align-self: center;
}

.link-card:hover .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Telegram CTA */
.telegram-cta {
    background: linear-gradient(135deg, #229ED9 0%, #1a8bc7 100%);
    border: none;
    margin-top: 24px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(34, 158, 217, 0.3);
}

.telegram-cta:hover {
    box-shadow: 0 6px 20px rgba(34, 158, 217, 0.4);
}

.telegram-cta::before {
    display: none;
}

.telegram-cta .link-icon {
    background: rgba(255,255,255,0.2);
    border: none;
}

.telegram-cta .link-title {
    color: white;
}

.telegram-cta .link-description {
    color: rgba(255,255,255,0.9);
}

.telegram-cta .link-arrow {
    color: white;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-muted);
    text-align: center;
    animation: fadeIn 0.6s ease-out 0.5s backwards;
}

.footer-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 32px 16px;
        padding-top: 56px;
    }
    
    .username {
        font-size: 24px;
    }

    .link-card {
        padding: 14px;
    }

    .link-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .link-title {
        font-size: 14px;
    }

    .link-description {
        font-size: 12px;
    }

    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Solutions Grid */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.solution-card-new {
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    padding: 14px;
    transition: all 0.2s ease;
}

.solution-card-new:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.solution-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.solution-emoji {
    font-size: 20px;
    line-height: 1;
}

.solution-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.solution-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    padding-left: 37px;
}

@media (max-width: 480px) {
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .solution-card-new {
        padding: 12px;
    }
}
