/* CSS Custom Properties */
:root {
    --font-mono: "input-mono-condensed", "Input Mono Condensed", monospace, Arial, sans-serif;
    --font-sans: Arial, sans-serif;
    
    /* --color-primary: yellow;
    --color-background: black;
    --color-link: white;
    --color-text-muted: yellow;
    --color-border-light: #f0f0f0;
    --color-border: #e0e0e0;
    --color-code-bg: #f5f5f5; 
    --filter-bg: brightness(0) invert(1) blur(2px); */

    --color-primary: white;
    --color-background: blue;
    --color-link: pink;
    --color-text-muted: white;
    --color-border-light: #f0f0f0;
    --color-border: #e0e0e0;
    --color-code-bg: #f5f5f5; 
    --filter-bg: blur(2px);

    /* --color-primary: rgb(0, 90, 0);
    --color-background: rgb(245, 245, 245);
    --color-link: rgb(0, 90, 0);
    --color-text-muted: rgb(0, 90, 0);
    --color-border-light: #f0f0f0;
    --color-border: #e0e0e0;
    --color-code-bg: #f5f5f5;
    --filter-bg: blur(2px); */
    
    /* Ghost font settings */
    --gh-font-heading: var(--font-sans);
    --gh-font-body: var(--font-mono);
}

/* Base styles */

html {
    font-size: 15px;
}

body {
    font-family: var(--font-mono);
    font-weight: 200;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    margin: 0;
    background: var(--color-background);
    color: var(--color-primary);
    line-height: 1.6;
}

figcaption {
    font-size: 0.8em;
    opacity: 0.8;
    text-align: center;
}

/* Force hand cursor on all links - debugging version */
a {
    cursor: pointer !important;
}

a:hover {
    cursor: pointer !important;
}

a:active {
    cursor: pointer !important;
}

a:visited {
    cursor: pointer !important;
}

/* Text blur effect - applied to text elements to preserve fixed positioning */
/* h1, h2, h3, h4, h5, h6, p, span, a, li, blockquote, time, title, .site-footer, .content {
    filter: blur(0.3px);
} */

/* Font loading optimization for Adobe Fonts */
.wf-loading body {
    visibility: hidden;
}

.wf-active body,
.wf-inactive body {
    visibility: visible;
}

a, a:visited {
    /* color: var(--color-link); */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 0px 15px;
    box-sizing: border-box;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    margin-bottom: 25px;
    margin-top: 30px;
    text-align: center;
    position: relative;
}

.site-title {
    font-family: var(--font-mono);
    font-weight: 200;
    font-size: 1.5em;
    margin: 0 0 10px 0;
    /* padding-top: 25px; */
    /* font-style: italic; */
    /* filter: blur(0.3px); */
}

.site-title a {
    color: var(--color-primary);
    text-decoration: none;
}

/* Custom character spacing adjustments */
.site-title .char-l {
    margin-left: -0.03em; /* Adjust this value to control spacing */
}

.site-description {
    font-family: var(--font-mono);
    letter-spacing: -0.8px;
    color: var(--color-text-muted);
    margin: 0;
    font-size: 1em;
}

