/* Современная стилизация сайта педагога */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');
:root{
	--bg:#f5f7fb;
	--card:#ffffff;
	--accent:#2563eb;
	--muted:#6b7280;
	--text:#0f172a;
	--radius:12px;
	--shadow: 0 6px 18px rgba(15,23,42,0.08);
}

*{box-sizing:border-box}
html,body{height:100%}
/* always show vertical scrollbar to avoid layout shift when navigating */
html{overflow-y:scroll;scroll-behavior:smooth}
body{
	margin:0;
	font-family: 'Montserrat', Inter, "Segoe UI", Roboto, Arial, sans-serif;
	font-size:20px; /* ещё крупнее */
	/* увеличенный базовый размер для лучшей читаемости */
	background:linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
	color:var(--text);
	-webkit-font-smoothing:antialiased;
	-moz-osx-font-smoothing:grayscale;
	line-height:1.65;
}

.container{max-width:1100px;margin:0 auto;padding:28px}

/* Header */
.site-header{
	background:rgba(255,255,255,0.92);
	position:sticky;
	top:0;
	z-index:50;
	transition:background-color .22s ease, box-shadow .22s ease, padding .18s ease, backdrop-filter .22s ease, transform 0.3s ease;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	box-shadow:0 4px 12px rgba(2,6,23,0.04);
}
.site-header.scrolled{
	background:rgba(255,255,255,0.95);
	box-shadow:0 8px 24px rgba(2,6,23,0.06);
}
.site-header.header-hidden{
	transform: translateY(-100%);
}
.site-header .container{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:88px;padding:12px 24px}
/* Заголовок в header: не менять высоту при разных длинах */
h1{font-size:1.6rem;margin:0;color:var(--text);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:62%}

/* Brand */
.brand{display:flex;align-items:center;gap:12px}
.brand > div{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}
.brand .title{font-size:1.1rem;font-weight:500;margin:0;white-space:nowrap}
.brand .subtitle{font-size:0.95rem;color:var(--muted);margin:0;white-space:nowrap}

