/* === ОСНОВНЫЕ ПЕРЕМЕННЫЕ === */
:root {
	--index: calc(1vw + 1.2vh);
	--transition: 1.5s cubic-bezier(.05, .5, 0, 1);
	--glass-bg: rgba(0, 0, 0, 0.55);
	--glass-border: rgba(255, 255, 255, 0.15);
	--text-color: #ffffff;
	--accent: #a5d8ff;
	--accent2: #4dabf7;
}

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

@font-face {
	font-family: 'kamerik-3d';
	src: url('fonts/kamerik205-heavy.woff2') format('woff2');
	font-weight: 900;
}
@font-face {
	font-family: 'merriweather-italic';
	src: url('fonts/merriweather-regular-italic.woff2') format('woff2');
}

body {
	background-color: #000;
	color: var(--text-color);
	font-family: 'merriweather-italic', serif;
	overflow-x: hidden;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	font-size: calc(var(--index) * 0.7);
}

/* 3D СЦЕНА (ФОН) */
.layers {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	perspective: 1000px;
	overflow: hidden;
}
.layers__container {
	height: 100vh;
	min-height: 500px;
	transform-style: preserve-3d;
	transform: rotateX(var(--move-y, 0deg)) rotateY(var(--move-x, 0deg));
	will-change: transform;
	transition: transform var(--transition);
}
.layers__item {
	position: absolute;
	inset: -5vw;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
}
.layer-1 { transform: translateZ(-55px) scale(1.06); }
.layer-2 { transform: translateZ(80px) scale(0.88); }
.layer-4 { transform: translateZ(190px) scale(0.9); }
.layer-5 { transform: translateZ(300px) scale(0.9); }
.layer-6 { transform: translateZ(380px); }

canvas.rain {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* ОСНОВНОЙ КОНТЕЙНЕР */
.main-content {
	position: relative;
	z-index: 1;
	padding: calc(var(--index) * 3) 5vw;
}
.container {
	max-width: 1200px;
	margin: 0 auto;
}

/* СТЕКЛЯННАЯ КАРТОЧКА */
.glass-card {
	background: var(--glass-bg);
	backdrop-filter: blur(12px);
	border-radius: calc(var(--index) * 1.8);
	border: 1px solid var(--glass-border);
	padding: calc(var(--index) * 2.2);
	margin-bottom: calc(var(--index) * 2.5);
	box-shadow: 0 20px 40px rgba(0,0,0,0.5);
	transition: transform 0.3s ease;
}
.glass-card:hover {
	transform: translateY(-4px);
}

/* ШАПКА ПРОФИЛЯ */
.profile-header {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	align-items: center;
}
.avatar-section {
    position: relative;
    display: inline-block;
}
.avatar-wrapper {
	position: relative;
	width: calc(var(--index) * 12);
	height: calc(var(--index) * 12);
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid var(--accent);
	flex-shrink: 0;
	margin: 0 auto;
}
.avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.online-status {
    position: absolute;
    bottom: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: calc(var(--index) * 0.6);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulseOnline 2s infinite;
    z-index: 2;
}
@keyframes pulseOnline {
    0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scale(1.03); }
}

.profile-info {
	flex: 1;
}
.name {
	font-family: 'kamerik-3d', sans-serif;
	font-size: calc(var(--index) * 3.2);
	line-height: 1.1;
}
.highlight {
	color: var(--accent);
}
.subtitle {
	font-size: calc(var(--index) * 1.1);
	margin: 0.5rem 0 1rem;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}
.typing-text {
	color: var(--accent);
	font-weight: 600;
}
.cursor {
	animation: blink 1s infinite;
	color: var(--accent);
}
@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:0; } }

.badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-bottom: 1.5rem;
}
.badge {
	padding: 0.5rem 1.2rem;
	border-radius: 30px;
	font-size: calc(var(--index) * 0.65);
	background: rgba(255,255,255,0.1);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.badge i { font-size: 1em; }
.badge-experience { background: rgba(245,158,11,0.2); color: #f59e0b; }
.badge-fullstack { background: rgba(164,176,202,0.2); color: #c4d0e0; }
.badge-game { background: rgba(80,64,117,0.2); color: #c084fc; }

.contacts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}
.contact-item {
	background: rgba(255,255,255,0.1);
	padding: 0.8rem 1rem;
	border-radius: 10px;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	font-size: calc(var(--index) * 0.7);
	cursor: pointer;
	position: relative;
}
.contact-item i { width: 22px; color: var(--accent); font-size: 1.2em; }
.contact-link { color: white; text-decoration: none; }
.contact-link:hover { text-decoration: underline; }
.copy-hint {
	position: absolute;
	left: 0;
	bottom: -36px;
	background: black;
	padding: 0.3rem 0.7rem;
	border-radius: 4px;
	font-size: 0.8em;
	opacity: 0;
	visibility: hidden;
	transition: 0.2s;
}
.contact-item:hover .copy-hint { opacity: 1; visibility: visible; }
.contact-link, .contact-item span {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.contact-item {
    max-width: 100%;
}

/* СЕТКА КОНТЕНТА */
.content-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: calc(var(--index) * 2);
}
@media (min-width: 992px) {
	.content-grid { grid-template-columns: 1fr 1.2fr; }
}

/* СЕКЦИИ */
.section h2 {
	font-family: 'kamerik-3d', sans-serif;
	font-size: calc(var(--index) * 2);
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 0.8rem;
}
.section h2 i { color: var(--accent); font-size: 1.3em; }

.intro {
	font-size: calc(var(--index) * 0.85);
	margin-bottom: 1.5rem;
}

.stats {
	display: flex;
	justify-content: space-around;
	text-align: center;
}
.stat span {
	display: block;
	font-family: 'kamerik-3d', sans-serif;
	font-size: calc(var(--index) * 2.2);
	color: var(--accent);
}
.stat div:last-child {
	font-size: calc(var(--index) * 0.8);
	margin-top: 0.3rem;
}

/* НАВЫКИ */
.skill-category { margin-bottom: 2rem; }
.skill-category h3 {
	font-family: 'kamerik-3d', sans-serif;
	margin-bottom: 0.8rem;
	font-size: calc(var(--index) * 1.1);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.skill-bar {
	background: rgba(255,255,255,0.15);
	height: 2.2rem;
	border-radius: 12px;
	margin-bottom: 0.8rem;
	overflow: hidden;
}
.fill {
	height: 100%;
	background: linear-gradient(90deg, var(--accent), var(--accent2));
	display: flex;
	align-items: center;
	padding-left: 1rem;
	font-size: calc(var(--index) * 0.6);
	color: #000;
	font-weight: bold;
}
.tag-cloud span, .tags span {
	background: rgba(255,255,255,0.15);
	padding: 0.4rem 0.9rem;
	border-radius: 20px;
	font-size: calc(var(--index) * 0.6);
	margin: 0.3rem;
	display: inline-block;
}
.soft-skills span {
	display: block;
	padding-left: 1.5rem;
	position: relative;
	margin: 0.4rem 0;
	font-size: calc(var(--index) * 0.65);
}
.soft-skills span::before {
	content: '▹';
	position: absolute;
	left: 0;
	color: var(--accent);
}

/* ЯЗЫКИ / ДОПОЛНИТЕЛЬНО */
.language-list .language-item {
	display: flex;
	justify-content: space-between;
	padding: 0.7rem 0;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	font-size: calc(var(--index) * 0.75);
}
.lang-level { opacity: 0.8; }

.info-grid .info-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
	font-size: calc(var(--index) * 0.7);
}
.info-item i { width: 28px; color: var(--accent); font-size: 1.4em; }
.info-item h4 { font-size: 1em; margin-bottom: 0.2rem; }

/* ОПЫТ РАБОТЫ */
.exp-header {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
	align-items: flex-start;
	margin-bottom: 1.5rem;
}
.company-icon {
	background: var(--accent);
	width: 60px; height: 60px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	color: #000;
}
.job-title {
	font-family: 'kamerik-3d', sans-serif;
	font-size: calc(var(--index) * 1.4);
}
.company { color: var(--accent); font-size: calc(var(--index) * 0.9); }
.period { font-size: 0.95em; opacity: 0.85; }
.duration { color: var(--accent); margin-left: 0.5rem; }
.current-badge {
	background: rgba(16,185,129,0.2);
	color: #10b981;
	padding: 0.4rem 1.2rem;
	border-radius: 20px;
	font-size: 0.9em;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-left: auto;
}
.exp-details {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	margin-bottom: 1.5rem;
}
.responsibilities, .achievements { flex: 1; min-width: 200px; }
.responsibilities h4, .achievements h4, .tech-stack h4 {
	font-family: 'kamerik-3d', sans-serif;
	margin-bottom: 0.8rem;
	font-size: calc(var(--index) * 1);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.responsibilities ul, .achievements ul {
	list-style: none;
	padding-left: 0;
}
.responsibilities li, .achievements li {
	position: relative;
	padding-left: 1.6rem;
	margin-bottom: 0.6rem;
	font-size: calc(var(--index) * 0.7);
}
.responsibilities li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
.achievements li::before { content: '✓'; position: absolute; left: 0; color: #10b981; }

/* ОБРАЗОВАНИЕ */
.edu-item {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
}
.edu-year {
	font-family: 'kamerik-3d', sans-serif;
	font-size: calc(var(--index) * 2.4);
	color: var(--accent);
}
.edu-details h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.edu-location { opacity: 0.8; font-size: 0.95em; margin-bottom: 0.4rem; }
.specialty { font-weight: 600; color: var(--accent); font-size: 1em; }
.qualification { margin-bottom: 0.8rem; }
.edu-status {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(245,158,11,0.2);
	color: #f59e0b;
	padding: 0.4rem 1.2rem;
	border-radius: 20px;
	font-size: 0.9em;
}

/* ПРОЕКТЫ */
.project-card {
	background: rgba(255,255,255,0.05);
	padding: 1.5rem;
	border-radius: 14px;
	margin-bottom: 1.5rem;
}
.project-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 0.6rem;
	font-size: calc(var(--index) * 0.9);
}
.project-year { font-size: 0.9em; opacity: 0.8; }
.project-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: rgba(139,92,246,0.2);
	color: #c084fc;
	padding: 0.4rem 1rem;
	border-radius: 20px;
	font-size: 0.85em;
	margin-top: 0.7rem;
}
.project-card p { font-size: calc(var(--index) * 0.7); margin: 0.8rem 0; }

/* КОНТАКТЫ */
.contact-buttons {
	display: flex;
	gap: 1.2rem;
	flex-wrap: wrap;
}
.btn-telegram, .btn-email {
	padding: 0.9rem 2rem;
	border-radius: 3rem;
	color: white;
	text-decoration: none;
	font-weight: bold;
	font-size: calc(var(--index) * 0.8);
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
}
.btn-telegram { background: #0088cc; }
.btn-email { background: #ea4335; }

/* ФУТЕР */
.footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.2rem;
	font-size: calc(var(--index) * 0.7);
}
.footer-actions button {
	background: rgba(255,255,255,0.2);
	border: none;
	color: white;
	padding: 0.5rem 1.2rem;
	border-radius: 20px;
	margin-left: 0.5rem;
	cursor: pointer;
	font-size: calc(var(--index) * 0.6);
}
.social-links a {
	color: white;
	margin-left: 1rem;
	font-size: 1.4rem;
}

/* УВЕДОМЛЕНИЯ */
#notification-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
}
.notification {
	background: #10b981;
	color: white;
	padding: 1rem 1.5rem;
	border-radius: 10px;
	margin-bottom: 0.8rem;
	font-size: calc(var(--index) * 0.65);
	animation: fadeIn 0.3s;
}
@keyframes fadeIn { from{opacity:0;transform:translateY(-10px);} to{opacity:1;transform:translateY(0);} }

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    :root {
        --index: calc(0.85vw + 0.85vh);
    }
    body {
        padding: 0.5rem;
    }
    .glass-card {
        padding: calc(var(--index) * 2.2);
        margin-bottom: calc(var(--index) * 2);
        border-radius: calc(var(--index) * 1.5);
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .avatar-wrapper {
        width: 30vw; height: 30vw;
        max-width: 120px; max-height: 120px;
        margin: 0 auto;
    }
    .online-status {
        font-size: clamp(12px, 2.8vw, 18px);
        padding: 0.3rem 1rem;
        bottom: -0.4rem;
    }
    .name {
        font-size: clamp(18px, 7.5vw, 36px);
    }
    .subtitle {
        font-size: clamp(12px, 4vw, 20px);
        justify-content: center;
    }
    .badges {
        justify-content: center;
        gap: 0.4rem;
    }
    .badge {
        font-size: clamp(12px, 3.2vw, 18px);
        padding: 0.3rem 0.8rem;
    }
    .contacts {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 0.5rem;
    }
    .contact-item {
        font-size: clamp(12px, 3.5vw, 18px);
        padding: 0.5rem 0.8rem;
        justify-content: center;
    }
    .content-grid {
        gap: calc(var(--index) * 1.8);
    }
    .section h2 {
        font-size: clamp(14px, calc(var(--index) * 2.4), 28px);
        margin-bottom: 1rem;
    }
    .intro {
        font-size: clamp(12px, calc(var(--index) * 0.9), 20px);
    }
    .stat span {
        font-size: clamp(14px, calc(var(--index) * 2.2), 30px);
    }
    .skill-category h3 {
        font-size: clamp(12px, calc(var(--index) * 1.1), 22px);
    }
    .skill-bar {
        height: 1.8rem;
        margin-bottom: 0.5rem;
    }
    .fill {
        font-size: clamp(12px, calc(var(--index) * 0.6), 18px);
    }
    .tag-cloud span, .tags span {
        font-size: clamp(12px, calc(var(--index) * 0.6), 18px);
        padding: 0.3rem 0.7rem;
    }
    .soft-skills span {
        font-size: clamp(12px, calc(var(--index) * 0.65), 18px);
    }
    .language-list .language-item {
        font-size: clamp(12px, calc(var(--index) * 0.75), 18px);
    }
    .info-grid .info-item {
        font-size: clamp(12px, calc(var(--index) * 0.7), 18px);
    }
    .exp-header {
        flex-direction: column;
        gap: 0.8rem;
    }
    .company-icon {
        width: 45px; height: 45px;
        font-size: 1.4rem;
    }
    .job-title {
        font-size: clamp(14px, calc(var(--index) * 1.4), 24px);
    }
    .company {
        font-size: clamp(12px, calc(var(--index) * 0.9), 20px);
    }
    .period {
        font-size: clamp(12px, 0.95em, 18px);
    }
    .current-badge {
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: clamp(12px, 0.9em, 18px);
    }
    .exp-details {
        flex-direction: column;
        gap: 1rem;
    }
    .responsibilities h4, .achievements h4, .tech-stack h4 {
        font-size: clamp(12px, calc(var(--index) * 1), 20px);
    }
    .responsibilities li, .achievements li {
        font-size: clamp(12px, calc(var(--index) * 0.7), 18px);
        padding-left: 1.4rem;
    }
    .edu-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    .edu-year {
        font-size: clamp(14px, calc(var(--index) * 2.4), 30px);
    }
    .edu-details h3 {
        font-size: clamp(12px, 1.1rem, 20px);
    }
    .edu-location {
        font-size: clamp(12px, 0.95em, 18px);
    }
    .specialty {
        font-size: clamp(12px, 1em, 18px);
    }
    .qualification {
        font-size: clamp(12px, 0.9em, 18px);
    }
    .edu-status {
        font-size: clamp(12px, 0.9em, 18px);
    }
    .project-card p {
        font-size: clamp(12px, calc(var(--index) * 0.7), 18px);
    }
    .contact-buttons {
        flex-direction: column;
    }
    .btn-telegram, .btn-email {
        justify-content: center;
        padding: 0.7rem 1.5rem;
        font-size: clamp(12px, calc(var(--index) * 0.85), 20px);
    }
    .footer {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .footer-actions button {
        font-size: clamp(12px, calc(var(--index) * 0.75), 18px);
    }
    .social-links a {
        font-size: clamp(14px, 1.3rem, 24px);
    }
}
@media (max-width: 400px) {
    :root {
        --index: calc(0.8vw + 0.8vh);
    }
    .name {
        font-size: 8vw;
    }
    .avatar-wrapper {
        width: 35vw;
        height: 35vw;
    }
}