/* Header links (wave navigation) */
.header-link {
    position: absolute;
    top: 5px;
    text-decoration: none;
    width: 70px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.header-link:hover {
    opacity: 1;
    text-decoration: none;
}

.header-link svg {
    width: 100%;
    height: 100%;
}

.header-link svg text {
    font-family: var(--font-mono);
    font-size: 18px;
    fill: var(--color-primary);
    stroke: var(--color-primary);
}

.header-link:hover svg text {
    fill: var(--color-link);
    stroke: var(--color-link);
}

/* Specific positioning and styling for each link */
.index-link {
    left: 0;
    margin-top: 5px;
}

.index-link svg text {
    stroke-width: 1;
    letter-spacing: 5px;
}

.help-link {
    right: 0;
}

.help-link svg text {
    stroke-width: 1;
    letter-spacing: 5px;
}

/* Header dropdown */
.header-dropdown {
    position: absolute;
    right: 0;
    top: 10px;
}

.dropdown-menu {
    position: absolute;
    top: 35px;
    right: 0;
    /* background: var(--color-background); */
    /* border: 1px solid var(--color-primary); */
    border-radius: 8px;
    padding: 5px;
    display: none;
    flex-direction: column;
    gap: 0px;
    z-index: 20;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-link {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    text-decoration: none;
    width: 70px;
    height: 38px;
}

.dropdown-link:hover {
    opacity: 1;
    text-decoration: none;
}

.dropdown-link svg {
    width: 100%;
    height: 100%;
}

.dropdown-link svg text {
    font-family: var(--font-mono);
    font-size: 18px;
    fill: var(--color-primary);
    stroke: var(--color-primary);
    stroke-width: 1;
    letter-spacing: 5px;
}

.dropdown-link:hover svg text {
    fill: var(--color-link);
    stroke: var(--color-link);
}

.dropdown-link[href="/account"] {
    width: 90px;
}

.dropdown-link[href="#/portal"] {
    width: 75px;
}

.glow {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.25), 0 0 6px rgba(255, 255, 255, 0.25);
}

/* Icon Navigation */
.icon-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 35px;
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.icon-link:hover {
    opacity: 1;
    transform: scale(1.1);
    text-decoration: none;
    color: var(--color-link);
}

.nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Post title icons on index */
.post-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 4px;
    margin-bottom: 4px;
    vertical-align: middle;
    opacity: 0.8;
    display: inline-block;
}

/* Post page specific icon styling */
.post .post-icon {
    margin-bottom: 0px;
    vertical-align: middle;
    transform: translateY(-1px);
}

/* Responsive adjustments for icon nav */
@media (max-width: 480px) {
    .icon-nav {
        gap: 20px;
    }
    
    .nav-icon {
        width: 24px;
        height: 24px;
    }
    
    .post-icon {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }
    
    .post .post-icon {
        margin-right: 3px;
    }
}

/* Main content */
.site-main {
    flex: 1;
    margin-bottom: 50px;
}

/* Post list */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-item {
    margin-bottom: 50px;
    text-align: center;
}

.post-item:last-child {
    margin-bottom: 0;
}

.post-meta {
    font-size: 0.9em;
}

.post-title {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.1em;
    margin: 0 0 5px 0;
}

.post .post-title {
    font-size: 1.3em;
}

.post-title a {
    color: var(--color-primary);
    text-decoration: underline;
}

.post-title a:hover {
    color: var(--color-link);
}

.post-excerpt {
    font-family: var(--font-sans);
    letter-spacing: -0.2px;
    opacity: 0.8;
    font-size: 1em;
    color: var(--color-text-muted);
    margin: 0 0 5px 0;
    line-height: 1.5;
}

.post-excerpt p {
    margin: 0;
}

.post-date {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* Individual post */
.post-header {
    margin-bottom: 30px;
}

.post-content {
    font-family: var(--font-sans);
    font-weight: 300;
    letter-spacing: -0.2px;
    color: var(--color-primary);
    line-height: 1.6;
}

.post-content h1, 
.post-content h2, 
.post-content h3, 
.post-content h4, 
.post-content h5, 
.post-content h6 {
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--color-primary);
    margin: 30px 0 15px 0;
}

.post-content h1 { font-size: 1.8em; }
.post-content h2 { font-size: 1.5em; }
.post-content h3 { font-size: 1.3em; }
.post-content h4, 
.post-content h5, 
.post-content h6 { font-size: 1.1em; }

.post-content p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.post-content ul,
.post-content ol {
    margin: 0 0 20px 0;
    padding-left: 30px;
}

.post-content ul {
    list-style-type: "→";  /* Custom arrow bullet */
}

.post-content li {
    margin-bottom: 5px;
}

.post-content blockquote {
    margin: 20px 0;
    padding: 0 0 0 20px;
    border-left: 3px solid var(--color-border);
    font-style: italic;
    color: var(--color-text-muted);
}

