@keyframes marbleFloat {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fira Code', monospace;
}

body {
    background-color: #2a2a2a;
    color: #ffffff;
    overflow: hidden;
    perspective: 1000px;
    min-height: 100vh;
    width: 100%;

    background: linear-gradient(
        125deg,
        #2a2a2a,
        #383838,
        #2a2a2a,
        #333333,
        #2a2a2a
    );
    background-size: 400% 400%;
    animation: marbleFloat 15s ease infinite;
}

.page {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    display: none;
    background-color: #2a2a2a;

    background: linear-gradient(
        125deg,
        rgba(42, 42, 42, 0.9),
        rgba(56, 56, 56, 0.9),
        rgba(42, 42, 42, 0.9),
        rgba(51, 51, 51, 0.9),
        rgba(42, 42, 42, 0.9)
    );
    background-size: 400% 400%;
    animation: marbleFloat 15s ease infinite;
    backdrop-filter: blur(10px);
}

.page.active {
    transform: translateX(0) scale(1);
    display: block;
    opacity: 1;
}

/* Landing Page Styles */
.nav-links {
    position: absolute;
    left: 20%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-link {
    font-size: 2.5rem;
    color: #ff9955;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-50px);
    animation: fallIn 1.25s ease-out forwards;
}

.nav-link:nth-child(2) {
    animation-delay: 0.2s;
}

.nav-link:nth-child(3) {
    animation-delay: 0.4s;
}

.nav-link:nth-child(4) {
    animation-delay: 0.6s;
}

.nav-link:hover {
    color: #ffbb88;
}

@keyframes fallIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-image {
    position: absolute;
    right: 18%;
    top: 50%;
    transform: translateY(-50%);
}

.profile-image img {
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 153, 85, 0.3);
}

/* Home Icon */
.home-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #ff9955;
    font-size: 1.5rem;
    text-decoration: none;
    z-index: 1000;
    display: block;
    width: 30px;
    height: 30px;
}

.home-icon::before {
    font-size: 24px;
}

.home-icon:hover {
    color: #ffbb88;
}

/* About Page Styles */
.about-content {
    padding: 80px 20% 20px 20%; /* Adjusted padding to match projects section */
    text-align: center;
    max-height: 100vh;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box; /* Ensure padding is included in height calculation */
}

.about-content::-webkit-scrollbar {
    width: 10px;
}

.about-content::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 5px;
}

.about-content::-webkit-scrollbar-thumb {
    background: #ff9955;
    border-radius: 5px;
}

.about-content::-webkit-scrollbar-thumb:hover {
    background: #ffbb88;
}

.bio {
    margin-bottom: 3rem;
}

.bio h2 {
    color: #ff9955;
    margin-bottom: 1rem;
}

.photo-carousel {
    margin: 2rem auto;
    height: 300px;
    position: relative;
    overflow: hidden;
    width: 500px;
}

#kazakhstan-page .photo-carousel {
    height: 450px; 
    width: 750px;
}

.photo-carousel img {
    height: 100%;
    position: absolute;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.photo-carousel img.active {
    opacity: 1;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: #ff9955;
    font-size: 2rem;
}

.social-links a:hover {
    color: #ffbb88;
}

.resume-btn {
    font-size: 2rem;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.resume-btn::before {
    content: "📄";
}

.kz-btn {
    font-size: 2rem;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.kz-btn::before {
    content: "🛫";
}


.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
}

#resume-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.close-resume {
    position: fixed;
    top: 20px;
    right: 20px;
    color: #ff9955;
    font-size: 30px;
    cursor: pointer;
    z-index: 2001;
}

.no-wrap {
    white-space: nowrap;
}

/* Sailing Page Styles */
.sailing-carousel {
    padding: 70px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-height: 100vh; /* Changed to full viewport height */
    overflow-y: auto;
    position: relative;
    padding-bottom: 20px; /* Add padding at bottom to prevent cutoff */
    box-sizing: border-box; /* Ensure padding is included in height calculation */
}

.sailing-carousel img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block; /* Ensure proper image display */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.sailing-carousel img:hover {
    transform: scale(1.05);
}
/* Add scrollbar styles for sailing carousel */
.sailing-carousel::-webkit-scrollbar {
    width: 10px;
}

.sailing-carousel::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 5px;
}

.sailing-carousel::-webkit-scrollbar-thumb {
    background: #ff9955;
    border-radius: 5px;
}

.sailing-carousel::-webkit-scrollbar-thumb:hover {
    background: #ffbb88;
}




