#home-content-container
{
    padding: 0;
}

article.content
{
    margin: 10px;
}

article#home-content
{
    margin-left: -20px;
    background-color: rgb(0, 0, 0);
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--skew-offset)) 100%, 0 100%);
    padding: 15px;
    padding-left: 2rem;
    padding-right: calc(15px + var(--skew-offset));
}

article#home-content h3
{
    margin-bottom: 20px;
}

article#home-content h5
{
    margin-top: 10px;
    margin-bottom: 10px;
}

@media (max-width: 991px)
{
    #home-content-container
    {
        padding: 10px;
        align-self: center;
    }

    article#home-content
    {
        margin-right: -20px;
        clip-path: none;
    }
  
}

/* ------------ GALLERY SECTION ------------ */

#gallery
{
    width: 100%;
    clip-path: polygon(var(--skew-offset) 0, 100% 0, calc(100% - var(--skew-offset)) 100%, 0 100%);
}

.gallery-wrapper
{
    display: flex;
    align-items: stretch;
    position: relative;
    width: 100%;
}

/* Image container */
#gallery-image
{
    position: relative;
    flex: 1 1 auto;
    height: 300px;
    overflow: hidden;
}

/* Both images stacked */
#gallery-image img
{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(var(--skew-offset) 0, 100% 0, calc(100% - var(--skew-offset)) 100%, 0 100%);
}

/* next image starts hidden */
#gallery-next
{
    pointer-events: none;
}

/* Buttons */
.gallery-button
{
    border: none;
    clip-path: polygon(var(--skew-offset) 0, 100% 0, calc(100% - var(--skew-offset)) 100%, 0 100%);
    background: rgb(255,255,255);
    border: none;
    color: white;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    z-index: 2;
}

/* Desktop: next button overlays right */
@media (min-width: 992px)
{
    
    #next-button
    {
        margin-left: -40px;
        margin-right: 20px;
    }

    #prev-button
    {
        margin-right: -40px;
    }
}

/* Mobile: buttons inline with image */
@media (max-width: 991px)
{
    main
    {
        padding: 20px !important;
    }
    
    #gallery
    {
        align-self: center;
    }
    
    .gallery-wrapper
    {
        flex-direction: row;
        align-items: stretch;
        width: auto;
        justify-content: center;
    }

    #gallery-image
    {
        height: 300px;
        width: 100%;
        max-width: 450px;
    }

    #next-button
    {
        position: static;
        margin-left: 5px;
    }

    #prev-button
    {
        margin-right: 5px;
    }
}

/* ------------ CURIOSITY SECTION ------------ */

section#curiosity
{
    align-self: center;
    background-color: rgb(0, 0, 0);
    width: 100vw;
    margin-left: -20px;
    margin-right: 0px;
}

.curiosity-box
{
    display: flex;
    align-items: flex-start;
    padding: 25px 12rem;
}

.curiosity-text
{
    flex: 1;
    min-width: 0;   /* allows proper wrapping */
}

.curiosity-header
{
    display: flex;
    align-items: center;
    gap: 0.5rem;     /* keeps them close */
}

.curiosity-title
{
    color: white;
    text-decoration: none;
    margin: 0;
    cursor: pointer;
}

.curiosity-title:visited
{
    color: white;
    text-decoration: none;
}

#curiosity-url
{
    display: inline-block;
}

#refresh-button
{
    cursor: pointer;
    user-select: none;
    font-size: 1.2rem;
}

#curiosity-content
{
    margin-top: 0.5rem;
    margin-bottom: 0;
    color: white;
}

.curiosity-image
{
    display: flex;
    align-items: flex-start;
    margin-top: auto;
    margin-bottom: auto;
    filter: invert(100%);
}

.curiosity-img
{
    max-width: 175px;
    height: auto;
}

.loading
{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-style: italic;
}

.spinner
{
    width: 16px;
    height: 16px;
    border: 3px solid rgba(0,0,0,0.2);
    border-top: 3px solid black;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin
{
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes pulse
{
    0%   { transform: scale(1); }
    25%  { transform: scale(1.15); }
    50%  { transform: scale(1.25); }
    75%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.pulse-animation
{
    animation: pulse 0.45s ease-in-out 2;
}


@media (max-width: 900px)
{
    section#curiosity
    {
        max-width: 60vw;
    }
}

@media (max-width: 768px)
{
    .curiosity-box
    {
        flex-direction: column;
        padding: 2rem;
    }

    .curiosity-image
    {
        margin-top: 1rem;
        align-self: center;
    }

    .curiosity-img
    {
        max-width: 140px;
    }
}

/* ------------ TECH STACK SECTION ------------ */

section#tech-stack
{
    width: 100%;
    max-width: 100%;
    margin-left: 2rem;
    margin-right: 0;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
}

#stack-row
{
    align-self: center;
    width: 100%;
}

#hex-col
{
    width: clamp(280px, 50vw, 510px);
    margin-left: 40px;
}

article#stack-container
{
    width: clamp(280px, 50vw, 510px);
    aspect-ratio: 1;
    position: relative;
    --radius: 200%;
}

#text-col
{
    width: clamp(280px, 50vw, 810px) !important;
    margin-left: auto;
    margin-right: -20px;
}

article#stack-text
{
    clip-path: polygon(var(--skew-offset) 0, 100% 0, 100% 100%, 0 100%);
    width: clamp(280px, 50vw, 810px);
    margin-right: 40px;
    margin-left: 0;
}

@keyframes rotateAnimation
{
	0%   { transform: rotateX(0deg); }
    50%  { transform: rotateX(90deg); }
    100% { transform: rotateX(0deg); }
}

.content-change
{
	animation: rotateAnimation 1s ease-in-out;
}

#stack-text
{
    padding: 2rem calc(3rem + var(--skew-offset)) 2rem calc(3rem + var(--skew-offset));
}


#stack-text h5#stack-title
{
    font-size: 20px;
    margin-bottom: 15px;
    text-transform: none !important;
}

@media (max-width: 1088px)
{
    section#tech-stach
    {
        margin: auto;
    }

    #hex-col
    {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    #text-col
    {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
}