* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text-color: #445f7a;
}

body {
    width: 100%;
    min-height: 100dvh;
    font-family: 'Helvetica', Arial, sans-serif;
    position: relative;
    
    margin: 0;
    overflow-x: hidden;
}

body.loading {
    overflow: hidden;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.three-js-container {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    pointer-events: none;
}

.gradient-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Fallback цвет для старых браузеров */
    background: #d8e0ef;
    /* Современный синтаксис градиента */
    background: linear-gradient(90deg, #d8e0ef 0%, #85b6df 100%);
    /* Webkit префиксы для мобильных Safari */
    background: -webkit-linear-gradient(90deg, #d8e0ef 0%, #85b6df 100%);
    /* Старый синтаксис для iOS */
    background: -webkit-gradient(linear, left top, right top, color-stop(0%, #d8e0ef), color-stop(100%, #85b6df));
    /* Firefox */
    background: -moz-linear-gradient(90deg, #d8e0ef 0%, #85b6df 100%);
    /* Opera */
    background: -o-linear-gradient(90deg, #d8e0ef 0%, #85b6df 100%);
    /* IE10+ */
    background: -ms-linear-gradient(90deg, #d8e0ef 0%, #85b6df 100%);
}

.three-js-canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
    pointer-events: none;
}

.scroll-container {
    height: 200dvh;
}

.screen {
    width: 100%;
    height: 100dvh;
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.screen-1 {
    top: 0;
    left: 0;
    z-index: 10;
}

.screen-2 {
    top: 0;
    left: 0;
    z-index: 20;
}

.content-wrapper {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 5%;
}

.content-wrapper > div {
    width: 50%;
}

.photo-container {
    z-index: 20;
    position: relative;
    text-align: right;
}

.main-photo {
    width: clamp(240px, 100%, 480px);
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 90dvh;
}

.info-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 30;
}

.candidate-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-color);
    text-align: left;
    line-height: 1.2;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.splitWordsContent .word,
.candidate-title .word,
.name .word {
    display: inline-block;
}

.candidate-title,
.name {
    opacity: 0;
}

.name {
    font-size: clamp(32px, 68px, 82px);
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.school-logo-container {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
}

.school-logo {
    width: 80px;
    height: 80px;
    opacity: .75;
}

.screen-2 {
    background: rgba(255, 255, 255, 42%);
    color: var(--text-color);

}

.text-content {
    max-width: 800px;
    padding: 40px;
    text-align: center;
    position: relative;
}

.text-content::before {
    content: '';
    position: absolute;
    width: 46%;
    height: 2px;
    background: var(--text-color);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}

.text-content::after {
    content: '';
    position: absolute;
    width: 46%;
    height: 2px;
    background: var(--text-color);
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}

.text-paragraph {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0;
}

.text-paragraph:last-child {
    margin-bottom: 0;
}

.animate-logo {
    opacity: 0;
}

.school-logo-container {
    opacity: 0;
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 0 15px;
    }
    
    .main-photo {
        width: 220px;
        height: 265px;
    }
    
    .candidate-title {
        font-size: 18px;
        margin-bottom: 25px;
        padding: 0 1rem;
    }
    
    .name {
        font-size: 28px;
    }
    
    .class {
        font-size: 24px;
    }
    
    .school-logo {
        width: 75px;
        height: 75px;
    }
    
    .text-paragraph {
        font-size: 15px;
        margin-bottom: 18px;
    }
}


/* Preloader */
.preloader {
	background-color: hsl(223, 90%, 95%);
	font: 1em/1.5 sans-serif;
	height: 100vh;
	display: grid;
	place-items: center;
}
.pl,
.pl__ball,
.pl__ball-inner-shadow,
.pl__ball-side-shadows,
.pl__ball-texture,
.pl__inner-ring,
.pl__outer-ring,
.pl__track-cover {
	border-radius: 50%;
}
.pl {
	position: relative;
	width: 16em;
	height: 16em;
}
.pl__ball,
.pl__ball-inner-shadow,
.pl__ball-outer-shadow,
.pl__ball-side-shadows,
.pl__ball-texture,
.pl__ball-texture:before,
.pl__inner-ring,
.pl__outer-ring,
.pl__track-cover {
	position: absolute;
}
.pl__ball,
.pl__ball-inner-shadow,
.pl__ball-outer-shadow,
.pl__ball-texture:before,
.pl__track-cover {
	animation: ball 3s linear infinite;
}
.pl__ball {
	top: calc(50% - 1.25em);
	left: calc(50% - 1.25em);
	transform: rotate(0) translateY(-6.5em);
	width: 2.5em;
	height: 2.5em;
}
.pl__ball-inner-shadow {
	animation-name: ballInnerShadow;
	box-shadow:
		0 0.1em 0.2em hsla(0, 0%, 0%, 0.3),
		0 0 0.2em hsla(0, 0%, 0%, 0.1) inset,
		0 -1em 0.5em hsla(0, 0%, 0%, 0.15) inset;
	width: 100%;
	height: 100%;
}
.pl__ball-outer-shadow {
	animation-name: ballOuterShadow;
	background-image: linear-gradient(hsla(0, 0%, 0%, 0.15),hsla(0, 0%, 0%, 0));
	border-radius: 0 0 50% 50% / 0 0 100% 100%;
	filter: blur(2px);
	top: 50%;
	left: 0;
	width: 100%;
	height: 250%;
	transform: rotate(20deg);
	transform-origin: 50% 0;
	z-index: -2;
}
.pl__ball-side-shadows {
	background-color: hsla(0, 0%, 0%, 0.1);
	filter: blur(2px);
	width: 100%;
	height: 100%;
	transform: scale(0.75,1.1);
	z-index: -1;
}
.pl__ball-texture {
	overflow: hidden;
	width: 100%;
	height: 100%;
	transform: translate3d(0,0,0);
}
.pl__ball-texture:before {
	animation-name: ballTexture;
	animation-duration: 0.25s;
	background: url(https://assets.codepen.io/416221/snow.jpg) 0 0 / 50% 100%;
	content: "";
	display: block;
	filter: brightness(1.05);
	top: 0;
	right: 0;
	width: 200%;
	height: 100%;
}
.pl__inner-ring {
	box-shadow:
		0 -0.25em 0.5em hsla(0, 0%, 100%, 0.4),
		0 0.5em 0.75em hsla(0, 0%, 100%, 0.4) inset,
		0 0.5em 0.375em hsla(0, 0%, 0%, 0.15),
		0 -0.5em 0.75em hsla(0, 0%, 0%, 0.15) inset;
	top: 2.375em;
	left: 2.375em;
	width: calc(100% - 4.75em);
	height: calc(100% - 4.75em);
}
.pl__outer-ring {
	box-shadow:
		0 -0.45em 0.375em hsla(0, 0%, 0%, 0.15),
		0 0.5em 0.75em hsla(0, 0%, 0%, 0.15) inset,
		0 0.25em 0.5em hsla(0, 0%, 100%, 0.4),
		0 -0.5em 0.75em hsla(0, 0%, 100%, 0.4) inset;
	top: 0.75em;
	left: 0.75em;
	width: calc(100% - 1.5em);
	height: calc(100% - 1.5em);
}
.pl__track-cover {
	animation-name: trackCover;
	background-image: conic-gradient(hsla(223, 90%, 95%, 1) 210deg, hsla(223, 90%, 95%, 0) 270deg);
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Animations */
@keyframes ball {
	from {
		transform: rotate(0) translateY(-6.5em);
	}
	50% {
		transform: rotate(180deg) translateY(-6em);
	}
	to {
		transform: rotate(360deg) translateY(-6.5em);
	}
}
@keyframes ballInnerShadow {
	from {
		transform: rotate(0);
	}
	to {
		transform: rotate(-360deg);
	}
}
@keyframes ballOuterShadow {
	from {
		transform: rotate(20deg);
	}
	to {
		transform: rotate(-340deg);
	}
}
@keyframes ballTexture {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(50%);
	}
}
@keyframes trackCover {
	from {
		transform: rotate(0);
	}
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 20px;
        flex-direction: column;
        justify-content: center;
        gap: 0;
    }
    section#screen1 {
        flex-direction: column;
    }
    .content-wrapper > div {
        width: auto;
    }
    
    .photo-container {
        position: relative;
        left: auto;
        top: auto;
        margin-bottom: 40px;
    }
    
    .main-photo {
        width: 200px;
        height: 250px;
    }
    
    .info-right {
        position: relative;
        right: auto;
        align-items: center;
        text-align: center;
    }
    
    .candidate-title {
        font-size: 22px;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .name-class {
        align-items: center;
    }
    
    .name {
        font-size: 32px;
        text-align: center;
    }
    
    .class {
        font-size: 28px;
    }
    
    .school-logo-container {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-bottom: 20px;
    }
    
    .school-logo {
        width: 60px;
        height: 60px;
    }
    
    .text-content {
        padding: 20px;
    }
    
    .text-paragraph {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
}