@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

     @font-face {
        font-family: myFont;
        src: url('delta.ttf') format('truetype');
    }

*{
margin: 0;
padding: 0;
box-sizing: border-box;
text-decoration: none;
border: none;
outline: none;
font-family: 'Poppins', sans-serif;
}

html{
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    background: url('assets/yoshi.gif') center center fixed;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Image track styles */
#image-track > .image {
    width: 20vmin;
    height: 36vmin;
    object-fit: cover;
    object-position: center;
}

#image-track {
    display: flex;
    gap: 4vmin;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(0%, -50%);
}

#image-track-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

#image-track {
  display: flex;
  gap: 2rem;
  position: absolute;
  left: 50%;
  top: 25%;
  transform: translate(0%, -50%);
  will-change: transform;
}

.image {
  flex-shrink: 0;
  width: 300px;
  height: auto;
  transition: opacity 0.3s ease;
}

/* Gradient fade edges */
#image-track-wrapper::before,
#image-track-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

#image-track-wrapper::before {
  left: 0;
  background: linear-gradient(to right, white, transparent);
}

#image-track-wrapper::after {
  right: 0;
  background: linear-gradient(to left, white, transparent);
}


/* Mobile-specific background fix */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

/* Image optimization */
.cloud-content img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.project-images {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.project-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.education-logo {
    max-width: 200px;
    height: auto;
    margin: 1rem auto;
    display: block;
}

#cycling-image {
    transition: opacity 0.3s ease-in-out;
}

#cycling-image.fade-out {
    opacity: 0;
}

/* Music Character Styles */
.music-character {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.creucat {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.8);
}

.creucat:hover {
    transform: scale(1.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border: 3px solid rgba(255,255,255,1);
}

/* Animation for when music is playing */
.creucat.dancing {
    animation: dance 2s ease-in-out infinite;
}

@keyframes dance {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(-3deg);
    }
    50% {
        transform: translateY(-12px) rotate(0deg);
    }
    75% {
        transform: translateY(-8px) rotate(3deg);
    }
}

