/* --- СВЕТЛАЯ ТЕМА С СИНИМ АКЦЕНТОМ --- */
:root {
    --bg-color: #FAFAFA;       
    --text-main: #0F0F0F;      
    --text-muted: #666666;     
    --border-color: #E5E5E5;   
    
    --accent-color: #0055FF;   
    --accent-light: rgba(0, 85, 255, 0.1); 
    /* Цвет маркера (можно сделать желтым #FFD700 или оставить фирменным синим) */
    --marker-color: rgba(0, 85, 255, 0.15); 
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

/* --- КАСТОМНОЕ ВЫДЕЛЕНИЕ ТЕКСТА (SELECTION) --- */
::selection {
    background-color: var(--accent-color); /* Синий фон */
    color: #ffffff;                        /* Белый текст */
}

/* Для Safari/Webkit */
::-moz-selection {
    background-color: var(--accent-color);
    color: #ffffff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a, button {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    background: none;
    border: none;
    outline: none;
}

/* --- СИНИЙ КУРСОР --- */
.cursor-dot {
    width: 6px; height: 6px; 
    background-color: var(--accent-color);
    position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
    border-radius: 50%; z-index: 9999; pointer-events: none;
}

.cursor-outline {
    width: 40px; height: 40px; 
    border: 2px solid var(--accent-color);
    position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
    border-radius: 50%; z-index: 9998; pointer-events: none;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-outline.hovered {
    width: 60px; height: 60px; 
    background-color: var(--accent-light); 
}
.cursor-dot.hovered { opacity: 0; }

/* --- HEADER --- */
.ui-layer {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 20px 40px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-left { display: flex; gap: 8px; }

.pill-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 40px;
    cursor: none;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.04);
}

.pill-btn:hover { color: var(--text-main); background: rgba(0,0,0,0.08); }
.pill-btn.active { background-color: var(--accent-color); color: #ffffff; }

.nav-center {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.nav-center .name { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--text-main); }
.nav-center .nickname { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

.nav-right { display: flex; gap: 10px; }
.social-icon { font-size: 1.3rem; padding: 8px; color: var(--text-main); transition: 0.3s; }
.social-icon:hover { color: var(--accent-color); transform: translateY(-2px); }

/* --- ПЕРЕХОДЫ --- */
.tab-content { display: none; opacity: 0; }
.active-view { display: block; animation: revealPage 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes revealPage { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

/* --- MAIN & HERO --- */
main { flex: 1; padding-top: 100px; }

.grid-header { margin-bottom: 20px; }
.section-label { font-size: 1.2rem; font-weight: 700; color: var(--text-main); margin-bottom: 20px; }

.hero-section { 
    width: 100%; 
    aspect-ratio: 16/9; 
    border-radius: 24px; 
    overflow: hidden; 
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
    margin-bottom: 60px;
}

.video-bg { width: 100%; height: 100%; position: relative; }
.video-bg video { width: 100%; height: 100%; object-fit: cover; }

.play-hint {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: var(--accent-color); color: white;
    width: 80px; height: 80px; 
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem;
    padding-left: 5px; 
    opacity: 0; transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 20px rgba(0, 85, 255, 0.3);
}
.hero-section:hover .play-hint { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.play-hint:hover { transform: translate(-50%, -50%) scale(1.1) !important; background: #0044cc; }

/* --- СЕТКА РАБОТ --- */
.grid-section { padding-bottom: 120px; position: relative; z-index: 10; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

.grid-wrapper { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }

.thumb { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 15px; border-radius: 16px; background: #e5e5e5; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.grid-item:hover .thumb img { transform: scale(1.03); }

.info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; transition: color 0.3s; }
.info p { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.grid-item:hover .info h3 { color: var(--accent-color); }

/* --- ABOUT SECTION --- */
.cv-container { max-width: 800px; padding-top: 60px; padding-bottom: 100px; }

/* 
========================================
   ЭФФЕКТ "МАРКЕРА" (HIGHLIGHT ON HOVER) 
========================================
*/
.large-text { 
    font-size: 2.2rem; 
    line-height: 1.4; 
    font-weight: 500; 
    letter-spacing: -0.02em; 
    margin-bottom: 80px; 
    color: var(--text-main); 
    
    /* Магия маркера */
    /* Рисуем прозрачный фон, который снизу заполнен цветом маркера */
    background-image: linear-gradient(transparent 60%, var(--marker-color) 60%);
    background-size: 0% 100%; /* Изначально ширина заливки 0% */
    background-repeat: no-repeat;
    /* transition управляет тем, как быстро закрашивается текст */
    transition: background-size 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    
    display: inline; /* Важно, чтобы фон облегал текст по строкам */
}

/* При наведении ширина заливки становится 100% */
.large-text:hover {
    background-size: 100% 100%;
}

.cv-section { margin-bottom: 60px; border-top: 1px solid var(--border-color); padding-top: 30px; }
.section-title { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 30px; }

.skills-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.skill-category h3 { font-size: 1rem; font-weight: 600; margin-bottom: 15px; color: var(--text-main); }
.skills-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }

.skills-list li { 
    background: #ffffff;
    border: 1px solid var(--border-color); 
    padding: 10px 20px; 
    font-size: 0.9rem; 
    font-weight: 600;
    border-radius: 40px; 
    color: var(--text-muted);
    transition: 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.skills-list li:hover { background-color: var(--accent-color); color: #ffffff; border-color: var(--accent-color); transform: translateY(-2px); }

.job-block { margin-bottom: 40px; }
.job-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.job-header h3 { font-size: 1.4rem; font-weight: 700; transition: color 0.3s; }
.job-header h3 span { color: var(--accent-color); opacity: 0; transition: 0.3s; }
.date { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.job-company { font-size: 1rem; font-weight: 600; color: var(--text-main); margin-bottom: 10px; }
.job-desc { font-size: 1rem; color: var(--text-muted); line-height: 1.6; max-width: 600px; font-weight: 500; }
.job-block:hover h3 { color: var(--accent-color); }
.job-block:hover h3 span { opacity: 1; transform: translateX(5px); display: inline-block; }

.additional-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.additional-item h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 5px; color: var(--text-main); }
.additional-item p { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.additional-item .sub-info { font-size: 0.85rem; margin-top: 2px; }

/* --- FOOTER (По левому краю) --- */
footer { 
    border-top: 1px solid var(--border-color); 
    padding: 80px 0 40px; 
    background-color: var(--bg-color); 
}

.footer-content { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    justify-content: flex-start;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-label { 
    display: block; 
    font-weight: 600; 
    font-size: 1.1rem; 
    color: var(--text-main); 
    margin-bottom: 25px; 
}

.footer-contacts-row {
    display: flex;
    align-items: center;
    gap: 20px; 
    margin-bottom: 40px; 
    flex-wrap: wrap; 
}

.contact-pill {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    transition: 0.3s;
    cursor: none;
}

.contact-pill:hover { 
    background-color: var(--accent-color); 
    color: #ffffff; 
    border-color: var(--accent-color); 
    transform: translateY(-2px);
}

.footer-socials { 
    display: flex; 
    gap: 15px; 
    font-size: 1.5rem; 
    align-items: center;
}

.social-icon-large { 
    color: var(--text-muted); 
    transition: 0.3s; 
    padding: 10px; 
    cursor: none;
    display: flex;
    align-items: center;
}

.social-icon-large:hover { 
    color: var(--accent-color); 
    transform: translateY(-3px); 
}

.legal-text { 
    font-size: 9px; 
    color: var(--text-muted); 
    opacity: 0.4; 
    max-width: 500px;
    text-align: left; 
    line-height: 1.5;
}

/* MOBILE */
@media (max-width: 768px) {
    header.ui-layer { padding: 15px 20px; flex-direction: column; align-items: center; gap: 15px; background: rgba(250,250,250,0.95); }
    .nav-center { position: relative; transform: none; left: auto; }
    .nav-right { position: absolute; top: 15px; right: 20px; }
    
    main { padding-top: 130px; }
    .hero-section { border-radius: 12px; margin-bottom: 40px; }
    .grid-wrapper { grid-template-columns: 1fr; }
    .skills-wrapper, .additional-grid { grid-template-columns: 1fr; gap: 30px; }
    .large-text { font-size: 1.6rem; }
    
    .footer-contacts-row { flex-direction: column; align-items: flex-start; gap: 20px; }
    .legal-text { padding: 0; }
    
    .cursor-dot, .cursor-outline { display: none; }
    * { cursor: auto; }
}