/* ==========================================================================
   RESET & BASE STYLES (Inverted Dark Theme)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

/* ==========================================================================
   GLOBAL LINK STYLES
   ========================================================================== */
a, 
a:visited, 
a:active {
    color: #ffffff !important;
    text-decoration: underline;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: #aaaaaa !important;
    opacity: 0.85;
}

/* ==========================================================================
   HEADER & STABLE NAVIGATION
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #ffffff;
}

.logo-img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

/* Navigation Links Base Style */
.nav-links a {
    text-decoration: none;
    color: #ffffff !important;
    font-size: 0.95rem;
    display: inline-block;
    font-weight: normal;
    transition: color 0.2s ease;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent !important;
}

/* Hover Effect */
.nav-links a:hover {
    font-weight: normal !important;
    text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
    color: #ffffff !important;
}

/* Manual .active class underline */
.nav-links a.active {
    font-weight: normal !important;
    text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
    color: #ffffff !important;
    border-bottom: 2px solid #ffffff !important;
}

/* Automatic underline based on current URL filename (requires saving CSS as a .php file or inline style block) */
.nav-links a[href$="<?php echo basename($_SERVER['PHP_SELF']); ?>"] {
    font-weight: normal !important;
    text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
    color: #ffffff !important;
    border-bottom: 2px solid #ffffff !important;
}

/* ==========================================================================
   GLOBAL PAGE LAYOUT & TYPOGRAPHY
   ========================================================================== */
.page-title {
    padding: 40px 20px 15px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.page-title h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
}

.content-container,
.contact-container,
.blog-container,
.home-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 15px 20px 60px;
    text-align: center;
}

.content-container p,
.contact-intro,
.home-bio,
.blog-container p {
    font-size: 1.15rem;
    line-height: 1.75;
    color: #eeeeee;
    margin: 0 auto 20px;
    max-width: 650px;
}

/* ==========================================================================
   BLOG POST CONTENT & META
   ========================================================================== */
.blog-container {
    max-width: 800px;
    margin: 40px auto 0 auto;
    padding: 45px 50px 50px 50px !important;
    background-color: #1a1a1a !important;
    border: none !important;
    border-radius: 6px;
    box-shadow: none !important;
}

.blog-container > *:first-child {
    margin-top: 15px !important;
}

.post-meta {
    color: #aaaaaa;
    font-size: 0.9rem;
    margin-top: 5px;
}

.blog-figure {
    margin: 30px 0;
    text-align: center;
}

.blog-figure img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.blog-figure figcaption {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #aaaaaa;
    font-style: italic;
}

/* Blog Landing Text Visibility */
.blog-archive p,
.blog-feed p,
.archive-post p,
.post-snippet,
.entry-summary p,
.blog-item p,
article p {
    color: #f0f0f0 !important;
}

.blog-archive h2 a,
.blog-feed h2 a,
.blog-item h2 a,
article h2 a,
.blog-landing-title a {
    color: #ffffff !important;
}

.blog-archive .post-meta,
.blog-feed .post-meta,
article .post-meta,
.post-date {
    color: #cccccc !important;
}

/* ==========================================================================
   POST BOTTOM NAVIGATION
   ========================================================================== */
.post-navigation {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    align-items: center;
    margin: 40px auto 0 auto;
    padding-top: 25px;
    border-top: 1px solid #2a2a2a;
    max-width: 750px;
    width: 100%;
}

.post-navigation .nav-prev {
    text-align: left;
}

.post-navigation .nav-center {
    text-align: center;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-link,
.post-navigation .nav-link:visited {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.post-navigation .nav-link:hover {
    color: #aaaaaa !important;
    text-decoration: underline;
}

/* ==========================================================================
   HOMEPAGE SOCIALS
   ========================================================================== */
.home-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #2a2a2a;
}

.home-socials a,
.home-socials a:visited {
    color: #ffffff !important;
    font-size: 1.5rem;
    text-decoration: none !important;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-block;
}

.home-socials a:hover {
    color: #aaaaaa !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   CONTACT FORM
   ========================================================================== */
.contact-intro a {
    color: #ffffff !important;
    font-weight: 600;
    text-decoration: underline;
}

.contact-intro a:hover {
    color: #aaaaaa !important;
}

/* Contact Form Status Box Styles (Dark Theme) */
.form-status {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid transparent;
}

/* Success State */
.form-status.success {
    background-color: rgba(46, 160, 67, 0.15); /* Soft transparent green */
    border-color: rgba(46, 160, 67, 0.4);
    color: #3fb950; /* Bright, legible green text */
}

/* Error State */
.form-status.error {
    background-color: rgba(248, 81, 73, 0.15); /* Soft transparent red */
    border-color: rgba(248, 81, 73, 0.4);
    color: #f85149; /* Bright, legible red text */
}

.form-status p {
    margin: 0;
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
    max-width: 550px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #dddddd;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #333333;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: #1a1a1a;
    color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.submit-btn {
    align-self: flex-start;
    padding: 10px 24px;
    background-color: #ffffff;
    color: #121212;
    border: 1px solid #ffffff;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.submit-btn:hover {
    background-color: #121212;
    color: #ffffff;
    border-color: #ffffff;
}

.honeypot-field {
    display: none !important;
}

/* ==========================================================================
   GALLERY GRID & LIGHTBOX
   ========================================================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 50px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    overflow: hidden;
    background-color: #1a1a1a;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    cursor: pointer !important;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.03);
}

#image-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: zoom-out;
}

#image-overlay.active {
    display: flex;
}

#overlay-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transition: transform 0.25s ease;
}

/* Video Glitch Fixes */
.blog-video-wrapper,
.video-container {
    pointer-events: auto !important;
    transform: none !important;
    max-width: 100% !important;
}

.video-container video {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    text-align: center;
    padding: 40px 20px;
    color: #888888;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.back-to-top {
    color: #aaaaaa !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.back-to-top:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .gallery {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .page-title {
        padding: 20px;
    }

    .content-container,
    .contact-container,
    .blog-container,
    .home-container {
        padding: 0 20px 40px;
    }

    .blog-container {
        padding: 30px 25px 25px 25px !important;
        margin-top: 25px;
    }

    .post-navigation {
        display: flex !important;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .post-navigation .nav-prev,
    .post-navigation .nav-next {
        text-align: center;
    }
}