/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    text-align: center;
    box-sizing: border-box;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px 40px;
}

h1 {
    font-size: 48px;
    margin: 0 auto 20px;
    position: relative;
    display: block;
    transition: transform 0.5s ease;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
}

/* Horizontal title styles */
.letter {
    display: inline-block;
    position: relative;
    line-height: 1.2;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0 2px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Container for the interactive hover area */
.hover-container {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    padding: 0;
    cursor: default;
    perspective: 1000px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin: 0 auto;
    overflow: visible;
}

p {
    font-size: 24px;
    line-height: 1.5;
    margin-bottom: 40px;
    font-weight: 700;
    transition: opacity 0.3s ease;
    max-width: 90%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.technologies {
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    transition: opacity 0.3s ease;
    align-self: center;
    text-align: center;
    width: 100%;
}

/* Content positioning */
.content-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Text position variants */
.text-left {
    text-align: left;
    align-self: flex-start;
}

.text-right {
    text-align: right;
    align-self: flex-end;
}

.text-center {
    text-align: center;
    align-self: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-buttons {
    float: right;
    gap: 10px;
}

.header-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 1000;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.back-button i {
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(5px);
}

.cv-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.cv-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.cv-button i {
    transition: transform 0.3s ease;
}

.cv-button:hover i {
    transform: translateY(2px);
}

.language-switch {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
}

.language-switch:hover {
    background: #fff;
    color: #000;
}

/* Hover image styling - improved responsiveness */
.hover-image {
    position: fixed;
    width: min(450px, 60vw); /* Responsive width based on viewport width */
    height: auto;
    max-width: 80vw; /* Prevent overflow */
    max-height: 60vh; /* Prevent vertical overflow */
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 100;
    border-radius: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%) scale(0.4);
    transform-origin: center center;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-container:hover ~ .hover-image,
.hover-image.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Exit animation for image */
.hover-image.fade-out {
    transform: translate(-50%, -50%) scale(0.01);
    transition: transform 0.25s ease, opacity 0.2s ease 0.25s;
    opacity: 0;
}

.hover-container:hover + .hover-image {
    opacity: 1;
}

/* Text opacity effect on hover */
.hover-container:hover ~ p,
.hover-container:hover ~ .technologies {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

/* NEW SLEEK MODERN EXIT EFFECT */
@keyframes modernExit {
    0% {
        transform: translateY(0) rotateX(0);
        opacity: 1;
        filter: blur(0);
    }
    30% {
        transform: translateY(-5px) rotateX(5deg);
        opacity: 0.8;
        filter: blur(0);
    }
    100% {
        transform: translateY(0) rotateX(0);
        opacity: 1;
        filter: blur(0);
    }
}

/* New title exit animation with more dramatic effect */
@keyframes titleExitEffect {
    0% {
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    30% {
        transform: translateY(-8px) scale(1.02);
        filter: blur(0.5px);
    }
    60% {
        transform: translateY(4px) scale(0.98);
        filter: blur(0);
    }
    85% {
        transform: translateY(-2px) scale(1);
        filter: blur(0);
    }
    100% {
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Letter animation for exit effect */
@keyframes letterExitWave {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    20% {
        transform: translateY(-5px) scale(1.1) rotate(-2deg);
        opacity: 0.95;
    }
    40% {
        transform: translateY(3px) scale(0.95) rotate(1deg);
        opacity: 1;
    }
    70% {
        transform: translateY(-2px) scale(1.02) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

.hover-container.exit-effect {
    animation: titleExitEffect 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive design */
@media (max-width: 1200px) {
    .hover-container {
        padding: 0;
    }
    
    h1 {
        font-size: 42px;
        width: 100%;
    }
    
    p {
        font-size: 22px;
        max-width: 95%;
    }
    
    .hover-image {
        width: min(400px, 65vw);
    }
    
    .letter {
        font-size: 42px;
        margin: 0 1px;
    }
}

@media (max-width: 900px) {
    .hover-container {
        padding: 0;
    }
    
    h1 {
        font-size: 38px;
        width: 100%;
    }
    
    p {
        font-size: 20px;
        max-width: 600px;
        margin-bottom: 30px;
    }
    
    .hover-image {
        width: min(380px, 70vw);
    }
    
    .letter {
        font-size: 38px;
        margin: 0 1px;
    }
}

@media (max-width: 700px) {
    .hover-container {
        padding: 0;
    }
    
    h1 {
        font-size: 34px;
        width: 100%;
    }
    
    p {
        font-size: 18px;
        line-height: 1.4;
        margin-bottom: 25px;
    }
    
    .technologies {
        font-size: 16px;
    }
    
    .hover-image {
        width: min(320px, 75vw);
        max-height: 65vh;
    }
    
    .letter {
        font-size: 34px;
        margin: 0;
    }
    
    .back-button {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 500px) {
    .hover-container {
        padding: 0;
    }
    
    h1 {
        font-size: 30px;
        width: 100%;
    }
    
    p {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 20px;
    }
    
    .technologies {
        font-size: 14px;
    }
    
    .hover-image {
        width: min(280px, 85vw);
        max-height: 60vh;
    }
    
    body {
        padding: 10px;
    }
    
    .letter {
        font-size: 30px;
        margin: 0;
    }
    
    .back-button {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* Height-based responsive adjustments */
@media (max-height: 700px) {
    h1 {
        margin-bottom: 15px;
    }
    
    p {
        margin-bottom: 20px;
        max-height: 40vh;
        overflow-y: auto;
    }
    
    .hover-image {
        max-height: 60vh;
    }
}

@media (max-height: 500px) {
    h1 {
        font-size: 30px;
        margin-bottom: 10px;
    }
    
    p {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 15px;
        max-height: 30vh;
    }
    
    .technologies {
        font-size: 12px;
        margin-top: 10px;
    }
    
    .hover-image {
        max-height: 50vh;
        width: min(300px, 50vw);
    }
    
    .letter {
        font-size: 26px;
        line-height: 1.2;
    }
    
    .back-button {
        font-size: 14px;
        top: 10px;
        left: 10px;
    }
}

/* Handle very small screens with both dimensions constrained */
@media (max-width: 500px) and (max-height: 500px) {
    .hover-image {
        width: min(250px, 60vw);
        max-height: 45vh;
    }
}

/* Additional responsive fixes for very small screens */
@media (max-width: 350px) {
    .letter {
        font-size: 24px;
        margin: 0;
    }
    
    .back-button {
        padding: 4px 10px;
        font-size: 12px;
        top: 10px;
        left: 10px;
    }
}

/* New layout section styles */
.layout-section {
    width: 100%;
    padding: 80px 20px;
    background-color: #000;
    position: relative;
    z-index: 1;
}

.layout-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.layout-row {
    display: flex;
    gap: 30px;
    align-items: stretch;
    margin-bottom: 40px;
}

.video-square {
    flex: 0 0 300px;
    height: 300px;
    background-color: #222;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.video-square video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.video-square video::-webkit-media-controls {
    display: none !important;
}

.video-square video::-webkit-media-controls-panel {
    display: none !important;
}

.video-square video::-webkit-media-controls-play-button {
    display: none !important;
}

.video-square video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.video-square video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.video-square video::-webkit-media-controls-mute-button {
    display: none !important;
}

.video-square video::-webkit-media-controls-timeline {
    display: none !important;
}

.video-square video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.video-square video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.video-square video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.video-square video::-webkit-media-controls-overlay-play-button {
    display: none !important;
}

.video-square video::-webkit-media-controls-overlay-enclosure {
    display: none !important;
}

.text-rectangle {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.text-rectangle h3 {
    font-size: 32px;
    margin: 0 0 20px 0;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
}

.text-rectangle p {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-align: center;
}

/* Responsive design for layout section */
@media (max-width: 900px) {
    .layout-row {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .video-square {
        flex: none;
        height: 250px;
    }
    
    .text-rectangle {
        padding: 30px;
    }
    
    .text-rectangle h3 {
        font-size: 24px;
    }
    
    .text-rectangle p {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .layout-section {
        padding: 40px 15px;
    }
    
    .layout-container {
        gap: 20px;
    }
    
    .layout-row {
        margin-bottom: 20px;
    }
    
    .video-square {
        height: 200px;
    }
    
    .text-rectangle {
        padding: 20px;
    }
    
    .text-rectangle h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .text-rectangle p {
        font-size: 14px;
    }
}

/* Gaming video rotation styles */
.gaming-videos {
    position: relative;
}

.gaming-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.gaming-video.active {
    opacity: 1;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9998;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    flex-direction: column;
    justify-content: flex-start;
    padding: 25px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    z-index: 9999;
    background: transparent;
    padding: 40px 20px 20px 20px;
    width: 100%;
    height: auto;
}

/* Scroll animations */
.layout-row {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.layout-row.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.main-content {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-content.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for video and text within rows */
.layout-row.animate-in .video-square {
    animation: slideInFromLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

.layout-row.animate-in .text-rectangle {
    animation: slideInFromRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
}

/* Reverse direction for alternating rows */
.layout-row:nth-child(even).animate-in .video-square {
    animation: slideInFromRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

.layout-row:nth-child(even).animate-in .text-rectangle {
    animation: slideInFromLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced hover effects for animated elements */
.layout-row.animate-in .video-square:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.layout-row.animate-in .text-rectangle:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* Mobile optimizations for animations */
@media (max-width: 768px) {
    .layout-row {
        transform: translateY(30px);
    }
    
    .layout-row.animate-in .video-square,
    .layout-row.animate-in .text-rectangle {
        animation-duration: 0.6s;
    }
    
    .layout-row:nth-child(even).animate-in .video-square,
    .layout-row:nth-child(even).animate-in .text-rectangle {
        animation-duration: 0.6s;
    }
} 