/* Images */
.post-content img,
.post-content figure {
    margin-bottom: 10px;
    max-width: 100%;
    height: auto;
}

.post-content figure {
    margin-left: 5px !important;
    margin-right: 5px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure Koenig images align to the text column width */
.post-content img.kg-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Reset padding for images in lists and blockquotes */
.post-content ul img,
.post-content ol img,
.post-content blockquote img,
.post-content ul figure,
.post-content ol figure,
.post-content blockquote figure {
    margin-left: 0;
    padding-left: 0;
}

.post-content code {
    background: var(--color-code-bg);
    padding: 2px 5px;
    font-family: monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--color-code-bg);
    padding: 15px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Tags */
.post-tags {
    margin-top: 30px;
}

.tag {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--color-border-light);
    border-radius: 5px;
    color: var(--color-text-muted);
    padding: 4px 8px;
    font-size: 0.8em;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
}

.tag:hover {
    color: var(--color-link);
    border: 1px solid var(--color-link);
    text-decoration: none;
}

/* Footer */
.site-footer {
    text-align: center;
    padding-top: 30px;
    margin-bottom: 30px;
    /* border-top: 1px solid var(--color-border-light); */
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--color-text-muted);
    opacity: 0.8;
}

.site-footer p {
    margin: 0 0 10px 0;
}

.site-footer p:last-child {
    margin-bottom: 0;
}

.site-footer a {
    color: var(--color-text-muted);
}

.site-footer a:hover {
    color: var(--color-link);
}

/* Style the navigation list to display inline */
.site-footer .nav {
    display: inline;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .nav li {
    display: inline;
}

.site-footer .nav li:before {
    content: "";
}

.site-footer .nav a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.site-footer .nav a:hover {
    color: var(--color-link);
}



/* Pagination */
.pagination {
    text-align: center;
    margin: 50px 0;
}

.pagination a {
    font-family: var(--font-mono);
    color: var(--color-link);
    margin: 0 10px;
    padding: 8px 15px;
    border: 1px solid var(--color-border);
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--color-text-muted);
    text-decoration: none;
}

.pagination .current {
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    margin: 0 10px;
    padding: 8px 15px;
    border: 1px solid var(--color-border);
}

/* Archive headers */
.archive-header {
    margin-bottom: 40px;
    text-align: center;
}

.archive-title {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.8em;
    margin: 0 0 15px 0;
    color: var(--color-primary);
}

.archive-description {
    font-family: var(--font-mono);
    letter-spacing: -0.8px;
    color: var(--color-text-muted);
    margin: 0;
    font-size: 1em;
}

/* Author info */
.author-info {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border-light);
}

