/* ==========================================================================
   1. FONTS & FONTS IMPORT (Google Fonts CDN)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Roboto+Slab:wght@100..900&family=Vollkorn:ital,wght@0,400..900;1,400..900&display=swap');

/* ==========================================================================
   2. CORE SYSTEM LAYOUT & TYPOGRAPHY
   ========================================================================== */
body {
    background-color: #ffffff;
    font-family: 'Vollkorn', serif;
    font-size: 1.4em;
    line-height: 1.8em;
    text-align: justify;
    font-variant-numeric: slashed-zero;
    color: #2b3656;
    max-width: 85%;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 17rem !important; /* Offset for the taller fixed header at top */
}

/* Headings */
h1 {
    color: #082f4d !important;
    font-family: 'Noto Sans', sans-serif !important;
    font-size: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h2 {
    color: #528bbc !important;
    font-family: 'Noto Sans', sans-serif !important;
    font-size: 2rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

h3 {
    color: #955aa5 !important;
    font-family: 'Noto Sans', sans-serif !important;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

h4 {
    color: #656565 !important;
    font-family: 'Noto Sans', sans-serif !important;
    font-size: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

h5 {
    color: #004f98;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Inline Text Styles */
strong, b {
    font-weight: bold;
}

em, i {
    font-style: italic;
}

/* Links */
a.internal-link, 
main a {
    color: #955aa5 !important;
    font-weight: 500 !important;
    text-decoration: underline !important;
}

a.internal-link:hover, 
main a:hover {
    background-color: #eef2f6 !important;
    color: #955aa5 !important;
}

/* Blockquotes */
getblockquote, blockquote {
    font-family: 'Roboto Slab', serif;
    font-style: italic;
    border-left: 4px solid #528bbc;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #425B76;
}

/* Code Syntax */
code, pre {
    font-family: "Jetbrains Mono Medium", monospace;
    background-color: #f4f4f4;
    font-size: 0.9em;
}

/* ==========================================================================
   3. NAVIGATION MENU (SHELL SETUP)
   ========================================================================== */
/* ==========================================================================
   3. NAVIGATION MENU (SHELL SETUP) AND FIXED HEADER
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/sandiego.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.site-header.scrolled {
    border-bottom: 1px solid #d0dfed;
    box-shadow: 0 0.05rem 1rem rgba(0, 0, 0, 0.15);
}

.site-header.scrolled::before {
    opacity: 0;
}

.header-container {
    position: relative;
    z-index: 1;
    max-width: 85%;
    margin: 0 auto;
    padding: 6rem 2rem; /* Taller vertical padding when unscrolled */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.5s ease;
}

.site-header.scrolled .header-container {
    padding: 1rem 2rem; /* Normal padding when scrolled */
}

.header-logo {
    font-family: 'Noto Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: #082f4d !important;
}

.header-logo a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.header-logo a:hover {
    background-color: transparent !important;
}

.header-nav {
    font-family: 'Noto Sans', sans-serif;
    transition: margin-top 0.5s ease;
}

.header-nav a {
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
    color: #528bbc !important;
    transition: color 0.5s ease, background-color 0.5s ease, text-shadow 0.5s ease, border-color 0.5s ease;
}

.header-nav a:hover {
    color: #082f4d !important;
    background-color: #d0dfed !important;
}

.header-nav a.active {
    color: #082f4d !important;
    border-bottom: 2px solid #082f4d;
    padding-bottom: 4px;
    font-weight: 700;
}

/* Unscrolled state overrides (when header is at the top displaying the dark city background image) */
.site-header:not(.scrolled) .header-logo a {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.site-header:not(.scrolled) .header-nav a {
    position: relative;
    padding: 0.3rem 0.8rem;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    background-color: transparent !important;
    border-bottom: none !important; /* Remove solid border-bottom */
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* Pseudo-elements for hover and active lines when image is displayed */
.site-header:not(.scrolled) .header-nav a::before,
.site-header:not(.scrolled) .header-nav a::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    left: 0;
    background-color: #ffffff !important;
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.2s ease;
}

/* Hover line at the bottom */
.site-header:not(.scrolled) .header-nav a::before {
    bottom: 0;
}

/* Active line at the top */
.site-header:not(.scrolled) .header-nav a::after {
    top: 0;
}

/* Hover state: animate the bottom line */
.site-header:not(.scrolled) .header-nav a:hover::before {
    visibility: visible;
    transform: scaleX(0.75);
}

/* Active state: animate/show the top line */
.site-header:not(.scrolled) .header-nav a.active::after {
    visibility: visible;
    transform: scaleX(0.75);
}

/* Override the local hover background and active border-bottom in unscrolled state */
.site-header:not(.scrolled) .header-nav a:hover {
    color: #ffffff !important;
    background-color: transparent !important;
}

.site-header:not(.scrolled) .header-nav a.active {
    border-bottom: none !important;
    padding-bottom: 0.3rem !important; /* Reset padding to match padding top */
    color: #ffffff !important;
}

/* Vertically position links near the top of the header while keeping logo centered */
.site-header:not(.scrolled) .header-nav {
    align-self: flex-start;
    margin-top: -3.5rem;
}

/* ==========================================================================
   4. OBSIDIAN PARSED IMAGES MECHANICS
   ========================================================================== */
img {
    max-width: 100%;
    height: auto;
    margin-bottom: 0.5em !important;
    border: 1px solid black;
}

img[alt*="left"], img[title*="left"], .img-left {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
}

img[alt*="right"], img[title*="right"], .img-right {
    float: right;
    margin-left: 15px;
    margin-bottom: 10px;
}

img[alt*="center"], img[title*="center"], .img-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    clear: both;
}

/* ==========================================================================
   4b. VIDEO EMBEDS
   ========================================================================== */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 2rem auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .video-container {
        width: 60%;
    }
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   5. UTILITIES / STRUCTURAL RESETS
   ========================================================================== */
main::after {
    content: "";
    clear: both;
    display: table;
}

.blog-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.blog-list li {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.blog-feed {
    margin-top: 2rem;
}

.feed-item {
    margin-bottom: 2.5rem;
}
/* ==========================================================================
   6. BLOG FEED
   ========================================================================== */

/* Force Noto Sans specifically on the feed links */
.feed-title {
    font-family: 'Noto Sans', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.feed-title a {
    text-decoration: none !important;
    color: #528bbc !important;
    font-weight: bold !important;
}

.feed-title a:hover {
    text-decoration: underline;
}

.feed-excerpt {
    margin: 0;
}

.pagination {
    font-family: 'Noto Sans', sans-serif;
}

.pagination a {
    color: #955aa5 !important;
}