p {
    color: #1F2A33;
    font-size: 20px;
    font-family: "Lato", sans-serif;
    font-weight: 300;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.highlight {
    color: #1F2A33;
}

h1 {
font-family: Montserrat, sans-serif;
font-size: 40px;
padding: 35px 30px;
margin: 0;
}

h2 {
font-family: Montserrat, sans-serif;
font-size: 42px;
color: #1F2A33;
}

body {
background-color: #FAFAFA;
margin: 0;
}

section {
padding: 30px 120px;

}

h3 {
font-family: Montserrat, sans-seriff;
font-size: 22px;
color: #1F2A33;

}

.period {
color: #D97D54;
font-weight: bold;
}

header
{
background-color: #E7E4DD;
display: flex;
justify-content: space-between;
align-items: center;
}

nav a {
color: #1F2A33;
font-family: Montserrat, sans-serif;
text-decoration: none;
font-size: 22px
}

nav a:hover {
color: #D97D54;
}

nav a {
margin-right: 30px;
}

li {
    color: #1F2A33;
    font-family: "Lato", sans-serif;
    font-weight: 300;
    font-size: 20px;
    margin-bottom: 10px;
}

hr {
    border: none;
    height: 4px;
    background-color: #D97D54;
}

.about-details {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding-top: 8px
}

.about-text {
    display: flex;
    gap: 30px;
    width: 100%;
}
.column {
flex: 1;
}

.about-photo {
width: 450px;
height: auto;
margin-top: 225px;
margin-left: 20px;
}

.intro-section {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.intro-text {
    flex: 1;
}

.column h3 {
font-weight: 700;
}


.portfolio-intro p {
max-width: 800px;
line-height: 1.5;
}

.portfolio-links {
    display: flex;
    gap: 80px;
}

.portfolio-links a {
    background-color: #D97D54;
    color: white;
    font-size: 18px;
    font-weight: 300;
    padding: 20px 30px;
    border-radius: 18px;
    text-decoration: none;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    width: 200px;

}

.portfolio-links a:hover {
    background-color: #1F2A33;
}

.portfolio-column {
    flex: 1;
    text-align: center;
}

.portfolio-column p {
margin-top: 36px;
}

.visuals-project {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.project-text {
    flex: 1;
}

.project-image {
    flex: 1;
}

.visuals-project img {
    width: 330px;
    height: auto;
    margin-top: 35px;
    margin-left: 30px;
}

.project-tools {
    margin-top: 60px;
}

.project-divider {
    border: none;
    border-top: 2px solid #D97D54;
    margin: 40px 120px 10px;
}

.project-image img[src="religious-conviction.png"] {
    width: 500px;
    margin-top: 120px;
}

.project-image img[src="geocachingv14.png"] {
    width: 500px;
}

.utah-comparison {
    display: flex;
    gap: 40px;
}

.utah-document {
    flex: 1;
    min-width: 0;
}

.utah-document img {
    width: 100%;
    height: auto;
}

.flipbook-page {
    display: none;
}

.flipbook-page:first-child {
    display: block;
}

.flipbook-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.flipbook-controls button {
    background-color: #D97D54;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
}

.flipbook-controls button:hover {
    background-color: #1F2A33;
}

.flipbook.expanded {
    position: fixed;
    top: 5%;
    left: 10%;
    width: 50%;
    height: 80%;
    overflow-y: auto;
    background-color: #FAFAFA;
    padding: 20px;
    box-sizing: border-box;
    z-index: 1000;x
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.7);
}

.flipbook.expanded img {
    width: 100%;
    height: auto;
}

.utah-document:has(.flipbook.expanded) .flipbook-controls,
.project-image:has(.flipbook.expanded) .flipbook-controls {
    position: fixed;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

.project-image:has(#ggg.expanded) .flipbook-controls,
.project-image:has(#journey.expanded) .flipbook-controls {
    display: none !important;
}

.project-image .flipbook :not(#journey) img {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
}

#journey:not(.expanded) .flipbook-page img {
    width: 100%;
    max-width: none;
    margin: 45px 0 0 0;

}

.magazine-controls {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    color: #1F2A33;
}

.magazine-controls button {
    padding: 8px 14px;
    font-size: 14px;
    font-family: "Montserrat", sans-serif;
    color: #1F2A33;
}

.flipbook.expanded .magazine-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.magazine-controls button {
    background-color: #D97D54;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
}

#safeway.flipbook.expanded {
    left: 20%;
    width: 60%;
}

#safeway.flipbook.expanded img {
    width: 100%;
    max-width: none;
    margin: 0;
}


.project-image:has(#safeway.expanded) > .flipbook-controls {
    display: none;
}

.project-image:has(#safeway) {
    position: relative;
}

.project-image:has(#safeway) > .flipbook-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

#safeway:not(.expanded) {
    margin-top: 40px;
}

/* Outdoor Grant magazine viewer */
.project-image:has(#grant) {
    position: relative;
}

.project-image:has(#grant) > .flipbook-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.project-image:has(#grant.expanded) > .flipbook-controls {
    display: none;
}

#grant:not(.expanded) {
    margin-top: 40px;
}

