* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    background-color: #0A0E14; 
    color: #DCCFC1;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 50% 50%, #14120E 0%, #0A0E14 100%);
    overflow-x: hidden;
}


.language-selector {
    position: absolute;
    top: 4vh; 
    right: 5vw; 
    z-index: 100;
}


.dropdown {
    position: relative;
    display: inline-block;
}


.dropbtn {
    background: transparent;
    color: #A99071; 
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: clamp(0.7rem, 0.9vw, 1.1rem);
    letter-spacing: 0.2vw;
    cursor: pointer;
    padding: 1vh 1vw;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
}


.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: rgba(10, 14, 20, 0.95); 
    min-width: 5rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.5);
    z-index: 1;
    border: 0.05rem solid rgba(169, 144, 113, 0.2); 
}


.dropdown-content a {
    color: #DCCFC1; 
    padding: 1.5vh 1.5vw;
    text-decoration: none;
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 100;
    font-size: clamp(0.7rem, 0.8vw, 1rem);
    text-align: center;
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
}


header {
    padding: 6vh 5vw; 
}


header {
    display: flex;
    justify-content: flex-start; 
    padding: 2rem 5vw;
}


.logo {
    width: 60%;     
    max-width: 1200px;
    min-width: 0px;
    height: auto;
}


h1 {
    font-weight: 100;
    font-size: clamp(1.5rem, 5vw, 4rem);
    letter-spacing: 0.5vw; 
    color: #DCCFC1;
}


.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    padding: 0 8vw;
}


.main-content-description {
    width: 100%;
    max-width: 85vw;
    margin-bottom: 4vh;
}


h2 {
    font-weight: 100;
    font-size: clamp(1rem, 1.5vw, 2.2rem);
    letter-spacing: 0.1vw;
    line-height: 1.6;
    opacity: 0.8;
}


.input-container {
    width: 100%;
    max-width: 85vw;
    display: flex;
    flex-direction: column;
}


textarea {
    width: 100%;
    height: 25vh; 
    background: rgba(255, 255, 255, 0.03); 
    border: 0.1vw solid rgba(220, 207, 193, 0.15);
    color: #DCCFC1;
    font-family: inherit;
    padding: 2vw;
    font-size: clamp(0.9rem, 1.2vw, 1.5rem);
    resize: none;
    outline: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}


textarea:focus {
    border-color: rgba(169, 144, 113, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 4vw rgba(169, 144, 113, 0.05);
}


.counter {
    text-align: right;
    margin-top: 1.5vh;
    font-size: clamp(0.7rem, 0.9vw, 1.1rem);
    opacity: 0.5;
}


.main-button {
    background: transparent;
    border: 1px solid #A99071;
    color: #A99071;
    padding: 1.5vh 3vw;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.2vw;
    cursor: pointer;
    white-space: nowrap; 
    font-size: clamp(0.75rem, 0.9vw, 1.1rem);
    transition: all 0.3s ease;
}


footer {
    width: 100%;
    padding: 5vh 5vw; 
    margin-top: auto; 
    text-align: center;
}


footer p {
    font-family: inherit;
    font-weight: 100;
    font-size: clamp(0.7rem, 1.5vmin, 1.2rem); 
    color: #DCCFC1;
    opacity: 0.7;
    letter-spacing: 0.15vw;
    line-height: 1.8;
    max-width: 70vw;
    margin: 0 auto;
}


.overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 14, 20, 0.9); 
    backdrop-filter: blur(1.5vh); 
    z-index: 1000;
    justify-content: center;
    align-items: center;
}


.overlay-content {
    background: rgba(20, 18, 14, 0.7); 
    padding: 8vh 5vw; 
    border: 0.05rem solid rgba(169, 144, 113, 0.2);
    width: 90vw;   
    height: 85vh; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: center;
    position: relative;
    box-shadow: 0 0 6vw rgba(0, 0, 0, 0.8);
    overflow-y: auto; 
}


.close-btn {
    position: absolute;
    top: 1.5rem; 
    right: 1.5rem;
    font-size: 2.5rem; 
    color: #A99071;
    cursor: pointer;
    font-weight: 100;
    line-height: 0.8; 
    z-index: 1010; 
    transition: transform 0.3s ease;
}


