/* --- Variables & Reset --- */
:root {
    /* GHOST PORTAL OVERRIDE */
    --ghost-accent-color: #0B1623;

    --bg-dark: #0B1623;
    --bg-panel: #0f1d2e;
    --bg-footer: #050b11;
    
    --text-white: #ffffff;
    --text-slate-100: #f1f5f9;
    --text-slate-200: #e2e8f0;
    --text-slate-300: #cbd5e1;
    --text-slate-400: #94a3b8;
    --text-slate-500: #64748b;
    --text-slate-600: #475569;
    --text-slate-700: #334155;

    --border-color: #1e293b;
    --border-hover: #475569;

    --font-serif: 'EB Garamond', serif;
    --font-sans: 'Lato', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Smooth section-to-section scrolling for in-page anchor links --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* clears the fixed .site-nav (~88px) so anchored headings aren't hidden */
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* --- Global Image Reset --- */
img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes tiny gaps under images */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-slate-200);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Typography Helpers --- */
.font-garamond { font-family: var(--font-serif); }
.font-lato { font-family: var(--font-sans); }

.text-silver-gradient {
    background: linear-gradient(to right, #e2e8f0, #94a3b8, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
}

/* --- Navigation --- */
.site-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    padding: 1.5rem 0;
    background-color: transparent;
}

.site-nav.scrolled {
    background-color: rgba(11, 22, 35, 0.95);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border-color);
    padding: 1rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Group */
.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo-group:hover .logo-icon {
    border-color: white;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--text-slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0f2033;
    color: var(--text-slate-100);
    font-family: var(--font-serif);
    font-size: 1.5rem;
    transition: border-color 0.3s;
    padding-top: 0; /* REMOVED: Was 0.25rem, causing the H to sit low */
}

.logo-text { display: flex; flex-direction: column; }
.logo-title { 
    font-family: var(--font-serif); 
    font-size: 1.5rem; 
    line-height: 1; 
    color: white; 
    letter-spacing: 0.025em;
}
.logo-subtitle { 
    font-family: var(--font-sans); 
    font-size: 0.65rem; 
    letter-spacing: 0.2em; 
    color: var(--text-slate-400); 
    text-transform: uppercase; 
}

/* Nav Links Wrapper */
.nav-links { 
    display: flex; 
    align-items: center; 
    gap: 2.5rem; 
}

.nav-links ul {
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links ul li a {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-slate-400);
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-links ul li a:hover { color: white; }

.nav-links ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-links ul li a:hover::after {
    width: 100%;
}

/* Search Button */
.btn-nav-search {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-slate-400);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.btn-nav-search:hover {
    color: white;
}

/* Client Login Button */
.btn-nav-login {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--text-slate-500);
    color: var(--text-slate-300);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-nav-login:hover {
    background: var(--text-slate-100);
    color: var(--bg-dark);
    border-color: white;
}

/* Mobile Toggle */
.mobile-toggle { display: none; background: none; border: none; color: var(--text-slate-300); cursor: pointer; }
.mobile-toggle:hover { color: white; }

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem;
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
    z-index: 40;
}

