/* =============================================
   LIQUID GLASS THEME — Личный сайт разработчика
   Эффект "жидкого стекла" (Glassmorphism)
   ============================================= */

/* --- CSS-переменные --- */
:root {
	/* Основные цвета */
	--accent: #7dd3fc; /* Небесно-голубой акцент */
	--accent-glow: rgba(125, 211, 252, 0.4);
	--bg-dark: #0a0a1a; /* Глубокий тёмно-синий */
	--text-light: #f0f9ff;
	--text-muted: #94a3b8;

	/* Стеклянные эффекты */
	--glass-bg: rgba(255, 255, 255, 0.05);
	--glass-border: rgba(255, 255, 255, 0.1);
	--glass-blur: 20px;
	--glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* --- Сброс и базовые стили --- */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family:
		'Segoe UI',
		-apple-system,
		BlinkMacSystemFont,
		sans-serif;
	background: var(--bg-dark);
	color: var(--text-light);
	line-height: 1.6;
	overflow-x: hidden;
}

/* =============================================
   АНИМИРОВАННЫЙ ФОН С "ЖИДКИМИ" СФЕРАМИ
   ============================================= */

/* Контейнер для анимированных сфер */
.liquid-bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	overflow: hidden;
	background: linear-gradient(135deg, #0a0a1a 0%, #1e1b4b 50%, #0a0a1a 100%);
}

/* Плавающие стеклянные сферы */
.liquid-bg::before,
.liquid-bg::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.4;
	animation: float 15s ease-in-out infinite;
}

.liquid-bg::before {
	width: 500px;
	height: 500px;
	background: linear-gradient(135deg, #7dd3fc, #a78bfa);
	top: -100px;
	left: -100px;
	animation-delay: 0s;
}

.liquid-bg::after {
	width: 400px;
	height: 400px;
	background: linear-gradient(135deg, #818cf8, #22d3ee);
	bottom: -50px;
	right: -50px;
	animation-delay: -7s;
}

/* Третья сфера через дополнительный элемент */
.liquid-sphere {
	position: fixed;
	width: 350px;
	height: 350px;
	background: linear-gradient(135deg, #c084fc, #7dd3fc);
	border-radius: 50%;
	filter: blur(100px);
	opacity: 0.3;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: -1;
	animation: pulse 10s ease-in-out infinite;
}

@keyframes float {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}
	25% {
		transform: translate(50px, 30px) scale(1.1);
	}
	50% {
		transform: translate(20px, -40px) scale(0.95);
	}
	75% {
		transform: translate(-30px, 20px) scale(1.05);
	}
}

@keyframes pulse {
	0%,
	100% {
		opacity: 0.3;
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		opacity: 0.5;
		transform: translate(-50%, -50%) scale(1.2);
	}
}

/* =============================================
   HERO-СЕКЦИЯ
   ============================================= */

.hero {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	position: relative;
}

.hero-content {
	text-align: center;
	max-width: 700px;

	/* Стеклянный контейнер */
	background: var(--glass-bg);
	backdrop-filter: blur(var(--glass-blur));
	-webkit-backdrop-filter: blur(var(--glass-blur));
	border: 1px solid var(--glass-border);
	border-radius: 24px;
	padding: 60px 50px;
	box-shadow: var(--glass-shadow);

	/* Эффект свечения по краям */
	position: relative;
	overflow: hidden;
}

/* Блик на стекле */
.hero-content::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.3),
		transparent
	);
}

/* --- Заголовок --- */
.hero-title {
	font-size: clamp(2rem, 8vw, 3.5rem);
	font-weight: 700;
	margin-bottom: 15px;
	background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;

	opacity: 0;
	transform: translateY(30px);
}

/* --- Подзаголовок --- */
.hero-subtitle {
	font-size: clamp(1rem, 4vw, 1.4rem);
	color: var(--accent);
	font-weight: 500;
	margin-bottom: 25px;
	letter-spacing: 3px;
	text-transform: uppercase;
	text-shadow: 0 0 20px var(--accent-glow);

	opacity: 0;
	transform: translateY(30px);
}