.close-btn:hover {
    transform: rotate(90deg);
}


.results-title {
    font-weight: 100;
    letter-spacing: 0.5vw;
    text-transform: uppercase;
    margin-bottom: 5vh; 
    color: #A99071;
    font-size: clamp(1.2rem, 2vw, 2rem);
    text-align: center;
    width: 100%;
}


.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 2vw;
    width: 100%;
    max-width: 85vw; 
}


.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 0.05rem solid rgba(169, 144, 113, 0.1);
    padding: 4vh 2vw;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%; 
}


.project-card h4 {
    color: #A99071;
    font-weight: 400;
    margin-bottom: 2vh;
    text-transform: uppercase;
    font-size: clamp(1rem, 1.1vw, 1.3rem);
    min-height: 3.5rem; 
}


.project-card p:first-of-type {
    font-size: clamp(0.85rem, 0.9vw, 1rem);
    line-height: 1.6;
    font-weight: 100;
    height: 15vh; 
    overflow-y: auto; 
    margin-bottom: 3vh;
}


.project-card .motivation {
    font-style: italic;
    opacity: 0.6;
    border-top: 0.05rem solid rgba(220, 207, 193, 0.1);
    padding-top: 3vh;
    margin-bottom: 3vh;
    font-size: clamp(0.8rem, 0.85vw, 0.95rem);
    height: 12vh;
    overflow-y: auto;
}


.project-link {
    margin-top: auto; 
    color: #A99071;
    text-decoration: none;
    font-size: clamp(0.7rem, 0.8vw, 0.9rem);
    letter-spacing: 0.2vw;
    text-transform: uppercase;
    border-bottom: 0.05rem solid transparent;
    align-self: flex-start;
    padding-bottom: 0.2vh;
}


.project-link:hover {
    border-bottom: 0.05rem solid #A99071;
}


.spinner {
    width: clamp(2rem, 5vw, 3.5rem);
    height: clamp(2rem, 5vw, 3.5rem);
    border: 0.15rem solid rgba(169, 144, 113, 0.1);
    border-top: 0.15rem solid #A99071;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2vh;
}


.text-link {
    color: #A99071;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid rgba(169, 144, 113, 0.3);
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.text-link:hover {
    border-bottom-color: #A99071;
    opacity: 1;
    text-shadow: 0 0 10px rgba(169, 144, 113, 0.3);
}


.explore-text {
    flex: 1; 
    text-align: left;
}


.input-controls {
    display: flex;
    justify-content: space-between; 
    align-items: center;            
    margin-top: 4vh;
    width: 100%;
    gap: 2vw;                       
}


.action-bar {
    display: flex;
    justify-content: space-between; 
    align-items: center;            
    margin-top: 3vh;
    width: 100%;
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}


@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .logo {
        width: 85vw;
    }
    header {
        padding: 4vh 5vw;
    }

    .input-container {
        display: flex;
        flex-direction: column;
        align-items: center; 
    }

    .action-bar {
        flex-direction: column; 
        gap: 3vh;
        text-align: center;
    }
    
    .explore-text {
        text-align: center;
    }

    .main-button {
        width: 100%; 
        padding: 2vh;
    }
}


@media (max-width: 480px) {
    .overlay-content {
        padding-top: 10vh; 
        width: 95vw; 
    }

    .close-btn {
        top: 1rem;
        right: 1rem;
        font-size: 2.2rem;
    }

    .results-title {
        margin-top: 2vh;
        font-size: 1.1rem;
    }

    .project-card p:first-of-type {
        height: auto; 
        min-height: 10vh;
        max-height: 20vh;
    }

    .project-card .motivation {
        height: auto;
        min-height: 8vh;
    }
}


@media (max-width: 768px) {
    .input-controls {
        flex-direction: column; 
        gap: 4vh;               
        text-align: center;
    }

    .explore-text {
        text-align: center;
        order: 1; 
    }

    .main-button {
        order: 2; 
        width: 100%; 
        padding: 2vh;
    }
}