.mobile-menu-open .mobile-menu-overlay {
    transform: translateY(0);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-link, .mobile-menu-links li a {
    font-family: var(--font-garamond);
    font-size: 1.5rem;
    color: var(--text-slate-300);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.mobile-menu-links li a:hover { color: white; }

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-gradient-1 { position: absolute; top: 0; right: 0; width: 50%; height: 100%; background: linear-gradient(to left, #13253a, transparent); opacity: 0.4; }
.hero-gradient-2 { position: absolute; bottom: 0; left: 0; width: 100%; height: 33%; background: linear-gradient(to top, var(--bg-dark), transparent); z-index: 10; }
.hero-grid { position: absolute; inset: 0; opacity: 0.1; background-image: linear-gradient(#475569 1px, transparent 1px), linear-gradient(90deg, #475569 1px, transparent 1px); background-size: 50px 50px; }

.hero-content { position: relative; z-index: 20; margin-top: 5rem; }
.hero-badge span {
    display: inline-block;
    padding: 0.25rem 1rem;
    border: 1px solid var(--text-slate-600);
    color: var(--text-slate-400);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    color: white;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-desc {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    color: var(--text-slate-400);
    font-weight: 300;
    max-width: 42rem;
    margin: 0 auto 3rem;
}

.hero-actions { display: flex; gap: 1.5rem; justify-content: center; }

.btn-primary {
    background: var(--text-slate-200);
    color: var(--bg-dark);
    padding: 1rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary:hover { background: white; }

.group:hover .group-hover-move {
    transform: translateX(4px);
    transition: transform 0.3s;
}

.btn-outline {
    border: 1px solid var(--text-slate-600);
    color: var(--text-slate-300);
    padding: 1rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
}
.btn-outline:hover { border-color: white; color: white; }

/* --- Gate Section (Fullscreen) --- */
.gate-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem;
}

.gate-bg { position: absolute; inset: 0; z-index: 0; background: var(--bg-dark); }
.gate-gradient { 
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; 
    background: radial-gradient(circle, rgba(15,29,46,1) 0%, rgba(11,22,35,0) 50%); 
    opacity: 0.6;
}
.gate-grid {
    position: absolute; inset: 0; opacity: 0.05; 
    background-image: linear-gradient(#475569 1px, transparent 1px), linear-gradient(90deg, #475569 1px, transparent 1px); 
    background-size: 40px 40px; 
}

.gate-card {
    position: relative;
    z-index: 20;
    background: rgba(15, 29, 46, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 4rem 3rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

.gate-logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    border: 1px solid var(--text-slate-500);
    background: var(--bg-dark);
    color: white;
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.gate-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.gate-text {
    font-size: 1rem;
    color: var(--text-slate-400);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.gate-actions { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }

.btn-gate-primary {
    background: linear-gradient(to right, #e2e8f0, #94a3b8, #e2e8f0);
    color: var(--bg-dark);
    padding: 1rem 3rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    font-weight: 700;
    transition: 0.3s;
    display: inline-block;
    background-size: 200% auto;
    border: 1px solid transparent;
}

.btn-gate-primary:hover {
    background-position: right center;
    color: white;
    border-color: var(--text-slate-200);
    transform: translateY(-1px);
}

.gate-support { font-size: 0.75rem; color: var(--text-slate-500); text-transform: uppercase; letter-spacing: 0.05em; }
.gate-support a { color: var(--text-slate-300); border-bottom: 1px solid var(--text-slate-600); margin-left: 0.5rem; }
.gate-support a:hover { color: white; border-color: white; }


/* --- Member Hub: Dashboard (Logged In) --- */
.dashboard-wrapper { padding-top: 6rem; padding-bottom: 4rem; min-height: 100vh; }

.dashboard-header { margin-bottom: 4rem; border-bottom: 1px solid var(--border-color); padding-bottom: 2rem; }

.dashboard-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.dashboard-badge { 
    display: inline-block; 
    padding: 0.35rem 0.75rem; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid var(--border-color);
    color: var(--text-slate-300);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.user-greeting { font-size: 0.875rem; color: var(--text-slate-400); }
.link-signout { color: var(--text-slate-500); margin-left: 1rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.link-signout:hover { color: white; }

.dashboard-title { font-family: var(--font-serif); font-size: 3.5rem; color: white; margin-bottom: 0.5rem; }
.dashboard-subtitle { font-size: 1.125rem; color: var(--text-slate-400); font-weight: 300; }

.section-label { 
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-slate-500); 
    margin-bottom: 2rem; padding-left: 1rem; border-left: 2px solid var(--text-slate-600);
}

/* --- Archive & Tags --- */
.archive-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag-filter-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-label {
    font-family: var(--font-lato);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-slate-500);
}

.tag-filter-link {
    font-family: var(--font-lato);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-slate-400);
    transition: color 0.3s;
}

.tag-filter-link:hover {
    color: white;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tag-filter-link.active {
    color: white;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tag-filter-link.view-all {
    color: var(--text-slate-600);
    border-left: 1px solid var(--text-slate-700);
    padding-left: 1.5rem;
}
.tag-filter-link.view-all:hover { color: white; }
.tag-filter-link.view-all.active { color: white; }

/* Featured Briefing Card */
.section-dashboard-featured { margin-bottom: 6rem; }
.featured-briefing {
    background: var(--bg-panel);
    border: 1px solid var(--text-slate-600);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
}

.briefing-content { padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.briefing-meta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-slate-400); margin-bottom: 1.5rem; }
.briefing-tag { color: white; margin-right: 1rem; }
a.briefing-tag:hover {
    color: var(--text-slate-300);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.briefing-title { font-family: var(--font-serif); font-size: 2.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.briefing-title a { color: white; }
.briefing-title a:hover { color: var(--text-slate-300); }

.briefing-excerpt { font-size: 1rem; color: var(--text-slate-400); font-weight: 300; margin-bottom: 2rem; line-height: 1.7; }

.btn-read-briefing {
    align-self: flex-start;
    padding: 0.75rem 2rem;
    background: white;
    color: var(--bg-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}
.btn-read-briefing:hover { background: var(--text-slate-200); }

.briefing-image-container { position: relative; height: 100%; min-height: 400px; border-left: 1px solid var(--border-color); }
.briefing-image { width: 100%; height: 100%; object-fit: cover; }


/* --- Philosophy Section --- */
.section-philosophy { padding: 6rem 0; background-color: var(--bg-panel); }

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.header-text { max-width: 42rem; }
.section-title { font-family: var(--font-serif); font-size: 3rem; color: white; margin-bottom: 1rem; }
.section-lead { color: var(--text-slate-400); font-size: 1.125rem; }
.header-icon { color: var(--text-slate-600); opacity: 0.5; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }

.card-feature {
    padding: 2rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    transition: 0.3s;
}
.card-feature:hover { border-color: var(--text-slate-600); }
.card-feature .icon-wrap { color: var(--text-slate-400); margin-bottom: 1.5rem; transition: 0.3s; }
.card-feature:hover .group-hover-white { color: white; }
.card-feature h3 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--text-slate-200); margin-bottom: 1rem; transition: 0.3s; }
.card-feature:hover h3 { color: white; }
.card-feature p { font-size: 0.875rem; color: var(--text-slate-400); font-weight: 300; }

/* --- Insights Section --- */
.section-insights { padding: 6rem 0; background-color: var(--bg-dark); border-bottom: 1px solid var(--border-color); }

.eyebrow { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-slate-400); display: block; margin-bottom: 0.5rem; }
.link-archive { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-slate-400); border-bottom: 1px solid var(--text-slate-600); padding-bottom: 0.25rem; }
.link-archive:hover { color: white; border-color: white; }

.post-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: 0.3s;
}
.post-card:hover { border-color: var(--text-slate-500); }
.post-card-content { padding: 2rem; display: flex; flex-direction: column; height: 100%; }

.post-meta { display: flex; justify-content: space-between; margin-bottom: 1.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-slate-500); }
.post-title { font-family: var(--font-serif); font-size: 1.5rem; color: white; margin-bottom: 1rem; line-height: 1.3; }
.post-excerpt { color: var(--text-slate-400); font-size: 0.875rem; font-weight: 300; margin-bottom: 1.5rem; flex-grow: 1; }
.post-cta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-slate-500); }

/* --- Pagination --- */
nav.pagination {
    margin-top: 4rem;
    font-family: var(--font-lato);
    font-size: 0.875rem;
    color: var(--text-slate-500);
}

/* --- History Section --- */
.section-history { position: relative; padding: 6rem 0; background-color: var(--bg-dark); }
.history-overlay { position: absolute; inset: 0; left: 0; width: 33%; height: 100%; background-color: rgba(15, 23, 42, 0.3); display: none; }
@media (min-width: 1024px) { .history-overlay { display: block; } }

.history-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; }
@media (min-width: 1024px) { .history-grid { grid-template-columns: 1fr 1fr; } }

.history-body p { font-family: var(--font-lato); font-size: 1.125rem; color: var(--text-slate-400); font-weight: 300; line-height: 1.8; margin-bottom: 1.5rem; }

.history-stats { display: flex; align-items: center; gap: 2rem; padding-top: 1rem; font-family: var(--font-garamond); color: var(--text-slate-300); }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 1.875rem; color: white; line-height: 1; margin-bottom: 0.25rem; }
.stat-label { font-family: var(--font-lato); font-size: 0.75rem; color: var(--text-slate-500); text-transform: uppercase; letter-spacing: 0.1em; }
.stat-divider { width: 1px; height: 3rem; background-color: var(--text-slate-600); opacity: 0.5; }

.history-frame { position: relative; width: 100%; aspect-ratio: 4/5; background-color: var(--bg-panel); border: 1px solid var(--border-color); padding: 0.5rem; }
.history-abstract { position: absolute; inset: 0; background-color: #13253a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.line-rotate-45 { position: absolute; width: 120%; height: 1px; background-color: var(--text-slate-600); transform: rotate(45deg); opacity: 0.5; }
.line-rotate-neg-45 { position: absolute; width: 120%; height: 1px; background-color: var(--text-slate-600); transform: rotate(-45deg); opacity: 0.5; }
.frame-inner { position: absolute; inset: 1rem; border: 1px solid var(--text-slate-600); opacity: 0.3; }
.frame-content { text-align: center; position: relative; z-index: 10; }
.frame-year { font-family: var(--font-garamond); font-size: 6rem; color: var(--text-slate-700); opacity: 0.3; display: block; line-height: 1; }
.frame-label { font-family: var(--font-lato); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--text-slate-500); margin-top: 1rem; display: block; }

.history-quote-card {
    position: absolute;
    bottom: -2rem;
    
    /* CHANGE: Move from Left to Right */
    left: auto; 
    right: 0;
    
    width: 12rem;
    height: 12rem;
    background-color: var(--bg-panel);
    border: 1px solid var(--text-slate-600);
    padding: 1.5rem;
    display: none;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 20;
}

@media (min-width: 768px) { .history-quote-card { display: flex; } }
.quote-text { font-family: var(--font-garamond); font-size: 1.5rem; color: white; line-height: 1.3; }

/* --- Team Section --- */
.section-team { 
    padding: 6rem 0; 
    background-color: var(--bg-panel); 
}

.team-header { 
    text-align: center; 
    margin-bottom: 4rem; 
}

.divider-center { 
    width: 6rem; 
    height: 1px; 
    background-color: var(--text-slate-600); 
    margin: 1rem auto 0; 
}

.team-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 2rem; 
    /* INCREASED: From 56rem to 72rem to give cards more breathing room */
    max-width: 72rem; 
    margin: 0 auto; 
}

@media (min-width: 768px) { 
    .team-grid { 
        grid-template-columns: 1fr 1fr; 
    } 
}

/* Make the link wrapper behave correctly */
.team-card-link {
    display: block;
    height: 100%;
    text-decoration: none;
}

.team-card { 
    background-color: var(--bg-dark); 
    /* TWEAKED: Slightly less padding to maximize width for text */
    padding: 2rem; 
    border: 1px solid var(--border-color); 
    transition: 0.3s; 
    height: 100%; /* Ensures cards are equal height */
}

/* Hover effect for the whole card */
.team-card-link:hover .team-card {
    border-color: white; /* Highlight border on hover */
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

/* Flex container for the top of the card (Image + Name) */
.team-header-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Profile Picture Styles */
.team-avatar {
    width: 5rem;  /* 80px */
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--text-slate-600);
    background-color: var(--bg-panel);
    flex-shrink: 0; /* Prevents squishing on small screens */
}

/* Fallback circle if no image exists */
.team-avatar.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-serif);
    font-size: 2rem;
}

.team-info {
    display: flex;
    flex-direction: column;
}

.team-name { 
    font-family: var(--font-garamond); 
    /* TWEAKED: Reduced slightly (1.875 -> 1.75) to help prevent wrapping */
    font-size: 1.75rem; 
    color: white; 
    margin-bottom: 0.25rem; 
    line-height: 1.1;
}

.team-role { 
    font-family: var(--font-lato); 
    font-size: 0.75rem; 
    color: var(--text-slate-500); 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    margin: 0;
}

.team-bio { 
    font-family: var(--font-lato); 
    font-size: 0.875rem; 
    color: var(--text-slate-400); 
    font-weight: 300; 
    line-height: 1.6; 
}


/* --- Contact Section --- */
.section-contact { padding: 6rem 0; background-color: var(--bg-dark); border-top: 1px solid var(--border-color); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-lead { font-family: var(--font-lato); font-size: 1.125rem; color: var(--text-slate-400); font-weight: 300; margin-bottom: 2.5rem; }
.contact-details { display: flex; flex-direction: column; gap: 2rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.icon-contact { width: 1.25rem; height: 1.25rem; color: var(--text-slate-500); margin-top: 0.25rem; }
.contact-label { font-family: var(--font-garamond); font-size: 1.25rem; color: white; margin-bottom: 0.25rem; }
.contact-val { font-family: var(--font-lato); font-size: 0.875rem; color: var(--text-slate-400); font-weight: 300; line-height: 1.5; }

.contact-form-wrapper { background-color: var(--bg-panel); padding: 2rem; border: 1px solid var(--border-color); }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group label { display: block; font-family: var(--font-lato); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-slate-500); margin-bottom: 0.5rem; }
.form-group input, .form-group textarea {
    width: 100%; background-color: var(--bg-dark); border: 1px solid var(--border-color); color: var(--text-slate-200); padding: 0.75rem; outline: none; transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: white; }

.btn-submit {
    width: 100%; padding: 1rem; background-color: var(--text-slate-200); color: var(--bg-dark); 
    font-family: var(--font-lato); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; border: none; cursor: pointer; transition: 0.3s;
}
.btn-submit:hover { background-color: white; }

/* --- Single Post --- */
.article-page { padding-top: 8rem; padding-bottom: 6rem; background: var(--bg-dark); }
.btn-back { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-slate-400); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2rem; }
.btn-back:hover { color: white; }

.article-header { max-width: 56rem; margin-bottom: 4rem; border-bottom: 1px solid var(--border-color); padding-bottom: 3rem; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-slate-500); margin-bottom: 1.5rem; }
.meta-item { display: flex; align-items: center; gap: 0.5rem; }

a.meta-item:hover {
    color: white;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- Print Button & Tooltip Styles --- */
.btn-action-print {
    /* Reset default button styles */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;

    /* TYPOGRAPHY: Match .article-meta exactly */
    font-family: var(--font-sans); 
    font-size: 0.75rem;           /* Matches other meta items */
    text-transform: uppercase;    /* Forces "Print" to "PRINT" */
    letter-spacing: 0.1em;        /* Matches the wide spacing */
    color: var(--text-slate-500); /* Matches the grey color */
    
    /* Layout */
    display: flex;
    align-items: center;
    position: relative; 
    overflow: visible;
    transition: color 0.3s;
}

.btn-action-print:hover {
    color: white;
}

/* The Tooltip Box (Hidden by default) */
.print-tooltip {
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 0.75rem;
    
    /* Position: Bottom of the button */
    position: absolute;
    top: 130%; 
    left: 50%;
    transform: translateX(-50%); /* Centers it */
    
    /* Typography */
    font-family: var(--font-sans);
    font-size: 0.75rem;
    line-height: 1.4;
    text-transform: none; /* Prevents inheriting uppercase from meta */
    letter-spacing: normal;
    z-index: 100;
    
    /* Animation */
    transition: opacity 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Little arrow on top of the tooltip */
.print-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%; /* At the top of the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

/* Show on Hover */
.btn-action-print:hover .print-tooltip {
    visibility: visible;
    opacity: 1;
}



.tag-link {
    transition: color 0.3s;
}

.dot { width: 4px; height: 4px; background: var(--text-slate-600); border-radius: 50%; }

.article-title { font-family: var(--font-serif); font-size: clamp(2.5rem, 5vw, 4rem); color: white; line-height: 1.1; margin-bottom: 2rem; }
.article-excerpt { font-size: 1.25rem; color: var(--text-slate-400); font-weight: 300; border-left: 2px solid var(--text-slate-600); padding-left: 1.5rem; }

/* Grid Layouts */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 4rem; }

.article-layout.no-sidebar {
    grid-template-columns: 1fr;
    display: block;
    max-width: 800px;
    margin: 0 auto;
}

.article-layout-single {
    max-width: 800px;
    margin: 0 auto;
}

/* Ghost Content Styling */
.gh-content { font-family: var(--font-serif); color: var(--text-slate-300); font-size: 1.25rem; font-weight: 300; }
.gh-content h2 { font-family: var(--font-sans); font-size: 1.5rem; color: white; margin-top: 3rem; margin-bottom: 1rem; font-weight: 400; }
.gh-content p { margin-bottom: 1.5rem; line-height: 1.8; }

.quote-block { margin: 3rem 0; padding: 2rem; background: var(--bg-panel); border: 1px solid var(--border-color); font-style: italic; color: var(--text-slate-400); text-align: center; }

.article-footer { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border-color); }
.author-block { display: flex; align-items: center; gap: 1rem; }
.author-avatar {
    width: 3rem;
    height: 3rem;
    background: var(--bg-panel);
    border: 1px solid var(--text-slate-600);
    
    /* Center text if falling back to initials */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    color: white;

    /* New styles for the image */
    border-radius: 50%;    /* Makes it circular */
    object-fit: cover;     /* Prevents image distortion */
    overflow: hidden;      /* Clips square images to the circle */
}
.author-name { color: white; text-transform: uppercase; font-size: 0.875rem; letter-spacing: 0.05em; }
.author-role { color: var(--text-slate-500); font-size: 0.75rem; }

/* Sidebar */
.sidebar-sticky { position: sticky; top: 8rem; }
.toc-header { color: var(--text-slate-500); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.toc-list { border-left: 1px solid var(--border-color); display: flex; flex-direction: column; }
.toc-link { padding: 0.75rem 0 0.75rem 1rem; border-left: 2px solid transparent; font-size: 0.875rem; color: var(--text-slate-500); margin-left: -1px; transition: 0.2s; }
.toc-link:hover { color: var(--text-slate-300); }
.toc-link.active { color: white; border-left-color: white; }

/* Sidebar Read Next */
.sidebar-read-next {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.read-next-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.read-next-link {
    display: block;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    margin-left: -1px;
    transition: all 0.2s;
}

.read-next-link:hover {
    border-left-color: white;
}

.read-next-title {
    display: block;
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.3;
    color: var(--text-slate-300);
    margin-bottom: 0.25rem;
}

.read-next-link:hover .read-next-title {
    color: white;
}

.read-next-date {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    color: var(--text-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-cta { margin-top: 3rem; background: var(--bg-panel); padding: 1.5rem; border: 1px solid var(--border-color); }
.sidebar-cta h4 { font-family: var(--font-serif); font-size: 1.25rem; color: white; margin-bottom: 0.5rem; }
.sidebar-cta p { font-size: 0.75rem; color: var(--text-slate-400); margin-bottom: 1rem; }
.btn-sidebar { display: block; text-align: center; background: var(--text-slate-600); color: white; padding: 0.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.btn-sidebar:hover { background: white; color: var(--bg-dark); }

/* --- Footer --- */
.site-footer { padding: 3rem 0; background: var(--bg-footer); border-top: 1px solid #0f172a; }
.footer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.footer-brand { font-family: var(--font-serif); font-size: 1.5rem; color: var(--text-slate-400); }
.footer-brand span { color: var(--text-slate-600); }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { font-size: 0.875rem; color: var(--text-slate-600); }
.footer-links a:hover { color: var(--text-slate-400); }
.footer-bottom { padding-top: 2rem; border-top: 1px solid #0f172a; font-size: 0.75rem; color: var(--text-slate-700); }

/* Mobile */
@media (max-width: 1024px) {
    .grid-3, .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { display: none; }
    .mobile-toggle { display: block; }
    .nav-links { display: none; }
    .featured-briefing { grid-template-columns: 1fr; }
    .briefing-image-container { min-height: 250px; border-left: none; border-top: 1px solid var(--border-color); order: -1; }
    .briefing-content { padding: 2rem; }
}

/* --- Archive Search --- */
.archive-page-wrapper {
    /* INCREASED PADDING TO CLEAR FIXED HEADER */
    padding-top: 11rem; 
    padding-bottom: 4rem;
    min-height: 100vh;
}

.archive-header {
    text-align: center;
    margin-bottom: 4rem;
}

.archive-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
}

.archive-subtitle {
    font-size: 1.125rem;
    color: var(--text-slate-400);
    font-weight: 300;
}

.archive-search-container {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.btn-archive-search {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    color: var(--text-slate-400);
    cursor: text;
    transition: all 0.3s;
    font-family: var(--font-lato);
    font-size: 1rem;
    border-radius: 4px;
}

.btn-archive-search:hover {
    border-color: var(--text-slate-500);
    color: var(--text-slate-300);
    background-color: var(--bg-dark);
}

.btn-archive-search svg {
    color: var(--text-slate-500);
}

/* --- Inline Gate Banner (New) --- */
.gate-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-panel);
    border: 1px solid var(--text-slate-600);
    padding: 2rem 3rem;
    margin-bottom: 4rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.gate-icon-small {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text-slate-500);
    color: white;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    background-color: var(--bg-dark);
}

.gate-content {
    flex: 1;
}

.gate-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

.gate-content p {
    font-family: var(--font-lato);
    font-size: 0.875rem;
    color: var(--text-slate-400);
    font-weight: 300;
}

.btn-gate-outline {
    padding: 0.75rem 2rem;
    border: 1px solid var(--text-slate-400);
    color: white;
    font-family: var(--font-lato);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: 0.3s;
    white-space: nowrap;
}

.btn-gate-outline:hover {
    background-color: white;
    color: var(--bg-dark);
    border-color: white;
}

.no-posts-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    border: 1px dashed var(--border-color);
    color: var(--text-slate-500);
    font-family: var(--font-lato);
    font-size: 0.875rem;
}

/* --- Ghost Koenig Editor Styles --- */
.gh-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gh-content > * {
    width: 100%;
    max-width: 100%;
}

.gh-content .kg-width-wide {
    max-width: 1200px;
    margin: 0 auto;
}

.gh-content .kg-width-full {
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
}

.kg-bookmark-card {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: var(--text-slate-200);
}

.kg-bookmark-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-grow: 1;
}

.kg-bookmark-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.kg-bookmark-description {
    font-size: 0.875rem;
    color: var(--text-slate-400);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-image-card figcaption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-slate-500);
    margin-top: 10px;
}


/* --- Author Page --- */
.author-profile-page {
    padding-top: 10rem; /* Clears the fixed header */
    padding-bottom: 6rem;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4rem;
}

.author-large-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--text-slate-600);
}

.author-name-large {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.author-title-badge {
    display: inline-block;
    font-family: var(--font-lato);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-slate-300);
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.author-bio-large {
    font-size: 1.125rem;
    color: var(--text-slate-400);
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.author-meta-links a {
    color: var(--text-slate-500);
    font-size: 0.875rem;
    margin-right: 1.5rem;
    border-bottom: 1px solid transparent;
}

.author-meta-links a:hover {
    color: white;
    border-color: white;
}

/* Featured Section */
.author-featured-section {
    margin-bottom: 5rem;
    padding-bottom: 3rem;
    border-bottom: 1px dashed var(--border-color);
}

.featured-card {
    background: var(--bg-panel);
    border: 1px solid var(--text-slate-500); /* Slightly brighter border to stand out */
}

.featured-badge {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--bg-dark);
    background: var(--text-slate-300);
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .author-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .grid-2 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ===============================
   PRINT / PDF LAYOUT STYLES
   =============================== */
@media print {
    /* 1. PAGE MARGINS (Option B: Professional Standard) */
    @page {
        /* Sets a 2cm margin on every single page. 
           Fixes the issue of text hitting the top edge on pages 2+. */
        margin: 2cm;
        size: auto;
    }

    /* 2. RESET COLORS & VARIABLES */
    :root {
        --bg-dark: #ffffff;
        --bg-panel: #ffffff;
        --bg-footer: #ffffff;
        --text-white: #000000;
        --text-slate-100: #000000;
        --text-slate-200: #000000;
        --text-slate-300: #1a1a1a;
        --text-slate-400: #333333;
        --text-slate-500: #555555;
        --text-slate-600: #000000;
        --border-color: #cccccc;
    }

    /* 3. RESET BODY PADDING */
    body {
        background-color: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important; /* We let @page handle the spacing now */
        font-size: 12pt;
    }

    /* 4. HIDE WEB ELEMENTS */
    .site-nav,
    .site-footer,
    .article-sidebar,     /* Hide TOC */
    .btn-back,            /* Hide Back buttons */
    .post-cta,
    .sidebar-cta,
    .sidebar-read-next,
    .read-next-link,
    .mobile-menu-overlay,
    .mobile-toggle,
    .gate-banner,         /* Hide locked content banners */
    .no-posts-message,
    .btn-primary,
    .btn-outline,
    .btn-nav-search,
    .btn-nav-login,
    button {
        display: none !important;
    }

    /* 5. LAYOUT ADJUSTMENTS */
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .article-page {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .article-layout {
        display: block !important; /* Removes grid layout */
        margin: 0 !important;
        gap: 0 !important;
    }

    .article-content {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* 6. TYPOGRAPHY (The "Memo" Look) */
    body, p, h1, h2, h3, h4, li, blockquote {
        font-family: 'EB Garamond', serif !important;
        line-height: 1.5 !important;
        color: #000 !important;
    }

    .article-title {
        font-size: 24pt !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
        color: black !important;
    }

    .article-excerpt {
        font-size: 14pt !important;
        font-style: italic;
        color: #444 !important;
        border-left: none !important; 
        padding-left: 0 !important;
        margin-bottom: 2rem !important;
    }

    .gh-content {
        font-size: 12pt !important;
    }

    /* 7. IMAGE HANDLING */
    img {
        max-width: 100% !important;
        height: auto !important;
        filter: grayscale(100%); /* Save colored ink */
    }
    
    .article-feature-image {
        page-break-inside: avoid;
        margin-bottom: 2rem;
        max-height: 300px;
        object-fit: cover;
    }

    /* 8. LINKS */
    a {
        text-decoration: underline;
        color: black !important; 
        font-weight: bold;
    }

    /* 9. AUTHOR FOOTER */
    .article-footer {
        border-top: 2px solid black !important;
        margin-top: 3rem;
        padding-top: 1rem;
    }
    
    .author-avatar {
        border: 1px solid #000 !important;
        background: none !important;
        color: black !important;
    }
    
    .author-name a {
        text-decoration: none !important;
        color: black !important;
    }
    
    .author-role {
        color: #444 !important;
    }

    /* 10. PAGE BREAK MANAGEMENT */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    p, blockquote, .quote-block {
        page-break-inside: avoid;
    }

    .quote-block {
        border: 1px solid #ccc !important;
        background: transparent !important;
        color: black !important;
        font-style: italic;
    }
}


/* --- 404 Error Page --- */
.error-page {
    min-height: 80vh; /* Takes up most of the screen */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

.error-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-code {
    display: block;
    font-family: var(--font-serif);
    font-size: 6rem;
    line-height: 1;
    color: var(--text-slate-600);
    opacity: 0.3;
    margin-bottom: 0;
}

.error-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
}

.error-description {
    font-family: var(--font-lato);
    font-size: 1.125rem;
    color: var(--text-slate-400);
    margin-bottom: 3rem;
    font-weight: 300;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* --- Mobile Menu Polish --- */
@media (max-width: 1024px) {
    
    /* Target the LAST link (Client Login) */
    .mobile-menu-links .mobile-nav-link:last-child {
        margin-top: 1.5rem;
        border: 1px solid var(--text-slate-400);
        background-color: rgba(255, 255, 255, 0.05);
        padding: 1rem;
        text-align: center;
        
        /* Typography */
        font-family: var(--font-sans) !important; 
        font-size: 0.875rem !important; 
        text-transform: uppercase;
        letter-spacing: 0.15em;
        color: white !important;
        transition: all 0.2s;
    }

    /* Active State for Touch */
    .mobile-menu-links .mobile-nav-link:last-child:active {
        background-color: white;
        color: var(--bg-dark) !important;
        border-color: white;
    }
}

@media (max-width: 1024px) {
    /* ... your existing mobile styles ... */

    /* Force "Full Width" images to respect mobile padding */
    .gh-content .kg-width-full,
    .gh-content .kg-width-wide {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