/* Nav container */
.nav-wrap{display:flex;align-items:center}
nav{display:flex;gap:10px;flex-wrap:nowrap}
nav a{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:999px;background:transparent;color:var(--accent);text-decoration:none;font-weight:500;line-height:1;min-height:40px;box-sizing:border-box;white-space:nowrap;transition:box-shadow .22s cubic-bezier(.22,.9,.35,1),background-color .18s ease,color .18s ease;will-change:box-shadow,background-color}
/* remove translate-based movement on hover to avoid layout shift */
nav a:hover{background:rgba(37,99,235,0.06);box-shadow:0 8px 20px rgba(37,99,235,0.06);transform:none}
nav a.active{background:var(--accent);color:#fff;box-shadow:0 10px 30px rgba(37,99,235,0.14)}
nav a:focus-visible{outline:none;box-shadow:0 10px 30px rgba(37,99,235,0.12)}

/* duplicate/old nav rules removed to prevent layout shifts on hover */

/* Ensure nav does not change layout on focus or active */
nav a, nav a *{box-sizing:border-box}

/* Profile */
.profile{display:grid;grid-template-columns:minmax(160px,320px) 1fr;gap:26px;align-items:start;padding:28px 0}
.avatar{width:100%;max-width:320px;height:auto;object-fit:contain;border-radius:10px;box-shadow:var(--shadow)}
.bio h2{margin:0 0 8px 0;font-size:1.4rem}
.bio p{margin:0 0 12px;color:var(--muted);font-size:1.05rem}
.bio ul{margin:0 0 16px;padding-left:1.2rem;font-size:1.05rem}

.highlights{margin-top:8px;padding:18px;background:linear-gradient(180deg,#ffffff, #fbfdff);border-radius:var(--radius);box-shadow:var(--shadow)}
.highlights h3{margin:0 0 8px 0}
.highlights ul{padding-left:1.2rem;margin:8px 0}

.cta{margin-top:18px;padding:16px;background:var(--card);border-radius:10px;box-shadow:0 6px 18px rgba(2,6,23,0.04)}
.cta h3{margin:0 0 12px 0;font-size:1.2rem}
.cta ul{margin:0;padding-left:1.2rem}
.cta li{margin-bottom:6px}

/* Full-screen project sections */
.project-section{display:flex;align-items:center;justify-content:center;height:100vh;padding:60px 28px;background:linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%)}
.project-section:nth-child(odd){background:linear-gradient(180deg, #ffffff 0%, #f8fbff 100%)}
.project-section:nth-child(even){background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%)}

.project-content{max-width:1800px;width:100%;display:grid;grid-template-columns:2fr 0.7fr;gap:100px;align-items:center}
.project-content img{width:100%;height:auto;max-height:1000px;object-fit:contain;border-radius:14px;box-shadow:var(--shadow)}
.project-content h2{margin:0 0 16px 0;font-size:2.2rem;color:var(--text);font-weight:700}
.project-content p{margin:0 0 16px;color:var(--muted);font-size:1.1rem;line-height:1.7}
.project-content a{color:var(--accent);font-weight:600;text-decoration:none;font-size:1.1rem}

/* Alternate layout for even sections */
.project-section:nth-child(even) .project-content{grid-template-columns:0.7fr 2fr}
.project-section:nth-child(even) .project-content img{order:2}
.project-section:nth-child(even) .project-content > div{order:1}

/* Project reveal animations */
.project-section.reveal{opacity:0;transform:translateY(80px) scale(0.95);transition:opacity 1.2s cubic-bezier(.1,.8,.2,1), transform 1.2s cubic-bezier(.1,.8,.2,1);will-change:opacity, transform}
.project-section.reveal.is-visible{opacity:1;transform:translateY(0) scale(1)}

/* Image slide-in animations */
.project-section:nth-child(odd) .project-content img{opacity:0;transform:translateX(-150px);transition:opacity 1.2s cubic-bezier(.1,.8,.2,1) 0.3s, transform 1.2s cubic-bezier(.1,.8,.2,1) 0.3s;will-change:opacity, transform}
.project-section:nth-child(odd).is-visible .project-content img{opacity:1;transform:translateX(0)}

.project-section:nth-child(even) .project-content img{opacity:0;transform:translateX(150px);transition:opacity 1.2s cubic-bezier(.1,.8,.2,1) 0.3s, transform 1.2s cubic-bezier(.1,.8,.2,1) 0.3s;will-change:opacity, transform}
.project-section:nth-child(even).is-visible .project-content img{opacity:1;transform:translateX(0)}

/* Text content slide-in animations */
.project-section .project-content > div{opacity:0;transform:translateY(30px);transition:opacity 1s cubic-bezier(.1,.8,.2,1) 0.1s, transform 1s cubic-bezier(.1,.8,.2,1) 0.1s;will-change:opacity, transform}
.project-section.is-visible .project-content > div{opacity:1;transform:translateY(0)}

/* Footer */
.site-footer{margin-top:36px;padding:18px 0;text-align:center;color:var(--muted);font-size:0.95rem}

/* Lists */
.achieve-list,.student-list{padding-left:1.2rem}

/* Responsive */
@media (max-width:980px){
	.container{padding:14px}
	.site-header .container{padding:10px 14px}
}

/* Reveal (staggered) animations */
.reveal{
	opacity:0;
	transform:translateY(12px);
	transition:opacity .64s cubic-bezier(.2,.9,.3,1), transform .64s cubic-bezier(.2,.9,.3,1);
	will-change:opacity, transform;
}
.reveal.is-visible{
	opacity:1;
	transform:none;
}
.reveal[data-delay]{
	/* JS will set transition-delay inline; this keeps fallback sensible */
}

/* Optional helper to stagger children inside a container */
.reveal-stagger > *{opacity:0;transform:translateY(10px);transition:opacity .52s ease,transform .52s ease}
.reveal-stagger.is-visible > *{opacity:1;transform:none}
.reveal-stagger.is-visible > *:nth-child(1){transition-delay:.05s}
.reveal-stagger.is-visible > *:nth-child(2){transition-delay:.12s}
.reveal-stagger.is-visible > *:nth-child(3){transition-delay:.18s}
.reveal-stagger.is-visible > *:nth-child(4){transition-delay:.24s}
.reveal-stagger.is-visible > *:nth-child(5){transition-delay:.30s}

@media (max-width:760px){
	.site-header .container{flex-direction:column;align-items:flex-start;gap:8px}
	.brand .title{font-size:1.05rem}
	nav{flex-wrap:wrap}
}

@media (max-width:768px){
	body{font-size:18px}
	.container{max-width:100%;padding:16px}
	.site-header .container{min-height:80px;padding:10px 16px}
	h1{font-size:1.3rem;max-width:100%}
	.profile{grid-template-columns:1fr;gap:14px;padding:12px 0}
	.avatar{max-width:100%;width:100%;max-width:280px;height:auto}
	.project-section{padding:40px 16px;min-height:auto}
	.project-content{
		display: flex;
		flex-direction: column;
		gap:24px}
	.project-section:nth-child(even) .project-content img{order:auto!important}
	.project-section:nth-child(even) .project-content > div{order:auto!important}
	.project-content img{max-height:480px;opacity:1!important;transform:none!important}
	.project-content h2{font-size:1.6rem}
	.project-content p{font-size:1rem}
	.reveal{transition:opacity .52s ease,transform .52s ease}
}

@media (max-width:640px){
	body{font-size:16px}
	.container{padding:12px}
	.site-header .container{min-height:72px;padding:8px 12px;gap:8px;flex-direction:column;align-items:flex-start}
	.brand .title{font-size:1.1rem}
	.brand .subtitle{font-size:0.9rem}
	nav{gap:6px;flex-wrap:wrap}
	nav a{padding:8px 12px;min-height:36px;font-size:0.95rem}
	h1{font-size:1.1rem}
	.profile{grid-template-columns:1fr;grid-auto-rows:auto;padding:8px 0;gap:12px}
	.avatar{max-width:240px;width:100%;height:auto}
	.bio h2{font-size:1.15rem}
	.bio p{font-size:0.95rem;margin-bottom:8px}
	.highlights{padding:12px;margin-top:6px}
	.cta{padding:12px;margin-top:12px}
	.project-section{padding:30px 12px;min-height:auto}
	.project-content{gap:16px}
	.project-section:nth-child(even) .project-content img{order:auto!important}
	.project-section:nth-child(even) .project-content > div{order:auto!important}
	.project-content h2{font-size:1.4rem;margin-bottom:12px}
	.project-content p{font-size:0.9rem;margin-bottom:12px}
	.project-content img{max-height:350px;opacity:1!important;transform:none!important;margin-bottom:12px}
}

@media (max-width:480px){
	body{font-size:15px;line-height:1.55}
	.container{padding:10px}
	.site-header .container{min-height:68px;padding:6px 10px;gap:6px}
	.brand .title{font-size:1rem}
	.brand .subtitle{font-size:0.85rem}
	nav{gap:4px}
	nav a{padding:6px 10px;min-height:32px;font-size:0.9rem}
	h1{font-size:1rem}
	.profile{padding:6px 0;gap:10px}
	.avatar{max-width:200px}
	.bio h2{font-size:1.05rem;margin-bottom:6px}
	.bio p{font-size:0.9rem;margin-bottom:8px}
	.highlights{padding:10px;border-radius:10px}
	.highlights h3{font-size:1rem;margin-bottom:6px}
	.cta{padding:10px;border-radius:8px}
	.cta h3{font-size:1rem}
	.project-section{padding:24px 10px;min-height:auto}
	.project-content{gap:12px}
	.project-content h2{font-size:1.2rem;margin-bottom:8px}
	.project-content p{font-size:0.85rem;margin-bottom:8px}
	.project-section:nth-child(even) .project-content img{order:auto!important}
	.project-section:nth-child(even) .project-content > div{order:auto!important}
	.project-content img{max-height:280px;border-radius:8px;opacity:1!important;transform:none!important;margin-bottom:8px}
	.site-footer{font-size:0.85rem;padding:12px 0;margin-top:16px}
}

/* Page transition helpers */
body.page-transition{opacity:1;transition:opacity .36s ease}
body.page-transition.is-entering{opacity:0}
body.page-transition.is-entered{opacity:1}
body.page-transition.is-exiting{opacity:0;transition:opacity .28s ease}

/* Avoid flashing when JS disabled */
html.js-enabled body.page-transition{opacity:1}
