*{
    box-sizing: border-box;
}

:root{
    --bg: #ffffff;
    --text: #111111;
    --water: #81ABF9;
}

body.dark-mode{
    --bg: #1e1e1e;
    --text: #ffffff;
    --water: #6E5191;
}

body > * {
    min-height: 0;
}

body{
    margin: 0;
    font-family: 'Koho', sans-serif;
    overflow: hidden;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    color: var(--text);
    max-height: 100dvh;
}


.dark-mode-toggle{
    position: absolute;
    top: 10px;
    left: 10px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease;
    pointer-events: auto;
}

.dark-mode-toggle:hover{
    transform: scale(1.1);
}

.icon-moon{
    display: none;
}

body.dark-mode .icon-sun{
    display: none;
}

body.dark-mode .icon-moon{
    display: block;
}

.dark-mode-toggle svg{
    transition: opacity 0.25s ease, transform 0.25s ease;
}

body:not(.dark-mode) .icon-sun{
    opacity: 1;
    transform: scale(1);
}

body:not(.dark-mode) .icon-moon {
    opacity: o;
    transform: scale(0.8);
}

body.dark-mode .icon-moon{
    opacity: 1;
    transform: scale(1);
}



.content{
    display: block;
    text-align: center;
    width: 100%;
    align-items: center;
    margin-bottom: 1rem;
}

.name{
    font-size: 1.5rem;
    text-shadow: 0px 2px 3px rgba(0,0,0,0.25);
    padding: 0 0 0 2rem;
    text-align: center;
    margin: 0;
    
}

.name h1{ 
    margin-bottom: 0;
}

.name h3{
    margin-top: 0;
    margin-bottom: 0;
}

.icons{
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0px 2px 0px rgba(0,0,0,0.15));
    transition: transform 0.25s ease, filter 0.25s ease;
    padding-left: 2.5rem;
    margin: 0;
    
}

.icons svg{
    padding: 0;
    margin: 0;
    
}

.info{
    cursor: pointer;
    transition: transform 0.25s ease;
    transform-origin: center;
}

.info:hover{
    transform: scale(1.15);
}

.link{
    cursor: pointer;
    transition: transform 0.25s ease;
    transform-origin: center;
}

.link:hover{
    transform: scale(1.15);
}

.link-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip {
  display: none;
  position: absolute;
  top: 50%; /* appears below the icon */
  left: 25%;
  transform: translateX(-50%);
  background-color:  rgba(255, 217, 46);
  border: 1px solid  rgba(0, 0, 0);
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 10;
  white-space: nowrap;
  flex-direction: column;
  gap: 6px;
}

.tooltip a {
  display: block;
  text-decoration: none;
  color: #000000;
  padding: 4px 0;
}

.tooltip a:hover {
  text-decoration: underline;
}

.link-wrapper:hover .tooltip {
  display: flex;
}

.work{
    cursor: pointer;
    transition: transform 0.25s ease;
    transform-origin: center;
}

.work:hover{
    transform: scale(1.15);
}

.contact{
    cursor: pointer;
    transition: transform 0.25s ease;
    transform-origin: center;
}

.contact:hover{
    transform: scale(1.15);
}

.projects{
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
}

.projects-grid{
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0 2rem;
    margin: auto 0;
}

.project-card{
    flex: 1 1 0;
    min-width: 0;
    max-width: 250px;
    text-align: center;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: 0.35s ease;
    cursor: pointer;


}

.project-card:hover{
    background-color: rgba(255, 217, 46);
    color: black;
    transform: translateY(-10px)scale(1.02);
    margin: 0;
    font-weight: 500;
}

.project-card img{
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 0.5 0.5 0 0rem;
}

.project-card h3{
    font-size: 1.5rem;
    font-weight: 500;
    padding: 0;
    margin: 0;
}

.project-card p{
    height: 6rem;
    margin: 0;
}