/* --- Био --- */
.hero-bio {
	font-size: clamp(1rem, 3vw, 1.15rem);
	color: var(--text-muted);
	margin-bottom: 40px;
	max-width: 450px;
	margin-left: auto;
	margin-right: auto;

	opacity: 0;
	transform: translateY(30px);
}

/* --- CTA-кнопка со стеклянным эффектом --- */
.hero-cta {
	display: inline-block;
	padding: 16px 45px;
	background: var(--glass-bg);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: var(--accent);
	border: 1px solid var(--accent);
	border-radius: 50px;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 1px;
	transition: all 0.4s ease;
	position: relative;
	overflow: hidden;

	opacity: 0;
	transform: translateY(30px);
}

.hero-cta::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(125, 211, 252, 0.3),
		transparent
	);
	transition: left 0.5s ease;
}

.hero-cta:hover::before {
	left: 100%;
}

.hero-cta:hover {
	background: var(--accent);
	color: var(--bg-dark);
	box-shadow:
		0 0 40px var(--accent-glow),
		inset 0 0 20px rgba(255, 255, 255, 0.1);
	transform: translateY(-3px);
}

/* =============================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   ============================================= */

.animate-in {
	animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero-title.animate-in {
	animation-delay: 0.1s;
}
.hero-subtitle.animate-in {
	animation-delay: 0.3s;
}
.hero-bio.animate-in {
	animation-delay: 0.5s;
}
.hero-cta.animate-in {
	animation-delay: 0.7s;
}

/* =============================================
   СЕКЦИЯ "МОИ НАВЫКИ"
   ============================================= */

.skills-section {
	min-height: 100vh;
	padding: 100px 20px;
	position: relative;
}

.skills-container {
	max-width: 1000px;
	margin: 0 auto;
	text-align: center;
}

/* --- Заголовок секции --- */
.skills-title {
	font-size: clamp(1.8rem, 6vw, 2.5rem);
	color: var(--text-light);
	margin-bottom: 60px;
	position: relative;
	display: inline-block;
}

.skills-title::after {
	content: '';
	display: block;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--accent), transparent);
	margin-top: 15px;
	box-shadow: 0 0 15px var(--accent-glow);
}

/* --- Сетка карточек --- */
.skills-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 25px;
	margin-bottom: 50px;
}

/* --- Стеклянная карточка навыка --- */
.skill-card {
	background: var(--glass-bg);
	backdrop-filter: blur(var(--glass-blur));
	-webkit-backdrop-filter: blur(var(--glass-blur));
	border: 1px solid var(--glass-border);
	border-radius: 16px;
	padding: 30px;
	text-align: left;
	cursor: pointer;
	transition: all 0.4s ease;
	box-shadow: var(--glass-shadow);
	position: relative;
	overflow: hidden;
}

/* Световой блик сверху */
.skill-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.2),
		transparent
	);
}

/* Hover-эффект */
.skill-card:hover {
	transform: translateY(-8px) scale(1.02);
	border-color: var(--accent);
	box-shadow:
		0 15px 40px rgba(0, 0, 0, 0.4),
		0 0 30px var(--accent-glow);
}