#grant.flipbook.expanded {
    left: 20%;
    width: 60%;
}

#grant.flipbook.expanded img {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Two-page magazine layout when expanded */
.flipbook.expanded .flipbook-page {
    width: 50%;
    flex-shrink: 0;
}

.flipbook.expanded .flipbook-page img {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
}

.flipbook.expanded {
    align-content: flex-start;
}

.flipbook.expanded .magazine-spread {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

/* Arrange expanded magazine pages side by side */
.flipbook.expanded {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 0 4px;
}

.flipbook.expanded .magazine-controls {
    width: 100%;
    flex-shrink: 0;
}

.flipbook.expanded .flipbook-page {
    width: calc(50% - 2px);
    box-sizing: border-box;
}

/* Give the two-page magazines more reading room */
#safeway.flipbook.expanded,
#grant.flipbook.expanded,
#adapt.flipbook.expanded {
    left: 5%;
    width: 90%;
}

/* Keep magazine navigation visible while scrolling */
.flipbook.expanded .magazine-controls {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #FAFAFA;
    padding: 2px 0;
}

/* Compact magazine navigation buttons */
.flipbook.expanded .magazine-controls button {
    padding: 5px 12px;
    font-size: 12px;
}

.flipbook.expanded {
    padding-top: 0;
}


/* Adapt for Success magazine preview */
#adapt:not(.expanded) .flipbook-page:first-child {
    display: block;
}

#adapt:not(.expanded) {
    margin-top: 40px;
}

#adapt:not(.expanded) img {
    width: 85%;
    max-width: 500px;
    height: auto;
    margin: 0;
}

.utah-document:has(#adapt) {
    position: relative;
}

.utah-document:has(#adapt) > .flipbook-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.utah-document:has(#adapt.expanded) > .flipbook-controls {
    display: none;
}

/* Adapt for Success button positioning */
.project-image:has(#adapt) {
    position: relative;
}

.project-image:has(#adapt) > .flipbook-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Hide the outside button when the magazine is open */
.project-image:has(#adapt.expanded) > .flipbook-controls {
    display: none;
}

/* Space between Adapt for Success paragraphs */
.visuals-project .project-text p + p {
    margin-top: 20px;
}

.project-text .flipbook-controls {
    display: flex;
    justify-content: flex-end;
}

.project-text:has(+ .project-image #adapt) {
    display: flex;
    flex-direction: column;
}

.project-text:has(+ .project-image #adapt) .flipbook-controls {
    margin-top: auto;
}

#ggg:not(.expanded) .flipbook-page {
    display: none;
}

#ggg:not(.expanded) .flipbook-page:nth-child(2) {
    display: block;
}

#journey:not(.expanded) .flipbook-page:nth-child(2) {
    display: block;
}

#ggg.expanded .flipbook-page,
#journey.expanded .flipbook-page {
    width: 100%;
}

#ggg.expanded .flipbook-page img,
#journey.expanded .flipbook-page img {
    width: 100%;
    max-width: none;
}

.project-image:has(#ggg) {
    padding-top: 150px;
}

#ggg:not(.expanded) .flipbook-page img {
    width: 100%;
    max-width: none;
    margin: 0;
}

.project-image video {
    margin-top: 20px;
}

.video-caption {
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 0;
}

.article-link {
    display: inline-block;
    background-color: #D97D54;
    color: white;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
}

/* Full-screen document viewers — Communication page only */
#ggg.flipbook.expanded,
#journey.flipbook.expanded {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
    background-color: #FAFAFA;
    padding: 20px;
    margin: 0;
    z-index: 1000;
    display: block;
}

/* Display one large document page */
#ggg.flipbook.expanded .flipbook-page,
#journey.flipbook.expanded .flipbook-page {
    width: 100%;
}

/* Keep the navigation accessible */
#ggg.flipbook.expanded .magazine-controls,
#journey.flipbook.expanded .magazine-controls {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1001;
    background-color: #FAFAFA;
    padding: 10px 0;
}

/* Fit Communication documents within the screen */
#ggg.flipbook.expanded .flipbook-page img,
#journey.flipbook.expanded .flipbook-page img {
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 100px);
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Restore page navigation on Research & Design */
#safeway .magazine-controls,
#grant .magazine-controls,
#adapt .magazine-controls {
    display: flex;
}
