/* Google Fonts - with font-display swap to prevent layout shift */
/* @import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;600;700&display=swap'); */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap'); */
/* @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&display=swap'); */

/* Core Layout */
body { 
    /* font-family: 'Work Sans', 'Helvetica Neue', Arial, sans-serif; */
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    /* font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; */
    /* font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif; */
    line-height: 1.6; 
    color: #333; 
    margin: 0; 
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container { 
    max-width: 1100px; 
    margin: auto; 
    padding: 20px 20px 30px;
    flex: 1;
}

/* Navigation with Dropdowns */
nav { 
    background: #222; 
    padding: 0.8rem 2rem;
    position: sticky; 
    top: 0; 
    z-index: 100; 
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    border-bottom: 4px solid transparent;
}

/* Category-specific nav bottom borders */
body.page-stewardship nav { border-bottom-color: #3498db; }
body.page-creation nav { border-bottom-color: #e67e22; }
body.page-writing nav { border-bottom-color: #e74c3c; }
body.page-about nav { border-bottom-color: #27ae60; }

/* nav-bar: always a flex row containing name + hamburger */
.nav-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
}

.site-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    margin-right: 20px;
    white-space: nowrap;
}
.site-name:hover { color: white; }

/* Mobile hamburger — hidden on desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 2px 8px;
    line-height: 1;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    /* On mobile, nav becomes a column: nav-bar on top, links below as overlay */
    nav {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        position: relative;
    }

    /* nav-bar row: full width, name left, button right */
    .nav-bar {
        justify-content: space-between;
        padding: 0.8rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .site-name {
        font-size: 1.1rem;
        margin-right: 0;
    }

    .hamburger {
        display: block;
    }

    /* Overlay panel — hidden until .active */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #222;
        box-shadow: 0 6px 20px rgba(0,0,0,0.5);
        padding: 0;
        flex-wrap: nowrap;
    }

    .nav-links.active { display: flex; }

    /* Top-level links */
    .nav-links > a,
    .nav-links > .nav-item > a {
        display: block;
        padding: 13px 20px;
        margin: 0;
        font-size: 1rem;
        border-bottom: 1px solid #333;
        box-sizing: border-box;
        width: 100%;
    }

    /* nav-item containers */
    .nav-links .nav-item {
        display: block;
        position: static;
        width: 100%;
    }

    /* All dropdowns: flat, always visible */
    .nav-links .dropdown {
        display: block !important;
        position: static !important;
        background: #2a2a2a;
        box-shadow: none !important;
        min-width: unset;
        padding: 0;
        width: 100%;
    }

    /* Destiny 2 — first indent */
    .nav-links .dropdown > .nav-item > a {
        display: block;
        padding: 11px 20px 11px 36px;
        margin: 0;
        font-size: 0.95rem;
        border-bottom: 1px solid #333;
        box-sizing: border-box;
        width: 100%;
    }

    /* Dialogue / Lore — second indent */
    .nav-links .dropdown .dropdown > a {
        display: block;
        padding: 10px 20px 10px 52px;
        margin: 0;
        font-size: 0.9rem;
        color: #bbb;
        border-bottom: 1px solid #2d2d2d;
        box-sizing: border-box;
        width: 100%;
    }

    .nav-item:hover > .dropdown {
        display: block !important;
    }
}

nav a { 
    color: white; 
    text-decoration: underline; 
    margin: 0 15px; 
    font-weight: bold;
    transition: color 0.3s ease;
}
nav a:hover { color: #27ae60; }
nav a[href*="stewardship"]:hover { color: #3498db; }
nav a[href*="creation"]:hover { color: #e67e22; }
nav a[href*="writing"]:hover,
nav a[href*="destiny"]:hover { color: #e74c3c; }
nav a[href*="about"]:hover { color: #27ae60; }

/* Dropdown Navigation */
.nav-container {
    display: inline-block;
    position: relative;
}
.nav-item {
    display: inline-block;
    position: relative;
}
.nav-item > a {
    color: white;
    text-decoration: underline;
    margin: 0 15px;
    font-weight: bold;
    padding: 8px 0;
    display: inline-block;
    transition: color 0.3s ease;
}
.nav-item > a:hover {
    color: #27ae60;
}
.dropdown {
    display: none;
    position: absolute;
    background: #333;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1000;
    left: 0;
    top: 100%;
    padding: 10px 0;
}
.nav-item:hover > .dropdown {
    display: block;
}
.dropdown a {
    color: white;
    padding: 10px 20px;
    text-decoration: underline;
    display: block;
    margin: 0;
    transition: background 0.3s ease, color 0.3s ease;
}
.dropdown a:hover {
    background: #444;
    color: #27ae60;
}
.dropdown .nav-item {
    display: block;
    position: relative;
}
.dropdown .nav-item > a {
    margin: 0;
}
.dropdown .dropdown {
    left: 100%;
    top: 0;
}

/* Hamburger Menu for Mobile */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}
.mobile-nav {
    display: none;
}

/* Homepage Header */
.home-header {
    background: white;
    border-bottom: 5px solid #27ae60;
    padding: 30px 20px 20px;
    text-align: center;
}
.home-header h1 {
    font-size: 2.5rem;
    margin: 0 0 15px;
    color: #111;
}
.home-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Make all links underlined */
a { text-decoration: underline; }

/* Hero and Intro */
header.hero { 
    text-align: center; 
    padding: 20px 20px 30px; 
    background: white; 
    border-bottom: 5px solid #27ae60; 
    margin-bottom: 30px; 
}
header.hero h1 { 
    font-size: 2.8rem; 
    margin: 0; 
    color: #111; 
}
header.hero .intro-text { 
    max-width: 850px; 
    margin: 20px auto; 
    font-size: 1.1rem; 
    text-align: left; 
}
header.hero .intro-text strong { 
    font-size: 1.2rem; 
}

/* The 3-Column Grid - Inverted Pyramid */
.grid { 
    display: grid; 
    gap: 30px; 
    max-width: 1100px; 
    margin: 0 auto; 
}

/* Inverted pyramid layout */
.grid-row-1 { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    margin-bottom: 30px;
}
.grid-row-2 { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
    max-width: 730px; 
    margin: 0 auto 30px;
}
.grid-row-3 { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 30px; 
    max-width: 365px; 
    margin: 0 auto; 
}

.card { 
    background: white; 
    padding: 0px 25px 10px 25px;
    border-radius: 8px; 
    border-top: 10px solid #ddd; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    transition: all 0.3s ease;
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 6px 15px rgba(0,0,0,0.15); 
}
.card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    border-radius: 4px; 
    margin-bottom: 15px; 
    background: #eee; 
}
.card h3 {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 15px;
    text-decoration: underline;
}

/* Make clickable cards larger and add hover color effect */
.card.clickable { 
    cursor: pointer; 
    position: relative;
}
.card.clickable:hover { 
    transform: translateY(-8px) scale(1.02); 
}
.card.clickable h3 {
    color: #0066cc;
}

/* New Category Colors - more vibrant and harmonious */
.blue-block { border-top-color: #3498db; }   /* Stewardship - bright blue */
.brown-block { border-top-color: #e67e22; }  /* Creation - warm orange */
.red-block { border-top-color: #e74c3c; }    /* Writing - vivid red */
.green-block { border-top-color: #27ae60; }  /* About Me - fresh green */

.blue-block.clickable:hover { background: rgba(52, 152, 219, 0.05); }
.brown-block.clickable:hover { background: rgba(230, 126, 34, 0.05); }
.red-block.clickable:hover { background: rgba(231, 76, 60, 0.05); }
.green-block.clickable:hover { background: rgba(39, 174, 96, 0.05); }

/* Project Page Elements - Magazine Style */
.project-entry { 
    background: white;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 6px solid #eee;
    overflow: hidden;
    position: relative;
}
.project-entry .project-hero {
    position: relative;
    height: 320px;
    overflow: hidden;
}
.project-entry .project-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.85));
    pointer-events: none;
}
.project-entry .project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
}
/* Custom image positioning */
.img-top { object-position: top !important; }
.img-center { object-position: center !important; }
.img-bottom { object-position: bottom !important; }
.img-rotate-10 { transform: rotate(10deg) scale(1.3); }
.img-rotate-20 { transform: rotate(20deg) scale(1.3); }
.img-rotate-minus-10 { transform: rotate(-10deg) scale(1.3); }
.img-rotate-minus-20 { transform: rotate(-20deg) scale(1.3); }
.project-entry h2 {
    position: absolute;
    bottom: 22px;
    left: 32px;
    right: 32px;
    margin: 0;
    color: white;
    font-size: 1.9rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.7);
    text-decoration: none;
    z-index: 1;
}

.project-entry .project-content {
    padding: 22px 32px;
}
.project-entry img:not(.project-hero img) { 
    width: 100%; 
    max-width: 400px; 
    height: auto; 
    object-fit: cover; 
    border-radius: 4px; 
    margin: 15px 0; 
}


.project-entry .project-content strong { font-size: 1.2rem; }

.project-link {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 12px;
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #004499;
}

/* 2x2 grids — shorter heroes */
.writing-grid-2x2 .project-entry .project-hero,
.grid-row-1 .project-entry .project-hero {
    height: 190px;
}
.writing-grid-2x2 .project-entry h2,
.grid-row-1 .project-entry h2 {
    font-size: 1.5rem;
    bottom: 14px;
    left: 20px;
    right: 20px;
}
.writing-grid-2x2 .project-entry .project-content,
.grid-row-1 .project-entry .project-content {
    padding: 18px 20px;
}

@media (max-width: 768px) {
    /* Stack all grids to single column */
    .grid-row-1,
    .grid-row-2,
    .writing-grid-2x2 {
        grid-template-columns: 1fr;
    }
    .grid-row-3 {
        max-width: 100%;
    }

    /* Full-width hero images on mobile */
    .project-entry .project-hero {
        height: 220px;
    }
    .project-entry h2 {
        font-size: 1.6rem;
    }
    .writing-grid-2x2 .project-entry .project-hero,
    .grid-row-1 .project-entry .project-hero {
        height: 200px;
    }
    .writing-grid-2x2 .project-entry h2,
    .grid-row-1 .project-entry h2 {
        font-size: 1.4rem;
    }

    /* D2 side-by-side cards: stack on mobile */
    .project-entry [style*="grid-template-columns: 280px"] {
        display: block !important;
    }
    .project-entry [style*="grid-template-columns: 280px"] img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        display: block;
    }
}
/*.logo-bar { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 30px; 
    justify-content: center; 
    padding: 20px; 
    background: #fff; 
    margin-bottom: 30px; 
    border: 1px solid #eee; 
}
*/

.btn { 
    display: inline-block; 
    background: #27ae60; 
    color: white; 
    padding: 12px 25px; 
    text-decoration: none; 
    border-radius: 5px; 
    font-weight: bold; 
    margin-top: 15px; 
}

/* Email CTA Button */
.email-cta {
    text-align: center;
    margin: 15px 0 10px;
}
.email-cta a {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 13px 32px;
    font-size: 1.05rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}
.email-cta a:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

/* Footer */
footer {
    background: #222;
    color: white;
    padding: 20px 20px;
    margin-top: auto;
}
.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-tagline {
    width: 100%;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    margin-bottom: 5px;
}
.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.social-links a {
    color: #999;
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}
.social-links a img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
}
.social-links a:hover {
    color: white;
}
.social-links a:hover img {
    filter: grayscale(0%);
    opacity: 1;
}
.copyright {
    color: #999;
    font-size: 0.9rem;
}
.footer-tagline {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    flex: 1;
}

/* D2 Dialogue - video thumbnails closer to titles */
.video-section {
    margin-bottom: 50px;
    background: white;
    padding: 35px;
    border-radius: 8px;
    border-left: 6px solid #e74c3c;
}
.video-section h2 {
    color: #e74c3c;
    margin-bottom: 10px;
    margin-top: 0;
    text-decoration: underline;
    font-size: 2rem;
}
.video-section > p {
    color: #666;
    margin-bottom: 25px;
    font-style: italic;
}
.video-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.video-thumb {
    display: inline-block;
    width: 300px;
    text-align: center;
    position: relative;
}
.video-thumb iframe {
    width: 100%;
    height: 169px;
    border-radius: 4px;
    margin-bottom: 5px;
}
.video-thumb h3 {
    margin: 5px 0 4px;
    font-size: 1rem;
    color: #333;
    text-decoration: none;
}
.video-thumb a {
    font-size: 0.85rem;
    color: #0066cc;
}

/* Writing page - 2x2 grid */
.writing-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

@media (max-width: 768px) {
    .writing-grid-2x2 {
        grid-template-columns: 1fr;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid-row-1, .grid-row-2, .grid-row-3 {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .home-header h1 {
        font-size: 2rem;
    }
    
    .home-nav > a,
    .home-nav .nav-item {
        display: none;
    }
    
    .hamburger {
        display: block;
        position: absolute;
        left: 20px;
        top: 20px;
    }
    
    .mobile-nav.active {
        display: block;
        background: #333;
        padding: 20px;
        margin-top: 15px;
    }
    
    .mobile-nav a,
    .mobile-nav .nav-item {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #444;
    }
    
    .mobile-nav .dropdown {
        position: relative;
        box-shadow: none;
        background: #444;
        margin-left: 20px;
    }
    
    .mobile-nav .nav-item:hover > .dropdown {
        display: none;
    }
    
    .mobile-nav .dropdown.active {
        display: block;
    }
    
    .dropdown {
        position: relative;
        box-shadow: none;
    }
    .dropdown .dropdown {
        left: 0;
        margin-left: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .video-thumb {
        width: 100%;
    }
}

.logo-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    align-items: center;
    padding: 0px;
    /*background: #f5f5f5;*/
    margin-bottom: 20px;
    /*border-radius: 8px;*/
}

.logo-bar .logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: filter 0.3s ease;
}

/*.logo-bar .logo:hover {
    filter: grayscale(0%) opacity(1);
}*/

.custom-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 169px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
}
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0.9;
    margin-top: -84.5px; /* Half of iframe height to center on image */
}
.video-thumb:hover .play-button-overlay {
    opacity: 1;
}

.text-file-content {
    font-family: "Roboto Mono", "Lucida Console";
}