/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.6;
    color: #333;
}
.letters-container {
    background-color: #FAEEE5;
}
.ast-below-header-wrap {
    background-color: #ffffff !important;
}

#header {
    display: none !important;
}

#intro-cover {
    width: 100%;
    height: 100%; /* Will be set dynamically by JS */
    background: #5b612b;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.intro-cover-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.intro-cover-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 0 32px;
    width: 100vw;
    height: 100%;
    opacity: 0.32;
    font-size: 2.1vw;
    font-weight: 900;
    color: #2d2f1a;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}

.intro-grid span {
    color: #2d2f1a;
    font-weight: 900;
    white-space: nowrap;
    text-align: center;
    transition: color 0.3s;
}

.intro-grid .highlight {
    color: #d6c94b;
}

.intro-title {
    font-size: 4.48vw;
    font-weight: 900;
    color: #f7f6d2;
    line-height: 0.95;
    margin-bottom: 32px;
    letter-spacing: 2px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.12);
    max-width: 80%;
    height: auto;
}

.intro-desc {
    font-size: 1.25rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 32px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.intro-byline {
    background: #111;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 8px 32px;
    border-radius: 4px;
    margin-bottom: 32px;
    display: inline-block;
    letter-spacing: 1px;
}

.intro-arrow {
    font-size: 2.5rem;
    color: #fff;
    margin-top: 16px;
    animation: intro-arrow-bounce 1.5s infinite;
    cursor: pointer;
    user-select: none;
}

@keyframes intro-arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(18px); }
}

@media (max-width: 900px) {
    .intro-title { 
        font-size: 7.04vw; 
        max-width: 85%;
    }
    .intro-grid { font-size: 3vw; }
}

@media (max-width: 600px) {
    #intro-cover { height: 100vh; }
    .intro-title { 
        font-size: 8.96vw; 
        max-width: 90%;
    }
    .intro-desc { font-size: 1rem; }
    .intro-grid { font-size: 4vw; }
}

/* Masthead styles */
.masthead {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 320px;
    background-color: #8B4513;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 2.4s ease, position 0.3s, top 0.3s, bottom 0.3s;
    width: 100vw;
}
.masthead.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
}

.masthead-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 18px 40px;
    max-width: none;
    width: 100%;
    height: 300px;
    padding: 10px 20px 0;
}

.masthead-grid span {
    color: #A06A00;
    font-size:36px;
    font-weight: 900;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: opacity 2.4s ease, filter 2.4s ease, color 2.4s ease, font-weight 2.4s ease;
}

.masthead-grid .highlight {
    color: #F5D2B0;
    font-weight: 900;
}

.masthead-grid span.cream-bold {
    color: #F7E3C0;
    font-weight: 900;
}

.masthead-grid span.orange {
    color: #B97A1A;
    font-weight: 900;
}