a:has(.project-card) {
  text-decoration: none;
  color: inherit;
}




.island{
    position: fixed;
    bottom: -8px;
    right: 0;
    width: 16rem;
    z-index: 2;
}

.bottle{
    position: absolute;
    bottom: 40%;
    left: 30%;
    transform: translateX(-50%) translateY(-20px);
    transition: transform 0.25s ease;
    width: 40px;
    z-index: 5;
    filter: drop-shadow(0px 3px 3px rgba(0,0,0,0.25));
}

.bottle:hover{
    transform: translateX(-50%) translateY(-40px);
}

.bottle-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(255, 231, 18);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 1rem;
    color: #000000;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform-origin: bottom center;
}

.bottle-tooltip::after {
    content:"";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgb(255, 231, 18) transparent transparent transparent;
}

.bottle:hover .bottle-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.footer-container{
    width: 100%;
    position: relative;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.ship{
    position: absolute;
    bottom: 3rem;
    left: 15%;
    transform: translateX(-15%);
    width: 120px;
    z-index: 2;
    filter: drop-shadow(0px 5px 3px rgba(10, 18, 133, 0.35));
}

#waveCanvas{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

@media (max-width: 700px){
    
    body{
        height: 100dvh;
    }
    
    .content{
        margin-bottom: 2rem;
    }
    
    .name{
        padding: 0.3rem;
    }

    .name h1{
        font-size: 2rem;
    }

    .name h3{
        font-size: 1rem;
        margin-bottom: 0;
    }

    .projects{
        padding: 0 2rem;
        padding-bottom: 1.5rem;
        flex: 1;
    }

    .projects-grid{
       display: grid;
       grid-template-columns: repeat(2, 1fr);
       row-gap: 0;
       column-gap: 1.5rem;
       padding: 0 1.5rem;
       box-sizing: border-box;
       margin: auto 0;
       justify-content: center;
       align-items: center;
       
    }

    .project-card{
    max-width: 200px;
    max-height: 200px;
    
}

    .project-card h3{
        font-size: 1rem;
        font-weight: 501;
    }

    .project-card p{
        font-size: 0.9rem;
    }

    .footer-container{
        height: 150px;
    }

    .ship{
    position: absolute;
    bottom: 1rem;
    transform: translateX(-15%) scale(0.7);
    z-index: 2;
}
}

@media (max-width: 400px){
    
    body{
        height: 100dvh;
    }
    
    .content{
        margin-bottom: 5rem;
    }
    
    .name{
        padding: 0.3rem;
    }

    .name h1{
        font-size: 2rem;
    }

    .name h3{
        font-size: 1rem;
        margin-bottom: 0;
    }

    .projects{
        padding: 0 2rem;
        flex: 0.9;
    }

    .projects-grid{
       display: grid;
       grid-template-columns: repeat(2, 1fr);
       row-gap: 0;
       column-gap: 1.5rem;
       padding: 0 1.5rem;
       box-sizing: border-box;
       margin: auto 0;
       justify-content: center;
       align-items: center;
       
    }

    .project-card{
    max-width: 200px;
    max-height: 200px;
    
}

    .project-card h3{
        font-size: 1rem;
        font-weight: 501;
    }

    .project-card p{
        font-size: 0.9rem;
    }

    .footer-container{
        height: 40%;
    }

    .ship{
    position: absolute;
    bottom: 1.5rem;
    transform: translateX(-15%) scale(0.7);
    z-index: 2;
}
}

 @media (min-width: 701px) {

    .project-card h3{
    font-size: 1.5rem;
    font-weight: 1000;
    padding: 0;
    margin: 0;
}

.project-card p{
    opacity: 1;
    height: 6rem;
    overflow: hidden;
    margin: 0;
    transition: opacity 0.4s ease;
    padding-left: 1rem;
    padding-right: 1rem;
    font-weight: 500;
    font-size: 1rem;
}

.project-card:hover p{
    opacity: 1;
}

}