    html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    
}


/* general styles */
body {
    font-family: "Inter", sans-serif;
    color: #000000;
    background-color: #726d6d;
    background-image: url('cartographer.png');
    background-repeat: repeat;
    background-blend-mode: overlay;
}

/* rotate msg */
#rotate-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #201D1D;
    color: #fff;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

#rotate-message p {
    font-size: 1.5em;
    line-height: 1.5;
}

/* lock scroll when msg shown */
body.orientation-locked {
    overflow: hidden;
}

/* scroll container */
.scroll-container {
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    height: 100vh;
    scroll-behavior: smooth;
   
}

/* sections */
.section {
    scroll-snap-align: start;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

}

/* teacher sec styles */
#teacher-section {
    position: relative;
    overflow: hidden;
    width: 100%;
    background-size: 10000px;
    height: 100%;
    background-repeat: no-repeat;
    background-image: url('/teacher.jpg');
}

.teacher-background {
    position: relative;
    overflow: hidden;
    width: 100%;
    background-size: 1000000px;
    height: 100%;
    background-repeat: no-repeat;
}

.teacher-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* semi-transparent overlay */
    z-index: 1;
}

}
.teacher-container {
    position: relative;
    display: flex;
    height: 100%;
    max-width: 1200px;
    width: 100%;
    gap: 40px;
    z-index: 2; /* above dark layer */
}
.fullscreen-button {
    position: absolute; /* absolute pos relative to parent */
    bottom: 20px; /* bottom margin */
    right: 20px; /* right margin */
    background-color: rgba(0, 0, 0, 0.5); /* semi-transparent bg */
    border: none; /* no border */
    color: #fff; /* white icon */
    padding: 10px; /* padding */
    border-radius: 50%; /* circle shape */
    cursor: pointer; /* pointer cursor */
    transition: background-color 0.3s, transform 0.3s; /* smooth transitions */
    z-index: 1000; /* above other elems */
}

.fullscreen-button:hover {
    background-color: rgba(0, 0, 0, 0.7); /* darker on hover */
    transform: scale(1.1); /* slight grow on hover */
}

/* ensure parent pos relative */

.teacher-photo img {
    position: absolute;
    top: 50%;
    left: 20%;
    max-width: 100%;
    max-height: 100%;
    transform: translate(-55%, -50%);
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    border-radius: 20px;
    box-shadow: 0 0 30px 30px rgba(0, 0, 0, 0.5);
    flex: 1;
}
.teacher-name {
    position: absolute; /* pos relative to parent (.teacher-words) */
    bottom: 20px; /* from bottom */
    right: 20px; /* from right */
    font-family: 'Lora', serif;
    font-size: 1em; /* font size */
    /* gold color for name */
    color: #e2dfdf; /* text color */
    font-weight: 600; /* boldness */
    text-transform: uppercase; /* uppercase */

}
.teacher-words {
    max-width: 100%;
    font-family: 'Roboto', sans-serif;
    position: relative;
    transform: translate(+30%, -0%);
    color: white; /* white text for contrast */
    padding: 20px; /* padding for text */
    border-radius: 5px; /* rounded corners */
    z-index: 1;
    flex:1;
}
.teacher-words {
    position: relative;
    max-width: 600px;
    font-family: 'Roboto', sans-serif;
    color: #fff;
    padding: 0;
}

.teacher-words p {
    position: relative;
    font-size: 1.2rem;
    line-height: 2; /* increased line height */
    margin-bottom: 20px;
    z-index: 1; /* text above overlay */
}


.highlight {
    position: relative;
    display: inline-block;
    z-index: 1;
    color: #fff;
}

.highlight::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.4em;
    background: linear-gradient(90deg, #ffd65e, #ffc107, #ffca28);
    mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 0) 100%);
    background-blend-mode: lighten;
    z-index: -1;
    transform: translateY(-50%) rotate(-1deg);
    border-radius: 5px;
    opacity: 0.65;
    filter: blur(0.5px);
}

.teacher-words h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
    font-weight: 700;
}

/* mobile styles */
@media screen and (max-width: 1000px) {
    .teacher-container {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .teacher-photo {
        margin-bottom: 20px;
    }

    .teacher-photo img {
        max-width: 80%;
    }

    .teacher-words h2 {
        font-size: 1.8em;
    }

    .teacher-words p {
        font-size: 1em;
    }

    .teacher-name {
        position: static;
        margin-top: 20px;
        text-align: center;
        font-size: 1em;
        color: #e2dfdf;
        font-weight: 600;
        text-transform: uppercase;
    }
}


/* hide scrollbars */
.scroll-container::-webkit-scrollbar {
    display: none;
}

/* slideshow styles */
.slideshow-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
}

.slideshow-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    transform: scale(1.1);
}

.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 100%;
    max-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    box-shadow: 0 0 30px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

/* slideshow controls */
.slideshow-controls {
    position: absolute;
    bottom: 115px;
    width: 100%;
    text-align: center;
    z-index: 1;
}