/* Название навыка */
.skill-card h3 {
	font-size: 1.25rem;
	background: linear-gradient(135deg, #fff, var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.skill-card h3::after {
	content: '▼';
	font-size: 0.65rem;
	-webkit-text-fill-color: var(--accent);
	transition: transform 0.3s ease;
	opacity: 0.6;
}

.skill-card.expanded h3::after {
	transform: rotate(180deg);
}

/* Описание (скрытое) */
.skill-card p {
	color: var(--text-muted);
	font-size: 0.95rem;
	line-height: 1.6;
	max-height: 0;
	overflow: hidden;
	transition: all 0.4s ease;
	margin-top: 0;
}

.skill-card.expanded p {
	max-height: 200px;
	margin-top: 15px;
}

/* --- Кнопка добавления --- */
.add-skill-btn {
	display: inline-block;
	padding: 16px 40px;
	background: var(--glass-bg);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: var(--accent);
	border: 2px dashed rgba(125, 211, 252, 0.5);
	border-radius: 50px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.4s ease;
	font-family: inherit;
}

.add-skill-btn:hover {
	background: var(--accent);
	color: var(--bg-dark);
	border-style: solid;
	border-color: var(--accent);
	box-shadow: 0 0 35px var(--accent-glow);
}

/* =============================================
   СЕКЦИЯ "ИНДЕКС НАВЫКОВ" (КАЛЬКУЛЯТОР)
   ============================================= */

.skills-index-section {
	padding: 100px 20px;
	position: relative;
	/* Разделитель сверху */
	border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.index-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 50px;
	align-items: center;
	max-width: 1000px;
	margin: 0 auto;
}

.sliders-container {
	background: rgba(0, 0, 0, 0.4); /* Более темный фон для контраста */
	backdrop-filter: blur(30px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	padding: 40px;
}

/* --- Слайдер (Range Input) --- */
.slider-group {
	margin-bottom: 25px;
}

.slider-label {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--text-light);
}

.slider-val {
	color: var(--accent);
	font-weight: 700;
	font-family: monospace;
}

input[type='range'] {
	-webkit-appearance: none;
	width: 100%;
	height: 6px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 5px;
	outline: none;
	cursor: pointer;
}

/* Thumb (ползунок) Chrome/Safari */
input[type='range']::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--text-light);
	border: 2px solid var(--accent);
	box-shadow: 0 0 10px var(--accent-glow);
	cursor: pointer;
	transition: transform 0.2s;
}

input[type='range']::-webkit-slider-thumb:hover {
	transform: scale(1.2);
	background: var(--accent);
}

/* --- Итоговый результат --- */
.result-display {
	text-align: center;
	padding: 40px;
	background: var(--glass-bg);
	border-radius: 24px;
	border: 1px solid var(--glass-border);
}

.gauge-container {
	width: 100%;
	height: 12px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	margin: 30px 0;
	overflow: hidden;
	position: relative;
}

.gauge-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--accent), #fff);
	border-radius: 10px;
	transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 0 20px var(--accent-glow);
}