.author-meta {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

.author-details {
    flex: 1;
}

.author-name {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.1em;
    margin: 0 0 5px 0;
}

.author-name a {
    color: var(--color-primary);
    text-decoration: none;
}

.author-name a:hover {
    color: var(--color-link);
}

.author-bio {
    font-family: var(--font-mono);
    letter-spacing: -0.8px;
    color: var(--color-text-muted);
    font-size: 0.9em;
    margin: 0;
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 0px 10px;
    }
    
    .site-header {
        margin-bottom: 30px;
        margin-top: 10px;
    }

    .header-link {
        margin-top: 8px;
    }

    .index-link {
        margin-top: 15px;
    }

    .dropdown-menu {
        top: 45px; /* Increased from 35px for better mobile spacing */
    }
    
    .icon-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 30px;
        margin-bottom: 35px;
    }

    .site-title {
        font-size: 1.5em;
        padding-top: 10px;
    }
    
    .post-title {
        font-size: 1.3em;
    }
    
    .post-item {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .author-meta {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .author-image {
        align-self: center;
    }
}

/* Required Koenig editor CSS classes */
.kg-width-wide {
    position: relative;
    width: 100%;
    min-width: 100%;
    margin: 0;
    transform: none;
}

.kg-width-full {
    position: relative;
    width: 100%;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
}

/* Background drawings - base class for JS-generated elements */
.bg-drawing {
    position: fixed;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: var(--filter-bg);
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
} 

/* Hide Ghost Portal notifications - targeting exact elements found in inspector */
/* Hide the notification iframe */
iframe[data-testid="portal-notification-frame"],
iframe[title="portal-notification"] {
    display: none !important;
}

/* Hide notification elements inside Portal */
.gh-portal-notification-wrapper,
.gh-portal-notification.success,
.gh-portal-notification {
    display: none !important;
}

/* Completely hide Ghost Portal */
[data-portal],
iframe[data-testid="portal-popup-frame"],
iframe[title*="portal"] {
    display: none !important;
}

/* Portal Login Screen Customization - Rashomon Blues Theme */
/* Use CSS Custom Properties that Portal respects */
:root {
    /* Portal color overrides */
    --gh-portal-container-background: blue;
    --gh-portal-text-color: white;
    --gh-portal-button-background: white;
    --gh-portal-button-text: blue;
    --gh-portal-input-background: rgba(255, 255, 255, 0.1);
    --gh-portal-input-border: rgba(255, 255, 255, 0.3);
    --gh-portal-accent-color: pink;
}

/* Portal iframe container styling */
iframe[data-testid="portal-popup-frame"],
iframe[title="portal-popup"],
div[data-portal] iframe {
    border: 2px solid white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Portal backdrop overlay (works) */
.gh-portal-backdrop,
div[data-portal] + div {
    background: rgba(0, 0, 255, 0.8) !important;
    backdrop-filter: blur(4px) !important;
}

/* Custom Login Overlay - Rashomon Blues Theme */
.rb-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rb-login-overlay.active {
    opacity: 1;
    visibility: visible;
}

.rb-login-popup {
    background: blue;
    color: white;
    font-family: var(--font-mono);
    font-weight: 200;
    border: 2px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.rb-login-overlay.active .rb-login-popup {
    transform: scale(1);
}

.rb-login-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.rb-login-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rb-login-header {
    text-align: center;
    margin-bottom: 25px;
}

.rb-login-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: blue;
    font-size: 24px;
    font-weight: bold;
}

.rb-login-title {
    font-size: 24px;
    margin: 0;
    font-weight: 200;
}

.rb-login-form {
    margin-bottom: 20px;
}

.rb-login-field {
    margin-bottom: 20px;
}

.rb-login-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 200;
}

.rb-login-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    font-family: var(--font-mono);
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rb-login-input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.rb-login-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-mono);
}

.rb-login-button {
    width: 100%;
    padding: 12px 24px;
    background: white;
    color: blue;
    border: 2px solid white;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 200;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.rb-login-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.rb-login-button:disabled {
    background: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 255, 0.7);
    cursor: not-allowed;
    transform: none;
}

.rb-login-message {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rb-login-message.show {
    opacity: 1;
}

.rb-login-message.success {
    color: white;
}

.rb-login-message.error {
    color: pink;
}

.rb-login-footer {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    margin-top: 25px;
}

.rb-login-link {
    color: pink;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.rb-login-link:hover {
    color: white;
} 

/* Link color override: force links to white across the site */
:root {
  --color_link: white;
}

/* Ensure post content links render white in all states */
.gh-content a,
.gh-content a:visited {
  color: white;
}

.gh-content a:hover,
.gh-content a:focus {
  color: white;
  text-decoration: underline;
} 

/* Stronger global overrides to ensure white links everywhere */
.post-content a,
.post-content a:visited,
.gh-content a,
.gh-content a:visited,
.a11y-scope a,
.a11y-scope a:visited,
body a,
body a:visited {
  color: white;
}

.post-content a:hover,
.post-content a:focus,
.gh-content a:hover,
.gh-content a:focus,
body a:hover,
body a:focus {
  color: white;
  text-decoration: underline;
} 

/* Underline links by default inside post content */
.post-content a,
.post-content a:visited,
.gh-content a,
.gh-content a:visited {
  text-decoration: underline;
} 