.slideshow-controls button {
    background-color: transparent;
    opacity: 50%;
    border: none;
    padding: 10px;
    margin: 0 15px;
    font-size: 1.5em;
    color: #fff;
    cursor: pointer;
}

.slideshow-controls button:hover {
    color: #ddd;
}

/* modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal .close:hover,
.modal .close:focus {
    color: #bbb;
}

/* cards container */
.container {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* student cards */
.card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 300px;
    height: 400px;
    margin: 0 auto;
    perspective: 1000px;
    transform: translate(-50%, -50%);
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, filter 0.5s ease-in-out;
    opacity: 1;
    filter: blur(0);
}

.card .front, .card .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.6s;
}

.card .front {
    background-color: #fff;
}

.card .back {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card.flip .front {
    transform: rotateY(180deg);
}

.card.flip .back {
    transform: rotateY(360deg);
}

.card.blur-out-left {
    transform: translate(-150%, -50%);
    opacity: 0;
    filter: blur(10px);
}

.card.blur-out-right {
    transform: translate(150%, -50%);
    opacity: 0;
    filter: blur(10px);
}

.card.blur-in-left {
    transform: translate(-50%, -50%);
    opacity: 1;
    filter: blur(0);
}

.card.blur-in-right {
    transform: translate(-50%, -50%);
    opacity: 1;
    filter: blur(0);
}

.photo {
    position: relative;
    width: 100%;
    height: 100%;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo img, .photo::before {
    border-radius: 20px;
}

.photo::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.overlay {
    position: absolute;
    bottom: 10%;
    width: 100%;
    text-align: center;
    color: #e2dfdf;
    font-weight: 700;
    font-size: 1.15em;
    text-transform: uppercase;
}

.back .phrase {
    font-family: "Amatic SC", sans-serif;
    font-size: 1.9em;
    text-align: center;
    padding: 20px;
    font-style: normal;
    font-weight: 700;
    white-space: pre-wrap;
    color: black;
}

/* side cards styles */
.side-card {
    position: absolute;
    top: 50%;
    width: 150px;
    height: 200px;
    transform: translateY(-50%);
    overflow: hidden;
    border-radius: 20px;
    filter: blur(2px);
    cursor: pointer;
    transition: transform 0.3s;
}

.side-card:hover {
    transform: translateY(-50%) scale(1.05);
}

.left-card {
    left: 10%;
}

.right-card {
    right: 10%;
}

.side-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* made by */
.made-by {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 1em;
    color: #fff;
    opacity: 0.7;
    text-align: center;
}

@media screen and (max-width: 1000px) {
    .made-by {
        font-size: 0.8em;
        bottom: 5px;
        right: 10px;
    }

    .made-by a {
        font-size: 0.8em;
    }
}

/* back to slideshow btn - теперь absolute внутри секции портретов */
.back-to-slideshow {
    position: absolute;
    bottom: 40px;
    right: 20px;
    z-index: 1000;
    display: none;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-slideshow:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.back-to-slideshow svg {
    width: 30px;
    height: 30px;
    fill: white;
    transition: fill 0.3s ease;
}

.back-to-slideshow:hover svg {
    fill: black;
}

a {
    color: white;
    text-decoration: none;
    transition: all .1s;
}

a:hover {
    opacity: .65;
}

/* fullscreen popup */
.fullscreen-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(32, 29, 29, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s;
}

.fullscreen-popup.active {
    visibility: visible;
    opacity: 1;
}

.popup-content, .popup-confirmation-content {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    max-width: 90%;
    width: 400px;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.popup-content p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.popup-content button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.popup-content button:hover {
    background-color: #0056b3;
}

/* Подтверждение скрытия попапа */
.popup-confirmation-content {
    display: none;
    flex-direction: column;
    align-items: center;
}

.popup-confirmation-content p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.confirmation-buttons {
    display: flex;
    gap: 20px;
}

.confirmation-buttons button {
    background-color: transparent;
    border: none;
    font-size: 40px;
    cursor: pointer;
    color: #333;
}

.confirmation-buttons button:hover {
    color: #007BFF;
}

/* hint */
.hint {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  cursor: pointer;
  animation: hint-pulse 1.5s infinite;
}

.hint i {
  font-size: 1.2em;
}

@keyframes hint-pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* scroll down hint (slide-hint) */
.slide-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 1.5em;
    animation: bounce 1.5s infinite;
    z-index: 2000;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
  40% {transform: translateX(-50%) translateY(-10px);}
  60% {transform: translateX(-50%) translateY(-5px);}
}

/* mobile horiz orient styles */
@media screen and (max-width: 1000px) {
    .card {
        width: 30%;
        height: 90%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .overlay {
        font-size: 1em;
    }

    .back .phrase {
        font-size: 1.6em;
    }

    .side-card {
        width: 100px;
        height: 140px;
    }

    .slideshow-controls button {
        font-size: 1em;
    }
}