.total-percent {
	font-size: 4rem;
	font-weight: 800;
	line-height: 1;
	background: linear-gradient(135deg, #fff, var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	display: block;
	margin-bottom: 10px;
}

.level-text {
	font-size: 1.2rem;
	font-weight: 500;
	color: var(--text-muted);
}

/* =============================================
   АДАПТИВНОСТЬ
   ============================================= */

@media (max-width: 768px) {
	.hero-content {
		padding: 40px 25px;
		border-radius: 20px;
	}

	.skills-section {
		padding: 60px 15px;
	}

	.skills-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.skill-card {
		padding: 25px;
	}

	.index-grid {
		grid-template-columns: 1fr; /* В одну колонку на мобильных */
		gap: 30px;
	}

	.sliders-container,
	.result-display {
		padding: 25px;
	}

	.liquid-bg::before,
	.liquid-bg::after {
		width: 300px;
		height: 300px;
	}
}

@media (max-width: 480px) {
	.hero-content {
		padding: 35px 20px;
	}

	.skills-title {
		margin-bottom: 40px;
	}

	.add-skill-btn {
		padding: 14px 30px;
		font-size: 0.9rem;
	}

	.total-percent {
		font-size: 3rem;
	}
}

/* =============================================
   МОДАЛЬНОЕ ОКНО ДОБАВЛЕНИЯ НАВЫКА
   ============================================= */

.skill-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.skill-modal.active {
	opacity: 1;
	visibility: visible;
}

.skill-modal-content {
	background: linear-gradient(
		135deg,
		rgba(30, 27, 75, 0.95),
		rgba(10, 10, 26, 0.98)
	);
	border: 1px solid var(--glass-border);
	border-radius: 24px;
	padding: 40px;
	max-width: 500px;
	width: 90%;
	position: relative;
	transform: scale(0.9) translateY(20px);
	transition: transform 0.3s ease;
	box-shadow:
		0 25px 50px rgba(0, 0, 0, 0.5),
		0 0 40px var(--accent-glow);
}

.skill-modal.active .skill-modal-content {
	transform: scale(1) translateY(0);
}

.skill-modal-content h3 {
	font-size: 1.5rem;
	margin-bottom: 30px;
	text-align: center;
	background: linear-gradient(135deg, #fff, var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.modal-close-btn {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	border-radius: 50%;
	color: var(--text-light);
	font-size: 1.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.modal-close-btn:hover {
	background: rgba(255, 100, 100, 0.3);
	transform: rotate(90deg);
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	color: var(--text-muted);
	font-size: 0.9rem;
	font-weight: 500;
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 14px 18px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	color: var(--text-light);
	font-size: 1rem;
	font-family: inherit;
	transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 20px var(--accent-glow);
	background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
	resize: vertical;
	min-height: 100px;
}

.modal-submit-btn {
	width: 100%;
	padding: 16px;
	background: linear-gradient(135deg, var(--accent), #a78bfa);
	border: none;
	border-radius: 12px;
	color: var(--bg-dark);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.4s ease;
	font-family: inherit;
}

.modal-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px var(--accent-glow);
}

/* --- Кнопка удаления навыка --- */
.delete-skill-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 28px;
	height: 28px;
	background: rgba(255, 100, 100, 0.15);
	border: 1px solid rgba(255, 100, 100, 0.3);
	border-radius: 50%;
	color: #ff6b6b;
	font-size: 1.2rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	opacity: 0;
	line-height: 1;
}

.skill-card:hover .delete-skill-btn {
	opacity: 1;
}

.delete-skill-btn:hover {
	background: rgba(255, 100, 100, 0.4);
	transform: scale(1.1);
	box-shadow: 0 0 15px rgba(255, 100, 100, 0.4);
}

/* Убираем стрелку для кастомных карточек с кнопкой удаления */
.skill-card:has(.delete-skill-btn) h3 {
	padding-right: 25px;
}

/* =============================================
   СЕКЦИЯ "СВЯЗАТЬСЯ СО МНОЙ"
   ============================================= */

.contact-section {
	padding: 100px 20px;
	position: relative;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	min-height: 50vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.contact-container {
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
}

.contact-title {
	font-size: clamp(1.8rem, 6vw, 2.5rem);
	color: var(--text-light);
	margin-bottom: 60px;
	position: relative;
	display: inline-block;
}

.contact-title::after {
	content: '';
	display: block;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--accent), transparent);
	margin-top: 15px;
	box-shadow: 0 0 15px var(--accent-glow);
}

/* Кнопка Telegram */
.telegram-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 16px 45px;
	background: var(--glass-bg);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: var(--accent);
	border: 1px solid var(--accent);
	border-radius: 50px;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 1px;
	transition: all 0.4s ease;
	position: relative;
	overflow: hidden;
	box-shadow: var(--glass-shadow);
}

.telegram-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(125, 211, 252, 0.3),
		transparent
	);
	transition: left 0.5s ease;
}

.telegram-btn:hover::before {
	left: 100%;
}

.telegram-btn:hover {
	background: var(--accent);
	color: var(--bg-dark);
	box-shadow:
		0 0 40px var(--accent-glow),
		inset 0 0 20px rgba(255, 255, 255, 0.1);
	transform: translateY(-3px);
}

.telegram-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	transition: transform 0.3s ease;
	display: block;
	max-width: 20px;
	max-height: 20px;
}

.telegram-btn:hover .telegram-icon {
	transform: scale(1.1);
}

/* Адаптивность для секции контактов */
@media (max-width: 768px) {
	.contact-section {
		padding: 60px 15px;
	}

	.contact-title {
		margin-bottom: 40px;
	}

	.telegram-btn {
		padding: 16px 40px;
		font-size: 1rem;
	}

	.telegram-icon {
		width: 18px;
		height: 18px;
		max-width: 18px;
		max-height: 18px;
	}
}

@media (max-width: 480px) {
	.telegram-btn {
		padding: 14px 30px;
		font-size: 0.95rem;
		gap: 10px;
	}

	.telegram-icon {
		width: 18px;
		height: 18px;
		max-width: 18px;
		max-height: 18px;
	}
}