* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'lemon milk', sans-serif;
    background-color: #e8e4e1;
    color: #333;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

.page-title {
    font-family: 'lamoric rowen', sans-serif;
    font-size: 12rem;
    color: #4b9a57;
    font-weight: 300;
    letter-spacing: 0.5rem;
    margin-bottom: -1rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.main-header {
    background-color: #5A1414;
    padding: 1.2rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2rem;
}

/* Navigation styles */
.main-nav {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 3rem;
    justify-content: end;
}

/* Button-specific navigation styles */
.nav-link {
    background: none;
    border: none;
    color: #ff7f11;
    font-family: 'lemon milk', sans-serif;
    font-weight: bold;
    font-size: 1.25rem;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: #4b9a57;
    transform: translateY(-2px);
}

.nav-link:focus {
    outline: 2px solid #ff7f11;
    outline-offset: 2px;
}

.nav-link.active {
    color: #4b9a57;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background-color: #4b9a57;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

.author-name {
    text-align: right;
    color: #ff7f11;
    font-size: 1rem;
    letter-spacing: 0.2rem;
    margin-bottom: 2rem;
    font-weight: bold;
}

.content-grid {
    display: grid;
    gap: 0;
    background-color: white;
    border: 3px solid #4A1414;
    position: relative;
}

/* HOME PAGE */
#home .content-grid {
    grid-template-columns: 1fr 1fr;
}

.welcome-section {
    background-color: #add9f4;
    padding: 3rem 2.5rem;
    position: relative;
}

.welcome-text {
    font-family: 'Arial', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    letter-spacing: 0.05rem;
}

.photo-section {
    background-color: #ffe570;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Figure element for images */
figure {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo {
    max-width: 90%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* ABOUT ME PAGE */
#about .content-grid {
    grid-template-columns: 1fr 1fr;
}

.who-section,
.cv-section {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.who-section {
    background-color: #b8d4e8;
}

.cv-section {
    background-color: #b8d4e8;
}

.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #1a1a1a;
    letter-spacing: 0.1rem;
}

.section-photo {
    max-width: 80%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* MY WORK PAGE */
#work .content-grid {
    grid-template-columns: repeat(3, 1fr);
}

.work-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    min-height: 400px;
}

.work-section:nth-child(1) {
    background-color: #ffe570;
}

.work-section:nth-child(2) {
    background-color: #ffe570;
}

.work-section:nth-child(3) {
    background-color: #ffe570;
}

.work-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #1a1a1a;
    letter-spacing: 0.1rem;
    text-align: center;
}

.work-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 1rem;
    display: block;
}

/* CONTACT PAGE */
#contact .content-grid {
    grid-template-columns: 1fr;
}

.contact-section {
    background-color: #add9f4;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 300px;
}

/* Address/contact info styles */
.contact-info {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-info > div {
    font-size: 1.5rem;
    color: #1a1a1a;
}

.contact-label {
    color: #ff7f11;
    font-weight: bold;
    letter-spacing: 0.1rem;
}

.contact-value {
    color: #1a1a1a;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-value:hover {
    color: #4b9a57;
}

.contact-value:focus {
    outline: 2px solid #ff7f11;
    outline-offset: 2px;
}

/* DECORATIVE BUTTONS */
.button {
    position: absolute;
    pointer-events: none;
    width: auto;
    height: auto;
}

/* Positioning buttons home page */
#home .button-red {
    width: 500px;
    top: -230px;  
    right: -100px; 
}

#home .button-green {
    width: 400px;
    bottom: -70px;  
    left: 300px;    
}

#home .button-teal {
    width: 450px;
    top: 450px;      
    left: 300px;  
    transform: translateY(-50%); 
}

#home .button-gold {
    width: 400px;
    bottom: -150px; 
    right: 20px;
}

#home .button-purple {
    width: 350px;
    top: -100px;
    left: -30px;
}

/* Positioning buttons about me page */
#about .button-red {
    width: 400px;
    top: -150px;  
    right: 500px; 
}

#about .button-green {
    width: 500px;
    bottom: 300px;  
    left: 250px;    
}

#about .button-gold {
    width: 400px;
    bottom: 250px; 
    right: -90px;
}

#about .button-purple {
    width: 350px;
    top: -300px;
    left: 350px;
}

/* Positioning buttons my work page */
#work .button-red {
    width: 450px;
    top: -450px;  
    right: -550px; 
}

#work .button-teal {
    width: 400px;
    top: 500px;      
    left: 540px;  
    transform: translateY(-50%); 
}

#work .button-gold {
    width: 500px;
    bottom: -150px; 
    right: 20px;
}

#work .button-purple {
    width: 450px;
    top: -150px;
    left: -170px;
}

/* Positioning buttons contact page */
#contact .button-red {
    width: 400px;
    top: -150px;  
    right: -100px; 
}

#contact .button-green {
    width: 500px;
    bottom: 10px;  
    left: 200px;    
}

#contact .button-teal {
    width: 450px;
    top: 300px;      
    left: 300px;  
    transform: translateY(-50%); 
}

#contact .button-gold {
    width: 400px;
    bottom: -100px; 
    right: 20px;
}

#contact .button-purple {
    width: 550px;
    top: -100px;
    left: -30px;
}

/* Accessibility and interaction improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #ff7f11;
    outline-offset: 2px;
}

@media (max-width: 968px) {
    .main-nav {
        grid-template-columns: repeat(2, auto);
        gap: 1rem;
    }

    .page-title {
        font-size: 4rem;
    }

    #home .content-grid,
    #about .content-grid,
    #work .content-grid {
        grid-template-columns: 1fr;
    }

    .nav-link {
        font-size: 1rem;
    }
}