/* --- RESET & LAYOUT --- */
body {
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: #fff;
}

body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    
    background-color: #114b51;
    background: linear-gradient(190deg, #073137 20%, #114b51 80%);
    
    opacity: 0; 
    transition: opacity 0.6s ease-in-out;
    pointer-events: none; /* Allows clicks to pass through */
}

body.home-body::before {
    opacity: 1;
}

/* --- LANDING FADE EFFECT --- */
.landing-container {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* When on home page, make it visible */
body.home-body .landing-container {
    opacity: 1;
}

/* HDPI Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
a:hover { opacity: 0.6; }

img { max-width: 100%; display: block; height: auto; }

/* CKEditor fixes */
.ck-content .image { margin: 1.5rem 0; clear: both; text-align: center; }
.ck-content .image img { margin: 0 auto; }

/* --- SIDEBAR (Fixed Left) --- */
.sidebar {
    width: 280px;
    padding: 4rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-links a {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.nav-links a.active { color: #000; font-weight: 600; }

/* --- MAIN CONTENT AREA --- */
.main-content {
    margin-left: 280px;
    flex: 1;
    height: 100vh;
    overflow-y: auto; 
    overflow-x: hidden;
    padding: 4rem 6rem;
}

/* --- LANDING PAGE --- */
.landing-container {
    display: flex;
    /* Calculate height minus padding to ensure perfect vertical center without scroll */
    height: calc(100vh - 8rem); 
    width: 100%;
    align-items: center;
    justify-content: center;
}

.landing-image {
    max-width: 65%;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    /* Shift left to visually center on viewport (counteracting sidebar) */
    transform: translateX(-5rem);
}

/* --- WRITINGS PAGE --- */
.article-item {
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}
.article-meta { font-family: 'Cormorant Garamond', serif; font-style: italic; color: #888; font-size: 1.1rem; margin-bottom: 0.5rem; }
.article-title { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 400; margin-bottom: 1rem; line-height: 1.2; }
.article-desc { margin-bottom: 1.5rem; font-size: 0.95rem; color: #444; }
.read-more { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid #ccc; padding-bottom: 2px; }
.article-image img {
    width: 100%;           
    max-height: 550px;     
    object-fit: cover;     
    object-position: center; 
    transition: opacity 0.4s ease;
}
.article-image:hover img { opacity: 0.99; }


/* --- VIDEOS PAGE --- */
.horizontal-layout {
    overflow-y: hidden;
    overflow-x: auto;
    display: flex;
    align-items: start; 
    margin-left: 0; 
    width: 100vw;
    padding: 0;
}

.video-scroller {
    display: flex;
    gap: 7rem; 
    height: 100vh;
    align-items: flex-start;
    width: max-content;
    min-width: 100%;
    flex-shrink: 0;
    margin-left: 280px;
    padding-left: 6rem; 
    padding-right: 4rem;
    padding-top: 2rem; 
}

.video-item { 
    height: 90vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
    width: auto;
}

.video-wrapper {
    margin-bottom: 1.5rem; 
}

.content-image, .content-video {
    height: 75vh;
    width: auto; 
    max-width: 80vw;
    border-radius: 4px; 
    cursor: pointer; 
    transition: transform 0.2s ease;
    object-fit: contain;
}

.video-meta {
    width: 100%;
    max-width: 80vw;
}


.meta-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    padding-bottom: 0.5rem;
    min-height: 24px;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.meta-right span, img {
    padding: 0.3em;
}

.video-likes {
    font-weight: 500;
}

/* Instagram Icon Styles */
.video-ig-link {
    display: flex;
    align-items: center; 
    line-height: 1;
}

.video-ig-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.video-ig-link:hover .video-ig-icon {
    opacity: 1;
}

.video-client {
    font-family: 'Cormorant Garamond', serif; font-style: italic; color: #888; font-size: 1.1rem;
}

.video-caption {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}

/* --- About Page --- */

.about-container {
    max-width: 800px;
}
.about-container a {
    font-family: 'Cormorant Garamond', serif;
    color: #114b51;
    font-size: 1.2rem; 
    text-decoration: underline;
}

.about-contact-links  {
    display: flex;
}

.about-contact-links a {
    padding: 0.1em;
}

.contact-icon {
    height: 1em;
    width: auto;
    vertical-align: middle;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    html, body {
        scroll-snap-type: y proximity;
        scroll-padding-top: 110px; 
    }

    body { 
        flex-direction: column; 
        height: auto; 
        overflow: auto; 
    }
    
    .sidebar { 
        position: fixed;
        top: 0; left: 0; width: 100%; height: auto;
        padding: 1rem 0rem;
        background: rgba(255,255,255,0.98);
        border-bottom: 1px solid #f0f0f0;
        display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    }
    
    .logo { margin-bottom: 0; font-size: 1.5rem; }
    .nav-links { display: flex; flex-direction: row; gap: 1.5rem; padding: 0;}
    .nav-links a { font-size: 0.8rem; }
    
    .main-content { 
        margin-left: 0; margin-top: 100px;
        padding: 0; 
        height: auto; overflow: visible; 
    }

    /* Landing Page Mobile Fix */
    .landing-container {
        /* Height = Viewport - Header Offset (100px) */
        height: calc(100vh - 100px);
        width: 100%;
        padding: 0;
        
        /* Enforce Flex Centering */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .landing-image {
        max-width: 70%;
        max-height: 50vh;
        width: auto;
        margin: 0 auto;
        /* Reset horizontal shift, add vertical shift up */
        transform: translateY(-8vh);
    }
    
    .horizontal-layout {
        display: block;
        padding: 0;
        margin-left: 0;
        width: 100%;
        margin-top: 100px; 
        overflow-y: visible; 
    }
    
    .video-scroller { 
        flex-direction: column; 
        width: 100%; 
        height: auto; 
	margin: 0;
        padding: 0; 
        gap: 0; 
    }

    .video-item { 
        min-height: 90vh; 
        width: 100%; 
        align-items: center;
        justify-content: center;
        scroll-snap-align: start; 
    }

    .content-video { 
        width: 100%; 
        height: auto; 
        max-height: 85vh; 
    }

    .video-meta {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    .video-wrapper {
        margin-bottom:0;
    }
    .article-item {
    	grid-template-columns: 1fr; gap: 1rem; padding: 2rem;
    }

    .about-container {
    	max-width: 600px;
    	padding: 2rem;
    }
}

/* --- TABLET ADJUSTMENTS --- */
@media (min-width: 769px) and (max-width: 1200px) {
    .article-item {
        /* Switch from 1fr 2fr to a single column */
        grid-template-columns: 1fr; 
        gap: 1.5rem;
        max-width: 800px; /* Prevents the text from becoming too wide to read */
    }

    .article-image img {
        /* Make the image larger in the layout */
        max-height: 300px;
	max-width: auto;
        object-fit: cover;
    }

    .article-text {
        /* Ensure the text starts immediately under the image */
        padding-top: 0;
    }

    .landing-image {
	max-width: 80%;
    }
}

/* Arrow Styling */
.scroll-hint {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    z-index: 1000;
    pointer-events: none; /* Allows clicking through to videos */
    transition: opacity 0.3s ease;
    animation: nudge 2s infinite;
}

/* Simple animation to grab attention */
@keyframes nudge {
    0%, 100% { transform: translate(0, -50%); }
    50% { transform: translate(10px, -50%); }
}

/* Hide arrow on mobile as the vertical scroll is intuitive */
@media (max-width: 768px) {
    .scroll-hint { display: none; }
}