/* Color variations for words */
.masthead-grid span.color-1 { color: #ffffff; }
.masthead-grid span.color-2 { color: #f0f0f0; }
.masthead-grid span.color-3 { color: #e8e8e8; }
.masthead-grid span.color-4 { color: #e0e0e0; }
.masthead-grid span.color-5 { color: #d8d8d8; }
.masthead-grid span.color-6 { color: #d0d0d0; }
.masthead-grid span.color-7 { color: #c8c8c8; }
.masthead-grid span.color-8 { color: #c0c0c0; }
.masthead-grid span.color-9 { color: #b8b8b8; }
.masthead-grid span.color-10 { color: #b0b0b0; }
.masthead-grid span.color-11 { color: #a8a8a8; }
.masthead-grid span.color-12 { color: #a0a0a0; }

/* Classes for random delays */
.masthead-grid span.delay-0 { transition-delay: 0s; }
.masthead-grid span.delay-1 { transition-delay: 0.2s; }
.masthead-grid span.delay-2 { transition-delay: 0.4s; }
.masthead-grid span.delay-3 { transition-delay: 0.6s; }
.masthead-grid span.delay-4 { transition-delay: 0.8s; }
.masthead-grid span.delay-5 { transition-delay: 1.0s; }
.masthead-grid span.delay-6 { transition-delay: 1.2s; }
.masthead-grid span.delay-7 { transition-delay: 1.4s; }
.masthead-grid span.delay-8 { transition-delay: 1.6s; }
.masthead-grid span.delay-9 { transition-delay: 1.8s; }
.masthead-grid span.delay-10 { transition-delay: 2.0s; }
.masthead-grid span.delay-11 { transition-delay: 2.2s; }

.masthead-grid span.morphing {
    opacity: 0;
    filter: blur(12px);
}

.masthead-grid span.morphing-out {
    opacity: 0;
    filter: blur(12px);
}

.masthead-grid span.morphing-in {
    opacity: 1;
    filter: blur(0);
}
.intro-cover-content img { max-width: 70%; }

/* Section Masthead Container */
.section-masthead-container {
    position: relative;
    width: 100vw;
    height: 320px;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 40px;
    margin-right: -30px;
    margin-top: -15px;
    z-index: 50;
}

/* Section Masthead styles */
.section-masthead {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 320px;
    background-color: #4A5C30;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

/* Section-specific masthead colors */
#wander-ing .section-masthead { background-color: #964719; }
#voice-ing .section-masthead { background-color: #542d22; }
#story-ing .section-masthead { background-color: #304A5C; }
#open-ing .section-masthead { background-color: #5C304A; }
#attune-ing .section-masthead { background-color: #2E6B3E; }
#attend-ing .section-masthead { background-color: #4A305C; }
#return-ing .section-masthead { background-color: #5C4A30; }
#journey-ing-on .section-masthead { background-color: #3E2E6B; }
#about-the-writer .section-masthead { background-color: #4A5C30; }

.section-masthead-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 18px 40px;
    width: 100%;
    height: 300px;
    padding: 10px 20px 0;
    max-width: none;
}

.section-masthead-grid span {
    color: #A06A00;
    font-size: 36px;
    font-weight: 900;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.section-masthead-grid .highlight {
    color: #F5D2B0;
    font-weight: 900;
}

/* About the Writer Section */

#about-the-writer.content-section {
    margin: 0;
}

.about-writer-container {
    display: flex;
    background: linear-gradient(to bottom, #FAEEE5, #F5D2B0);
    min-height: 800px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.about-writer-content {
    flex: 1;
    padding: 40px;
    display: flex;
    align-items: flex-end;
}

.about-writer-text {
    max-width: 500px;
    padding:7%;
    margin-left: 380px;
}

.writer-name {
    font-size: 32px;
    font-weight: 900;
    color: #D32F2F;
    margin-bottom: 20px;
    line-height: 1.2;
}

.content-section p.writer-description {
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    color: #333;
    margin: 0;
}

.about-writer-image {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: left;
    padding: 0;
}

.writer-portrait {
    max-width: 65% !important;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}

/* Container and layout */
.container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
}

/* Left menu styles */
.left-menu {
    position: absolute;
    left: 80px;
    width: 250px;
    height: calc(100vh - 120px);
    padding: 20px 30px;
    overflow-y: auto;
    z-index: 0;
}

.left-menu.sticky {
    position: fixed;
    top: 0;
    left: 80px;
    z-index: 0;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section p {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-category {
    color: #333;
    margin-bottom: 15px;
}

.left-menu ul {
    list-style: none;
}

.left-menu li {
    margin-bottom: 8px;
}

.left-menu a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.left-menu a:hover {
    color: #666;
}

.left-menu a.active {
    color: #d32f2f;
    font-weight: bold;
}

/* Content area styles */
.content-area {
    margin-left: 0;
    padding: 15px 0 0;
    max-width: 100vw;
}

.content-section {
    margin-bottom: 260px;
}

.content-text {
    padding: 15px 20% 15px 420px;
}
.content-text p {
    max-width: 700px;
}

.content-section h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.content-section h1.lettersSectionHeader {
    font-size: 50px;
    color: #764D26;
}

.content-section h2 {
    font-size: 22px;
    margin: 30px 0 15px 0;
    color: #444;
}

.content-section p {
    margin-bottom: 15px;
    text-align: justify;
    font-size: 16px;
    line-height: 1.7;
}
.content-section h5.lettersSectionSubhead {
    color: red;
    margin-bottom: 0;
    padding-top: 30px;
}

.content-section em {
    font-style: italic;
}

.content-section strong {
    font-weight: bold;
}

.content-section a {
    color: #ff0000;
    text-decoration: none;
}

.content-section a:hover {
    color: #000000;
}
.content-section p.dear_kawan {
    margin-bottom: 38px;
}
.content-section p.section_signoff {
    margin-top: 38px;
}

/* Hamburger Menu - Hidden by default on desktop */
.hamburger-menu {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    /* Intro Cover Mobile Adjustments */
    .intro-cover {
        height: 100vh;
        padding: 15px;
    }
    
    .intro-cover-content {
        text-align: center;
    }
    
    .intro-title {
        font-size: 7.74vw;
        max-width: 85%;
    }
    
    .intro-desc {
        font-size: 16px;
    }
    
    .intro-cover-content img {
        max-width: 70%;
    }
    
    /* Hamburger Menu - Show on mobile */
    .hamburger-menu {
        display: block;
        position: fixed;
        top: 280px;
        right: 20px;
        z-index: 1600;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 5px;
        padding: 12px 10px;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
    }
    
    .hamburger-menu span {
        display: block;
        width: 25px;
        height: 3px;
        background: #333;
        margin: 5px 0;
        transition: 0.3s;
    }
    
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Mobile Left Menu */
    .left-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        z-index: 1500 !important;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        padding: 80px 20px 20px 20px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        overflow-y: auto;
    }
    
    .left-menu.active {
        transform: translateY(0);
    }
    
    .left-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .left-menu li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    
    .left-menu a {
        display: block;
        padding: 15px 0;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: color 0.2s ease;
    }
    
    .left-menu a:hover {
        color: #8B4513;
    }
    
    .left-menu a.active {
        color: #8B4513;
        font-weight: 700;
    }
    
    /* Mobile Content Layout */
    .content-area {
        margin-left: 0;
        padding: 0;
        max-width: 100vw;
        width: 100%;
    }
    
    .content-text {
        padding: 15px 35px !important;
    }
    
    /* Mobile Mastheads */
    .section-masthead-container {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        height: 140px;
    }
    
    .section-masthead {
        height: 140px;
    }
    
    .section-masthead-grid {
        gap: 4px 10px;
        padding: 8px;
        height: 124px;
    }
    
    .section-masthead-grid span {
        font-size: 10px;
        letter-spacing: 0.1px;
        line-height: 1.2;
    }
    
    .masthead {
        width: 100vw;
        margin-left: 0;
        padding: 8px 20px;
        height: 140px;
    }
    
    .masthead-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 3px 6px;
        padding: 4px;
        height: 124px;
    }
    
    .masthead-grid span {
        font-size: 10px;
        letter-spacing: 0.1px;
        line-height: 1.2;
    }

    .content-section {
        margin-bottom: 100px;
    }
    
    /* Mobile About Writer */
    .about-writer-container {
        flex-direction: column;
        padding: 0 20px;
        min-height: auto;
    }
    
    .about-writer-content {
        padding: 20px;
        align-items: flex-start;
    }

    .about-writer-text {
        margin: 0;
    }

    .writer-portrait {
        max-width:80% !important;
    }
    
    .about-writer-image {
        padding: 0;
        margin: 0;
        align-items: center;
        justify-content: center;
    }
    
    .writer-name {
        font-size: 24px;
    }
    
    .writer-description {
        font-size: 14px;
    }
    
    /* Mobile Typography */
    .lettersSectionSubhead {
        font-size: 14px;
    }
    
    .lettersSectionHeader {
        font-size: 28px;
    }
    
    .content-section p {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .content-section h1 {
        font-size: 28px;
    }
    
    .content-section h5 {
        font-size: 14px;
    }
    
    /* Mobile Section Navigation */
    .section-nav {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .intro-title {
        font-size: 6.16vw;
    }
    
    .intro-desc {
        font-size: 13px;
    }
    
    .intro-cover-content img {
        max-width: 65%;
    }
    
    .hamburger-menu {
        top: 150px;
        right: 15px;
        padding: 10px 8px;
    }
    
    .hamburger-menu span {
        width: 22px;
        height: 2px;
    }
    
    .section-masthead-grid span {
        font-size: 8px;
    }
    
    .masthead-grid span {
        font-size: 8px;
    }
    
    .lettersSectionHeader {
        font-size: 24px;
    }
    
    .content-section h1 {
        font-size: 24px;
    }
}
.section-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 0 0;
    padding: 0 10px;
}
.section-nav .prev-link,
.section-nav .next-link {
    color: #FF0000;
    font-weight: 700;
    font-size: 1em;
    text-decoration: none;
    transition: color 0.2s;
}
.section-nav .prev-link:hover,
.section-nav .prev-link:focus,
.section-nav .next-link:hover,
.section-nav .next-link:focus {
    color: #4A5C30;
    outline: none;
}
@media (max-width: 600px) {
    .section-nav {
        flex-direction: row;
        gap: 12px;
        align-items: stretch;
    }
    .section-nav .prev-link {
        width: 100%;
        text-align: left;
    }
    .section-nav .next-link {
        width: 100%;
        text-align: right;
    }
}

