body {
    margin: 0;
    padding: 0;
    font-family: 'MedievalSharp', Courier, monospace;
    background-color: #0e0f0a;
}

.landing {
    position: relative;
    text-align: center;
    /* Ensure the container doesn't clip the overlay */
    overflow: hidden;
}

.landing::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Gradient: transparent at top, background color at bottom */
    background: linear-gradient(to bottom, rgba(14, 15, 10, 0) 60%, #0e0f0a 100%);
    z-index: 1;
}

.landing img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 0;
}

.title {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #201b10;
    padding: 10px 20px;
    border-radius: 10px;
    z-index: 2;
    font-size: 80px;
}

h1 {
    font-size: 80px;
    color: #E2BF92;
    padding: 10px 50px;
}

p {
    font-family: 'EB Garamond', 'Times New Roman', Times, serif
}

.content {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.about {
    margin: 0px 100px;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 120px; /* space between text and image */
    margin: 0px 50px;
}
.about-content p {
    flex: 1;
    color: #E2BF92; 
    font-size: 26px;
    width: 50%;
    line-height: 1.4;
}
.about-content img {
    width: 500px;
    height: auto;
    flex-shrink: 0;
}

.project-row {
    display: flex;
    align-items: center;
    gap: 120px;
    margin: 20px 0px; 
}

.project {
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: 0.3s ease;
}

.project p {
    flex: 1;
    color: #E2BF92; 
    font-size: 26px;
    text-align: center;
    line-height: 1.4;
}

.project h2 {
    font-size: 40px;
    color: #E2BF92;
    text-align: center;
    margin: 10px;
}

.project img {
    width: 500px;
    height: auto;
    border-radius: 5px;
    transition: 0.3s ease;
}

.project:hover img {
    transform: scale(1.05);
    filter: brightness(1.3);
}

.projects h1 {
    text-align: center;
}

.project-details {
    padding: 20px;
    display: flex;
    gap: 50px;
    flex-direction: row;
    align-items: flex-start; /* This prevents vertical stretching */
    justify-content: center;
    max-width: 1600px;
    margin: 0 auto;
}

.project-details img {
    width: 50%;
    height: auto;
    border-radius: 5px;
    object-fit: contain; /* Maintains aspect ratio */
}

/* When an image is wrapped in an anchor, make the anchor a predictable flex child
   and have the image fill it. This prevents percent widths from being computed
   relative to the anchor's intrinsic size and preserves layout. */
.project-details > a {
    display: block;
    width: 50%;
}
.project-details > a img {
    width: 100%;
    height: auto;
    display: block;
}

.project-details p {
    color: #E2BF92;
    text-indent: 30px;
    font-size: 26px;
    max-width: 900px;
    line-height: 1.6;
    flex: 1; /* Takes remaining space */
    margin: 0; /* Removes default paragraph margin */
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}
.project-links a {
    color: #C49E6C;
    text-decoration: none;
    transition: 0.3s ease;
    font-size: 22px;
}
.project-links a:hover {
    text-decoration: underline;
    color: #b9894a;
    font-size: 25px;
}
