/* The root section where I define the colors for the project */
:root {
    --primary-color: #ff8800;
    --secondary-color: #21ad4b;
    --white-color: #ffffff;
    --black-color: #000000;
    --background-color:  #ffdbb3;
}

/* Links */
a {
  font-weight: bold;
  color: var(--background-color);
  text-decoration: none;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

a:hover {
  opacity: 0.5;
  transform: scale(1.15);
}

a:active {
  color: var(--secondary-color); 
}

/* The layout section where I define the layout of the page */
.layout {
    min-height: 100vh; 
    margin: 0; 
    padding: 0; 
    display: flex;
    flex-direction: column;
    font-family: "Voltaire", sans-serif;
}

/* The main section where I define the main content of the page */
.layout__main {
    flex: 1; 
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 4vh;
    padding-bottom: 4vh;
    background-color: var(--background-color);
}

/* The row section where I define a row in the page */
.layout__row {
    display: flex;
    flex-direction: row;
    max-width: 85vw; 
    width: 100%;
    height: 100%;
}

/* Fade-in keyframes */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Apply fade-in to columns */
.layout__column {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.layout__column--left {
    animation-delay: 0.1s;
}

.layout__column--right {
    animation-delay: 0.3s;
}

/* Column section */
.layout__column {
    width: 50%; 
    display: flex;
    box-sizing: border-box; 
}

/* The left column section */
.layout__column--left {
    display: flex;
    justify-content: center; 
    align-items: center; 
    padding: 0; 
    margin: 0;
}

/* The image section of the page (used in home.html, projects.html) */
.layout__column--image {
    width: auto; 
    max-width: 100%; 
    border-radius: 2em;
    height: auto; 
    max-height: 100%; 
    border: 0.3em solid var(--primary-color); 
    object-fit: contain; 
    object-position: center; 
}

.layout__column--image--half {
    transform: scale(0.75);
    width: auto; 
    max-width: 100%; 
    height: auto; 
    max-height: 100%; 
    border: 0.3em solid var(--primary-color); 
    object-fit: contain; 
    object-position: center; 
}

/* Ensure the right column contains the card properly */
.layout__column--right {
    position: relative;
    padding-left: 1em; 
    padding-right: 1em; 
    overflow: hidden; /* Prevent any overflow from animations */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Add some padding to prevent edge clipping during animations */
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

/* A single column section of the page (used in projects.html, piano.html) */
.layout__column--single {
    font-size: clamp(14px, 1.5vw, 32px);
    color: var(--primary-color);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Modern glassmorphism card design for the description */
.layout__description {
    position: relative;
    padding: 2em;
    border-radius: 2em;
    background: var(--primary-color);
    overflow: hidden; 
    transform-style: preserve-3d;
    transition: transform 0.3s ease; 
    font-size: clamp(14px, 1.6vw, 32px);
    line-height: 1.6;
    text-align: justify;
    color: var(--white-color);
    font-weight: 500;
    z-index: 1;
    max-width: 100%;
    box-sizing: border-box;
}


/* Interactive glow effect - properly contained */
.layout__glow {
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 6em;
    height: 6em;
    background: radial-gradient(circle at center, var(--secondary-color), transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.layout__description:hover .layout__glow {
    opacity: 1;
}

/* Sets properties for the layout description name */
.layout__description--name {
    color: var(--primary-color);
    font-size: 1.5em; 
    font-weight: bold;
    text-align: center;
    width: 100%;
}

.layout__project--name {
    color: var(--primary-color);
    font-size: clamp(3em); 
    font-weight: 900; 
    text-align: center;
    width: 100%;
    margin-bottom: 0.5em;
    letter-spacing: 0.05em;
}

/* Sets properties for break line */
.layout__line {
    border: 0; 
    height: 0.2em; 
    background-color: var(--primary-color); 
    margin: 5vh auto; 
    width: 80%; 
}

.video__container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video__container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Sets properties when the screen is smaller than 650px*/
@media (max-width: 650px) {
    .layout__row {
        flex-direction: column; 
        max-height: none; 
        height: auto; 
    }

    /* Combines the left and right columns when the screen is smaller than 650px*/
    .layout__column--left,
    .layout__column--right {
        width: 80vw; 
        flex: none; 
        max-width: 100%; 
        overflow: visible;
    }

    /* Sets the height of the image to auto when the screen is smaller than 650px*/
    .layout__column--left img {
        height: auto; 
        width: 100%; 
    }

    .video__container {
        width: 100%;
        max-width: 100%;
    }

    /* Adjust card design for mobile */
    .layout__description {
        padding: 1.5em;
        border-radius: 15px;
    }
}