:root {
         --bg: #000000;
         --card-bg: #000000;
         --card-border: #333333;
         --card-hover: #111111;
         --text-main: #ffffff;
         --text-muted: #888888;
     }

     * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

     body {
         background-color: var(--bg);
         color: var(--text-main);
         font-family: 'Inter', sans-serif;
         margin: 0;
         height: 100vh;
         overflow: hidden;
         padding: 20px;
         display: flex;
         flex-direction: column;
         align-items: center;
         justify-content: center;
     }

     @media (max-height: 750px) {
         body { height: auto; min-height: 100vh; overflow-y: auto; padding: 40px 20px; }
     }

     .container {
         width: 100%;
         max-width: 400px;
         display: flex;
         flex-direction: column;
         gap: 16px;
         position: relative;
     }

     /* --- TOP BAR --- */
     .top-bar {
         display: flex;
         justify-content: flex-end;
         margin-bottom: -15px;
         padding-right: 5px;
         z-index: 10;
     }

     .lang-toggle {
         position: relative;
         display: flex;
         background: #111;
         border: 1px solid #333;
         border-radius: 30px;
         padding: 4px;
         cursor: pointer;
         width: 80px;
         height: 32px;
     }

     .lang-glider {
         position: absolute;
         top: 4px;
         left: 4px;
         width: 34px;
         height: 22px;
         background: #fff;
         border-radius: 20px;
         transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
         z-index: 1;
     }

     .lang-opt {
         flex: 1;
         text-align: center;
         font-size: 0.7rem;
         font-weight: 700;
         color: #666;
         z-index: 2;
         line-height: 22px;
         transition: color 0.3s;
         user-select: none;
     }

     /* Классы для состояния переключателя */
     .lang-toggle.ru .lang-glider { transform: translateX(0); }
     .lang-toggle.ru .opt-ru { color: #000; }
     .lang-toggle.en .lang-glider { transform: translateX(36px); }
     .lang-toggle.en .opt-en { color: #000; }

     .blur-animate { 
         animation: textBlur 0.4s ease forwards; 
         will-change: filter, opacity;
         backface-visibility: hidden;
     }
     @keyframes textBlur {
         0% { filter: blur(0); opacity: 1; }
         40% { filter: blur(4px); opacity: 0.5; }
         100% { filter: blur(0); opacity: 1; }
     }

     /* --- PROFILE HEADER --- */
     .profile-header {
         display: flex;
         align-items: center;
         gap: 20px;
         margin-bottom: 10px;
         padding: 10px;
         border-radius: 16px;
         transition: 0.2s;
         cursor: pointer;
         border: 1px solid transparent;
     }
     .profile-header:hover { background: #0a0a0a; border-color: #222; }

     .avatar {
         width: 70px;
         height: 70px;
         border-radius: 50%;
         background: #000;
         border: 1px solid #333;
         display: flex;
         align-items: center;
         justify-content: center;
         font-size: 1.5rem;
         color: #555;
         flex-shrink: 0;
         overflow: hidden;
     }

     .profile-info h1 {
         font-size: 1.3rem;
         font-weight: 700;
         margin: 0 0 4px 0;
         color: #fff;
         display: flex;
         align-items: center;
         gap: 8px;
     }
     .profile-expand-icon { font-size: 0.8rem; color: #444; }
     .profile-info p { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.4; }

     /* --- CARDS --- */
     .card {
         background: var(--card-bg);
         border: 1px solid var(--card-border);
         border-radius: 16px;
         padding: 20px;
         text-decoration: none;
         color: inherit;
         position: relative;
         display: flex;
         flex-direction: column;
         justify-content: center;
         transition: background 0.3s, border-color 0.3s, transform 0.3s;
     }
     .card:hover { background: var(--card-hover); border-color: #555; transform: translateY(-2px); }

     .stack-card {
         flex-direction: row; justify-content: space-between; align-items: center;
         cursor: pointer; overflow: hidden; border: 1px dashed #333;
     }
     .stack-card:hover { border-color: #666; background: #0a0a0a; }

     .stack-info { display: flex; flex-direction: column; gap: 8px; max-width: 70%; }
     .stack-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: #fff; font-weight: 700; }

     .tags-container {
         display: flex; gap: 6px; flex-wrap: wrap; opacity: 0.6;
         mask-image: linear-gradient(to right, black 60%, transparent 100%);
         -webkit-mask-image: linear-gradient(to right, black 60%, transparent 100%);
     }
     .tech-tag {
         font-size: 0.7rem; color: #aaa; background: #1a1a1a;
         padding: 2px 6px; border-radius: 4px; white-space: nowrap;
     }

     .stack-action-btn {
         width: 32px; height: 32px; border-radius: 50%; border: 1px solid #333;
         display: flex; align-items: center; justify-content: center; transition: 0.3s; color: #444;
     }
     .stack-card:hover .stack-action-btn { background: #fff; border-color: #fff; color: #000; transform: rotate(-45deg); }

     /* --- GITHUB SPECIAL CARD --- */
     .github-card {
         flex-direction: row;
         align-items: center;
         justify-content: space-between;
         /* Фирменный темный цвет GitHub */
         background: #0d1117; 
         border: 1px solid #30363d;
         transition: all 0.3s ease;
         margin-top: 5px; 
     }
     .github-card:hover {
         border-color: #58a6ff;
         box-shadow: 0 0 15px rgba(88, 166, 255, 0.1);
         transform: translateY(-2px);
     }
     .gh-content { display: flex; align-items: center; gap: 15px; }
     .gh-icon { font-size: 2rem; color: #fff; }
     .gh-info { display: flex; flex-direction: column; }
     .gh-title { font-weight: 700; font-size: 1rem; color: #fff; }
     .gh-desc { font-size: 0.75rem; color: #8b949e; }
     .gh-arrow { color: #8b949e; transition: 0.3s; }
     .github-card:hover .gh-arrow { color: #58a6ff; transform: translate(3px, -3px); }

     /* --- FOOTER --- */
     .footer-label {
         text-align: center; color: #666; font-size: 0.75rem;
         text-transform: uppercase; letter-spacing: 1px;
         margin-top: 20px; margin-bottom: 15px;
     }
     .footer-socials { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
     .social-mini {
         color: #444; font-size: 1.3rem; transition: 0.2s; text-decoration: none;
         display: flex; align-items: center; justify-content: center;
     }
     .social-mini:hover { color: #fff; transform: scale(1.15); }
     .copyright { margin-top: 30px; font-size: 0.75rem; color: #333; text-align: center; }

     /* --- MODALS --- */
     .modal-overlay {
         position: fixed; top: 0; left: 0; width: 100%; height: 100%;
         background: rgba(0,0,0,0.92); backdrop-filter: blur(8px);
         display: flex; align-items: center; justify-content: center;
         opacity: 0; pointer-events: none; transition: 0.3s; z-index: 100;
     }
     .modal-overlay.active { opacity: 1; pointer-events: all; }
     .modal-content {
         background: #000; border: 1px solid #333; padding: 30px;
         border-radius: 24px; text-align: left; transform: scale(0.95);
         transition: 0.3s; width: 90%; max-width: 500px;
         box-shadow: 0 0 40px rgba(255,255,255,0.03); position: relative;
         max-height: 90vh; overflow-y: auto;
     }
     .modal-overlay.active .modal-content { transform: scale(1); }
     .modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 25px; color: #fff; text-align: center; }
     .close-modal-btn {
         position: absolute; top: 15px; right: 15px; background: none; border: none;
         color: #444; cursor: pointer; font-size: 1.2rem; transition: 0.2s; z-index: 5;
     }
     .close-modal-btn:hover { color: #fff; }

     .project-item {
         display: flex; flex-direction: column; padding: 15px 12px; border-radius: 12px;
         transition: 0.2s; text-decoration: none; color: inherit;
         background: #080808; border: 1px solid #1a1a1a; margin-bottom: 10px;
     }
     .project-item:hover { background: #151515; border-color: #333; }
     .project-item h4 { margin: 0 0 5px 0; font-weight: 600; color: #fff; display: flex; align-items: center; justify-content: space-between; }
     .project-item h4 i { color: #444; font-size: 0.9rem; }
     .project-item:hover h4 i { color: #fff; }
     .project-item p { margin: 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

     .category-title {
         color: #666; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
         margin-bottom: 10px; margin-top: 20px; border-bottom: 1px solid #222; padding-bottom: 5px;
     }
     .category-title:first-child { margin-top: 0; }
     
     .stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
     .stack-item {
         display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px;
         border-radius: 12px; transition: 0.2s; color: #888; background: #080808; border: 1px solid #1a1a1a;
     }
     .stack-item:hover { background: #151515; color: #fff; border-color: #333; }
     .stack-item i { font-size: 1.5rem; }
     .stack-item span { font-size: 0.7rem; font-weight: 500; text-align: center; }

     .profile-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #222; }
     .profile-row:last-child { border-bottom: none; }
     .p-label { color: #888; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
     .p-value { color: #fff; font-weight: 600; font-size: 0.95rem; text-align: right; max-width: 60%; line-height: 1.25; }

     /* --- MOBILE FIXES (Исправление скролла) --- */
     @media (max-width: 480px) {
         /* Компактная модалка */
         .modal-content { padding: 20px 12px; width: 95%; max-height: 85vh; border-radius: 20px; }
         .modal-title { margin-bottom: 15px; font-size: 1.1rem; }
         
         /* Умная сетка: 3 колонки вместо 4 */
         .stack-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
         
         /* Уменьшаем элементы внутри стека */
         .stack-item { padding: 8px 4px; gap: 4px; border-radius: 8px; }
         .stack-item i { font-size: 1.1rem; }
         .stack-item span { font-size: 0.6rem; line-height: 1; }
         
         /* Проекты и категории компактнее */
         .project-item { padding: 10px; margin-bottom: 8px; }
         .project-item h4 { font-size: 0.9rem; }
         .project-item p { font-size: 0.8rem; }
         .category-title { margin-top: 12px; margin-bottom: 8px; font-size: 0.7rem; }
     }