/* Enhanced hover effect when dancing */
.creucat.dancing:hover {
    transform: scale(1.2) translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

header{
margin-top: 20px;
position: fixed;
top: 0;
left: 0;
width: 100%;
padding: 1rem 9%;
background-color: transparent;
filter: drop-shadow(10px);
display:flex;
justify-content: space-between;
align-items: center;
z-index: 100;
}

.logo{
    font-size: 3rem;
    color: black;
    font-weight: 800;
    font-family: myFont;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo:hover{
    transform: scale(1.1);
}

/* Mobile menu toggle (hidden by default) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: black;
    margin: 3px 0;
    transition: 0.3s;
}

nav a{
    font-size: 1.8rem;
    color: darkblue;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active{
    color: black;
    border-bottom: 3px solid black;
}

section{
    min-height: 100vh;
    padding: 5rem 9% 5rem;
}

.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: transparent;
}

.home .home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
    z-index: 9999;
    position: absolute;
    top: 43%;
    
}

span{
    color:black;
}

.home-content h3{
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    z-index: 9999;
    position: absolute;
}

.home-img{
    border-radius: 12%;
}

.home-img img{
    position: relative;
    width: 35vw;
    height: 35vw;
    cursor: pointer;
    transition: 0.2s linear;
    border-radius: 102%;
    box-shadow: 0 0 25px black;
    
}

.home-img img:hover{
    transform: scale(1.1);
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 6rem;
    height: 6rem;
    background-color: transparent;
    border: 0.3rem solid black;
    font-size: 4rem;
    border-radius: 50%;
    transition: 0.3s ease;
}

.social-icons a:hover {
    background-color: black;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 25px black;
}

.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: darkblue;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid darkblue;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover{
    transform: scale(1.03);
    background-color: darkblue;
    color: black;
    box-shadow: 0 0 25px darkblue;
}

.typing-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.typing-text span{
    position: relative;
}

.typing-text span::before{
    content: "new coder";
    color: darkblue;
    animation: words 10s infinite;
}

.typing-text span::after{
    content: "";
    background-color: transparent;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid darkblue;
    right: -8px;
    animation: cursor 0.8s infinite;
}

@keyframes cursor {
    to{
        border-left: 3px solid transparent;
    }
}

@keyframes words{
    0%, 20%{
        content: "SJU student"
    }
    21%, 40%{
        content: "Coder"
    }
    41%, 60%{
        content: "LM Alumni";
    }
    61%, 80%{
        content: "Learner";
    }
    81%, 100%{
        content: "Influencer"
    }
}

/* Cloud Navigation Styles */
.cloud-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
}

.cloud-button {
    position: absolute;
    width: 120px;
    height: 80px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 201;
}

.cloud-button svg {
    width: 200%;
    height: 200%;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.cloud-button .cloud-text {
    position: absolute;
    top: 100%;
    left: 100%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    pointer-events: none;
}

/* Cloud positions */
.cloud-home {
    top: 15%;
    left: 10%;
}

.cloud-about {
    top: 20%;
    right: 15%;
}

.cloud-education {
    top: 60%;
    left: 5%;
}

.cloud-work {
    top: 70%;
    right: 12%;
}

/* Animated state */
.cloud-button.active {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(3);
    z-index: 300;
}

/* Cloud content modal */
.cloud-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 301;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.cloud-content.active {
    opacity: 1;
    visibility: visible;
}

.cloud-content h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

.cloud-content h3 {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: #333;
}

.cloud-content p {
    font-size: 1.6rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}

.cloud-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

/* About section specific styles */
.about-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.japanese-text {
    font-size: 2rem;
    color: #207eb8;
    margin-top: 0.5rem;
}

.close-cloud {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-cloud:hover {
    color: #333;
}

/* Overlay */
.cloud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cloud-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tablet responsive styles */
@media (max-width: 1024px) {
    html {
        font-size: 55%;
    }
    
    .home {
        gap: 4rem;
    }
    
    .cloud-button {
        width: 100px;
        height: 65px;
    }
    
    .cloud-button .cloud-text {
        font-size: 1.2rem;
    }
    
    .music-character {
        bottom: 15px;
        right: 15px;
    }
    
    .creucat {
        width: 70px;
        height: 70px;
    }
}

/* Mobile responsive styles */
@media(max-width: 768px){
    html {
        font-size: 50%;
    }
    
    header {
        padding: 1rem 5%;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .home{
        flex-direction: column;
        margin: 5rem 2rem;
        gap: 3rem;
        text-align: center;
    }

    .home .home-content h1{
        font-size: 4.5rem;
    }
    
    .home .home-content h3{
        font-size: 3rem;
    }
    
    .home-img img{
        width: 60vw;
        height: 60vw;
        margin-top: 2rem;
    }
    
    .typing-text {
        font-size: 2.5rem;
        min-width: 200px;
    }
    
    /* Cloud adjustments for mobile */
    .cloud-button {
        width: 80px;
        height: 50px;
    }
    
    .cloud-button .cloud-text {
        font-size: 1rem;
    }
    
    /* Reposition clouds for mobile */
    .cloud-home {
        top: 12%;
        left: 8%;
    }

    .cloud-about {
        top: 18%;
        right: 8%;
    }

    .cloud-education {
        top: 65%;
        left: 8%;
    }

    .cloud-work {
        top: 72%;
        right: 8%;
    }
    
    /* Modal adjustments */
    .cloud-content {
        width: 95%;
        max-width: none;
        padding: 2rem;
        max-height: 85vh;
    }
    
    .cloud-content h2 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .cloud-content h3 {
        font-size: 2rem;
    }
    
    .cloud-content p {
        font-size: 1.4rem;
    }
    
    .about-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .japanese-text {
        font-size: 1.8rem;
    }
    
    .social-icons {
        justify-content: center;
        gap: 1rem;
    }
    
    .social-icons a {
        width: 5rem;
        height: 5rem;
        font-size: 3rem;
    }
    
    .project-images {
        flex-direction: column;
        align-items: center;
    }
    
    .project-image {
        width: 100px;
        height: 100px;
    }
    
    .education-logo {
        max-width: 150px;
    }
    
    /* Music character mobile adjustments */
    .music-character {
        bottom: 10px;
        right: 10px;
    }
    
    .creucat {
        width: 60px;
        height: 60px;
    }
    
    .close-cloud {
        top: 0.5rem;
        right: 1rem;
        font-size: 2rem;
    }
}

/* Extra small mobile devices */
@media(max-width: 480px) {
    html {
        font-size: 45%;
    }
    
    .home .home-content h1 {
        font-size: 4rem;
    }
    
    .home .home-content h3 {
        font-size: 2.5rem;
    }
    
    .typing-text {
        font-size: 2rem;
    }
    
    .cloud-content {
        padding: 1.5rem;
    }
    
    .cloud-content h2 {
        font-size: 2rem;
    }
    
    .cloud-content p {
        font-size: 1.3rem;
    }
    
    .social-icons a {
        width: 4.5rem;
        height: 4.5rem;
        font-size: 2.5rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .cloud-button:hover {
        transform: none;
    }
    
    .cloud-button:active {
        transform: scale(0.95);
    }
    
    .creucat:hover {
        transform: none;
    }
    
    .creucat:active {
        transform: scale(0.9);
    }
    
    .social-icons a:hover {
        transform: none;
    }
    
    .social-icons a:active {
        transform: scale(0.9);
    }
}