:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #7c3aed;
    --accent-color: #059669;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}
header, main, footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    background: linear-gradient(135deg, var(--surface-color) 0%, rgba(37, 99, 235, 0.02) 100%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
    padding: 1.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

main {
    min-height: 60vh;
    padding-bottom: 2rem;
}
.homepage h1 {
    margin-bottom: 0;
}
.homepage pre {
    white-space: pre-wrap;
}
.tagline {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0 0 0;
    line-height: 1.4;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bayjarvis-logo {
    max-width: 140px;
    width: auto;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.bayjarvis-logo:hover {
    transform: scale(1.05);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

pre {
    word-break: break-word;
}

header nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

header nav li {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

header nav a {
    display: inline-block;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    text-decoration: none;
}

header nav a:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

nav {
    margin-bottom: 1rem;
}
nav .show-on-narrow {
    display: none;
}
body.page main .content {
    max-width: 800px;
}
.bayjarvis-logo-small {
    height: 1.5em;
    display: inline-block;
    padding-right: 2em;
    vertical-align: middle;
}
body.page nav ul,
body.page nav li {
    float: none;
    display: inline;
    position: relative;
    top: 1px;
}
body.page nav {
    margin-bottom: 1em;
}
body.page header {
    padding-top: 0.5em;
}

@media (max-width: 480px) {
    nav .hide-on-narrow {
        display: none;
    }
    nav .show-on-narrow {
        display: inline;
    }
    header nav li {
        padding-right: 1em;
    }
    body.page nav ul {
        display: block;
    }
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: start;
}

/* Ensure grid layout is maintained for desktop sizes */
@media (min-width: 769px) {
    .hero-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }
}

.about {
    font-size: 1.1rem;
    line-height: 1.7;
}

.about p {
    margin-bottom: 1.5rem;
}

.about strong {
    color: var(--primary-color);
    font-weight: 600;
}

.bayjarvis-video {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.bayjarvis-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.bayjarvis-video h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-align: center;
}

.bayjarvis-video p {
    margin: 1rem 0;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
}

.bayjarvis-video img {
    border-radius: var(--radius-md);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.bayjarvis-video img:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bayjarvis-video {
        margin: 0;
    }

    .about {
        font-size: 1rem;
    }

    body .two-col-wrapper {
        display: block;
    }

    .beta-search {
        flex-direction: column;
        align-items: stretch;
    }

    .beta-search input[type="text"] {
        min-width: unset;
        margin-bottom: 1rem;
    }
}

.use-cases {
    clear: both;
}
.card svg {
    max-width: 50px;
    color: #0e0c82;
}
.card {
    width: 33.3%;
    box-sizing: border-box;
    padding-right: 1em;
    margin-top: 2em;
    float: left;
    text-align: center;
}
.card h2 {
    font-size: 1.1em;
}
.card p {
    text-align: left;
    font-size: 0.8em;
}

span.by {
    color: #999;
    font-size: 0.85em;
}

.substack iframe {
    float: right;
    border: 1px solid #EEE;
    background:white;
    margin-right: -224px;
}
@media (max-width: 1024px) {
    .substack {
        text-align: center;
    }
    .substack iframe {
        float: none;
        max-width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 640px) {
    .card {
        float: none;
        width: 100%;
    }
}


.two-col-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.two-col-column {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.two-col-column h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.two-col-column h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    line-height: 1.4;
}

.two-col-column h3 a {
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.7;
}

.two-col-column p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .two-col-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .two-col-column {
        padding: 1.5rem;
    }
}

.github-corner:hover .octo-arm{
    animation:octocat-wave 560ms ease-in-out
}
@keyframes octocat-wave {
    0%,100% {
        transform:rotate(0)
    }
    20%,60% {
        transform:rotate(-25deg)
    }
    40%,80% {
        transform:rotate(10deg)
    }
}
@media (max-width:500px) {
    .github-corner:hover .octo-arm {
        animation: none
    }
    .github-corner .octo-arm{
        animation: octocat-wave 560ms ease-in-out
    }
}

.beta-search {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.beta-search input[type="text"] {
    flex: 1;
    min-width: 300px;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--background-color);
    transition: all 0.2s ease;
}

.beta-search input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.beta-search input[type="submit"] {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.beta-search input[type="submit"]:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-message {
    color: var(--accent-color);
    background-color: rgba(5, 150, 105, 0.1);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(5, 150, 105, 0.3);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
}

.non-login-message {
    color: #dc2626;
    background-color: rgba(220, 38, 38, 0.1);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
}

.non-login-message a {
    color: inherit;
    font-weight: 600;
}

/* Footer Styles */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