/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;

    background: linear-gradient(
        125deg,
        rgba(42, 42, 42, 0.95),
        rgba(56, 56, 56, 0.95),
        rgba(42, 42, 42, 0.95)
    );
    backdrop-filter: blur(10px);
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    padding: 20px;
}

.prev { left: 20px; }
.next { right: 20px; }

/* Projects Page Styles */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Projects Page Styles */
.projects-content {
    padding: 20px 15% 20px 15%; /* Removed top padding */
    display: grid;
    gap: 2rem;
    max-height: calc(100vh - 60px); /* Adjusted to account for home icon */
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
    grid-template-columns: repeat(2, 1fr);
}



/* Ensure the scrollbar styles remain clean */
.projects-content::-webkit-scrollbar {
    width: 10px;
}

.projects-content::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 5px;
}

.projects-content::-webkit-scrollbar-thumb {
    background: #ff9955;
    border-radius: 5px;
}

.projects-content::-webkit-scrollbar-thumb:hover {
    background: #ffbb88;
}

/* Adjust project cards to ensure proper spacing */
.project {
    margin-bottom: 1rem;
    background-color: #333333;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #ff9955;
    cursor: pointer;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 175px;
    gap: 1.5rem;
    align-items: center;
    background: linear-gradient(
        145deg,
        rgba(51, 51, 51, 0.95),
        rgba(42, 42, 42, 0.95)
    );
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}



.project-content {
    flex: 1;
}

.project-thumbnail {
    width: 100%;
    height: 160px; 
    object-fit: contain;
    border-radius: 5px;
    padding: 5px;
}

.project:hover {
    animation: shake 0.5s ease-in-out;
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-image:hover {
    transform: scale(1.02);  /* Slightly enlarge on hover */
}

.project h3 {
    color: #ff9955;
    margin-bottom: 1rem;
}

.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;

    background: linear-gradient(
        125deg,
        rgba(42, 42, 42, 0.95),
        rgba(56, 56, 56, 0.95),
        rgba(42, 42, 42, 0.95)
    );
    backdrop-filter: blur(10px);
}

.project-modal-content {
    background-color: #333333;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1200px;
    max-height: 80vh;
    padding: 2rem;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    overflow-y: auto;

    background: linear-gradient(
        145deg,
        rgba(51, 51, 51, 0.98),
        rgba(42, 42, 42, 0.98)
    );
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.project-modal-content h3 {
    color: #ff9955;
    margin-bottom: 1.5rem;
    grid-column: 1 / -1;
}

.project-description {
    color: #ffffff;
    line-height: 1.6;
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.close-project-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #ff9955;
    font-size: 30px;
    cursor: pointer;
    z-index: 2001;
}

#scroll-down-for-more {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

/* Enhanced Page Transitions */
.slide-left {
    transform: translateX(-100%) scale(0.8);
    opacity: 0;
}

.slide-right {
    transform: translateX(100%) scale(0.8);
    opacity: 0;
}

.slide-up {
    transform: translateY(-100%) scale(0.8);
    opacity: 0;
}

.slide-down {
    transform: translateY(100%) scale(0.8);
    opacity: 0;
}

.entering-left {
    transform: translateX(100%) scale(0.8);
    opacity: 0;
}

.entering-right {
    transform: translateX(-100%) scale(0.8);
    opacity: 0;
}

.entering-up {
    transform: translateY(100%) scale(0.8);
    opacity: 0;
}

.entering-down {
    transform: translateY(-100%) scale(0.8);
    opacity: 0;
}

#age {
    font-size: 1em;
}

/* Add these styles to your styles.css */
.kazakhstan-content {
    padding: 80px 20% 20px 20%;
    text-align: center;
    max-height: 100vh;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
}

.kazakhstan-content h2 {
    color: #ff9955;
    margin-bottom: 1rem;
    animation-delay: .2s;
}

.kazakhstan-content h3 {
    color: #ffbb88;
    margin-bottom: 2rem;
    animation-delay: 0.4s;
}

.event-details {
    text-align: left;
    background: linear-gradient(
        145deg,
        rgba(51, 51, 51, 0.95),
        rgba(42, 42, 42, 0.95)
    );
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #ff9955;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    animation-delay: 0.6s;
}


/* Add scrollbar styles */
.kazakhstan-content::-webkit-scrollbar {
    width: 10px;
}

.kazakhstan-content::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 5px;
}

.kazakhstan-content::-webkit-scrollbar-thumb {
    background: #ff9955;
    border-radius: 5px;
}

.kazakhstan-content::-webkit-scrollbar-thumb:hover {
    background: #ffbb88;
}