/* custom.css */

/* ==================== */
/* STICKY FOOTER LAYOUT */
/* ==================== */

html, body {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.md-container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.md-main {
    flex: 1 0 auto;
}

.md-footer {
    flex-shrink: 0;
}

/* Ensure hero section fills viewport exactly */
body:has(.hero-section) .md-content,
body:has(.hero-section) .md-content__inner,
body:has(.hero-section) .md-main__inner,
body:has(.hero-section) .md-main,
body:has(.hero-section) .md-container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.flex-container {
    display: flex;
    justify-content: flex-start;
}

.text-item {
    width: 20%;
    padding-right: 2%;
}

.player-item {
    width: 78%;
}


.ray-dense td,
.ray-dense th {
    font-size: 85%;
    padding: 0 .4em;
}

.ray-dense th {
    border-bottom: 1px solid rgba(0, 0, 0, .3);
    opacity: .7;
    text-align: left;
}

.ray-dense thead {
    border-bottom: 1px solid #aaa;
}

/* Rayforce brand colors - Light scheme */
:root {
    --md-primary-fg-color: #04233b;
    --md-primary-fg-color--light: #0a3a5c;
    --md-primary-fg-color--dark: #021828;
    --md-accent-fg-color: #e9a033;

    /* Custom variables for graphs and UI elements */
    --accent-primary: #e9a033;
    --accent-hover: #f0b85a;
    --bg-tertiary: #e0e0e0;
    --text-secondary: #757575;
    --text-tertiary: #9e9e9e;
}

:root>* {
    --md-code-hl-number-color: #e9a033;
    /* Golden - numbers */
    --md-code-hl-special-color: #04233b;
    /* Navy - special */
    --md-code-hl-function-color: #0a3a5c;
    /* Navy shade - functions */
    --md-code-hl-constant-color: #e9a033;
    /* Golden - constants */
    --md-code-hl-keyword-color: #04233b;
    /* Navy - keywords */
    --md-code-hl-string-color: #2e7d32;
    /* Green - strings */
    --md-code-hl-name-color: #04233b;
    /* Navy - names */
    --md-code-hl-operator-color: #e9a033;
    /* Golden - operators */
    --md-code-hl-punctuation-color: #757575;
    /* Grey - punctuation */
    --md-code-hl-comment-color: #9e9e9e;
    /* Light grey - comments */
    --md-code-hl-generic-color: #04233b;
    /* Navy - generic */
}

/* Header styling */
.md-header {
    background-color: #04233b;
    /* Rayforce dark navy */
    color: #ffffff;
}

/* Tab styling */
.md-tabs {
    background-color: transparent;
    border: none;
    padding: 0.5rem 0;
    box-shadow: none;
}

/* Transparent tabs for light mode */
[data-md-color-scheme="default"] .md-tabs {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

/* Hide tabs on home page */
body:has(.hero-section) .md-tabs {
    display: none !important;
}

.md-tabs__link {
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.6rem 1.2rem;
    margin: 0 0.25rem;
    border-radius: 8px 8px 0 0;
    display: inline-block;
}

.md-tabs__link:hover {
    opacity: 1;
    background-color: rgba(233, 160, 51, 0.2);
}

.md-tabs__link--active {
    opacity: 1;
}

/* Bookmark-style tabs for light mode - default (non-home pages) */
[data-md-color-scheme="default"] .md-tabs__link {
    color: #4a5568 !important;
    opacity: 0.9;
    background-color: transparent;
}

[data-md-color-scheme="default"] .md-tabs__link:hover {
    color: #04233b !important;
    opacity: 1;
    background-color: rgba(233, 160, 51, 0.1);
}

/* White tabs only on home page with hero section */
body:has(.hero-section) [data-md-color-scheme="default"] .md-tabs__link {
    color: rgba(255, 255, 255, 0.8) !important;
}

body:has(.hero-section) [data-md-color-scheme="default"] .md-tabs__link:hover {
    color: rgba(255, 255, 255, 1) !important;
    background-color: rgba(233, 160, 51, 0.3);
}

[data-md-color-scheme="default"] .md-tabs__link--active {
    background-color: #e9a033;
    color: white !important;
    font-weight: 700;
    opacity: 1;
    box-shadow: 0 -2px 8px rgba(233, 160, 51, 0.2);
}

/* Bookmark-style tabs for dark mode */
[data-md-color-scheme="slate"] .md-tabs {
    background-color: transparent;
}

[data-md-color-scheme="slate"] .md-tabs__link {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-md-color-scheme="slate"] .md-tabs__link:hover {
    color: #e9a033 !important;
    background-color: rgba(233, 160, 51, 0.1);
}

[data-md-color-scheme="slate"] .md-tabs__link--active {
    background-color: rgba(233, 160, 51, 0.2);
    color: #e9a033 !important;
    font-weight: 700;
    box-shadow: 0 -2px 8px rgba(233, 160, 51, 0.15);
}

/* Search box styling */
.md-search__input {
    background-color: rgba(255, 255, 255, 0.1);
}

.md-search__input:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Code block styling */
.highlight {
    background-color: #fafafa;
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] {
    --md-default-bg-color: #04233b;
    /* Rayforce navy background */
    --md-code-bg-color: #021828;
    /* Darker navy */
    --md-code-hl-background-color: #0a3a5c;
    /* Lighter navy for highlights */
    --md-primary-fg-color: #e9a033;
    --md-primary-fg-color--light: #f0b85a;
    --md-primary-fg-color--dark: #c98a2a;
    --md-accent-fg-color: #f0b85a;

    /* Custom variables for graphs and UI elements - Dark mode */
    --accent-primary: #e9a033;
    --accent-hover: #f0b85a;
    --bg-tertiary: rgba(255, 255, 255, 0.15);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
}

[data-md-color-scheme="slate"] .md-header {
    background-color: #021828;
    /* Darker navy for header in dark mode */
}


/* Global button styling - rounded corners */
.md-typeset .md-button,
.md-button,
a.md-button {
    border-radius: 50px !important;
    transition: all 0.3s ease;
    padding: 0.6rem 1.5rem;
}

.md-typeset .md-button--primary,
.md-button--primary,
a.md-button--primary {
    background-color: #04233b !important;
    border-color: #04233b !important;
    color: #ffffff !important;
}

.md-typeset .md-button--primary:hover,
.md-button--primary:hover,
a.md-button--primary:hover {
    background-color: #e9a033 !important;
    border-color: #e9a033 !important;
    color: #04233b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 160, 51, 0.4);
}

.md-typeset .md-button:not(.md-button--primary),
.md-button:not(.md-button--primary),
a.md-button:not(.md-button--primary) {
    border: 2px solid #04233b !important;
    color: #04233b !important;
    background-color: transparent !important;
}

.md-typeset .md-button:not(.md-button--primary):hover,
.md-button:not(.md-button--primary):hover,
a.md-button:not(.md-button--primary):hover {
    background-color: #04233b !important;
    border-color: #04233b !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* ==================== */
/* ADMONITION STYLING   */
/* ==================== */

/* Base admonition styling - Light mode */
.md-typeset .admonition {
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.95);
}

.md-typeset .admonition-title {
    font-weight: 600;
    padding: 0.5rem 1rem;
    margin: 0;
}

.md-typeset .admonition>.admonition-title::before {
    margin-right: 0.5rem;
}

/* Note - Blue/Info */
.md-typeset .admonition.note,
.md-typeset details.note {
    border-color: #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
}

.md-typeset .admonition.note>.admonition-title,
.md-typeset details.note>summary {
    background-color: rgba(33, 150, 243, 0.15);
    color: #1565C0;
}

/* Warning - Amber/Orange */
.md-typeset .admonition.warning,
.md-typeset details.warning {
    border-color: #FF9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.md-typeset .admonition.warning>.admonition-title,
.md-typeset details.warning>summary {
    background-color: rgba(255, 152, 0, 0.15);
    color: #E65100;
}

/* Danger/Error - Red */
.md-typeset .admonition.danger,
.md-typeset .admonition.error,
.md-typeset details.danger,
.md-typeset details.error {
    border-color: #F44336;
    background-color: rgba(244, 67, 54, 0.1);
}

.md-typeset .admonition.danger>.admonition-title,
.md-typeset .admonition.error>.admonition-title,
.md-typeset details.danger>summary,
.md-typeset details.error>summary {
    background-color: rgba(244, 67, 54, 0.15);
    color: #C62828;
}

/* Tip/Hint - Green */
.md-typeset .admonition.tip,
.md-typeset .admonition.hint,
.md-typeset details.tip,
.md-typeset details.hint {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.md-typeset .admonition.tip>.admonition-title,
.md-typeset .admonition.hint>.admonition-title,
.md-typeset details.tip>summary,
.md-typeset details.hint>summary {
    background-color: rgba(76, 175, 80, 0.15);
    color: #2E7D32;
}

/* Success - Green */
.md-typeset .admonition.success,
.md-typeset .admonition.check,
.md-typeset details.success,
.md-typeset details.check {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.md-typeset .admonition.success>.admonition-title,
.md-typeset .admonition.check>.admonition-title,
.md-typeset details.success>summary,
.md-typeset details.check>summary {
    background-color: rgba(76, 175, 80, 0.15);
    color: #2E7D32;
}

/* Info - Cyan */
.md-typeset .admonition.info,
.md-typeset details.info {
    border-color: #00BCD4;
    background-color: rgba(0, 188, 212, 0.1);
}

.md-typeset .admonition.info>.admonition-title,
.md-typeset details.info>summary {
    background-color: rgba(0, 188, 212, 0.15);
    color: #00838F;
}

/* Abstract/Summary - Purple */
.md-typeset .admonition.abstract,
.md-typeset .admonition.summary,
.md-typeset details.abstract,
.md-typeset details.summary {
    border-color: #9C27B0;
    background-color: rgba(156, 39, 176, 0.1);
}

.md-typeset .admonition.abstract>.admonition-title,
.md-typeset .admonition.summary>.admonition-title,
.md-typeset details.abstract>summary,
.md-typeset details.summary>summary {
    background-color: rgba(156, 39, 176, 0.15);
    color: #6A1B9A;
}

/* Quote - Gray */
.md-typeset .admonition.quote,
.md-typeset details.quote {
    border-color: #757575;
    background-color: rgba(117, 117, 117, 0.1);
}

.md-typeset .admonition.quote>.admonition-title,
.md-typeset details.quote>summary {
    background-color: rgba(117, 117, 117, 0.15);
    color: #424242;
}

/* Bug - Red */
.md-typeset .admonition.bug,
.md-typeset details.bug {
    border-color: #E91E63;
    background-color: rgba(233, 30, 99, 0.1);
}

.md-typeset .admonition.bug>.admonition-title,
.md-typeset details.bug>summary {
    background-color: rgba(233, 30, 99, 0.15);
    color: #AD1457;
}

/* Question - Blue */
.md-typeset .admonition.question,
.md-typeset details.question {
    border-color: #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
}

.md-typeset .admonition.question>.admonition-title,
.md-typeset details.question>summary {
    background-color: rgba(33, 150, 243, 0.15);
    color: #1565C0;
}

/* Example - Teal */
.md-typeset .admonition.example,
.md-typeset details.example {
    border-color: #009688;
    background-color: rgba(0, 150, 136, 0.1);
}

.md-typeset .admonition.example>.admonition-title,
.md-typeset details.example>summary {
    background-color: rgba(0, 150, 136, 0.15);
    color: #00695C;
}

/* Important - Orange */
.md-typeset .admonition.important,
.md-typeset details.important {
    border-color: #FF9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.md-typeset .admonition.important>.admonition-title,
.md-typeset details.important>summary {
    background-color: rgba(255, 152, 0, 0.15);
    color: #E65100;
}

/* Caution - Orange */
.md-typeset .admonition.caution,
.md-typeset details.caution {
    border-color: #FF9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.md-typeset .admonition.caution>.admonition-title,
.md-typeset details.caution>summary {
    background-color: rgba(255, 152, 0, 0.15);
    color: #E65100;
}

/* Failure/Fail - Red */
.md-typeset .admonition.failure,
.md-typeset .admonition.fail,
.md-typeset details.failure,
.md-typeset details.fail {
    border-color: #F44336;
    background-color: rgba(244, 67, 54, 0.1);
}

.md-typeset .admonition.failure>.admonition-title,
.md-typeset .admonition.fail>.admonition-title,
.md-typeset details.failure>summary,
.md-typeset details.fail>summary {
    background-color: rgba(244, 67, 54, 0.15);
    color: #C62828;
}

/* See Also - Custom (already exists, but updating) */
.md-typeset .admonition.seealso,
.md-typeset details.seealso {
    border-color: #0a3a5c;
    background-color: rgba(10, 58, 92, 0.1);
}

.md-typeset .admonition.seealso>.admonition-title,
.md-typeset details.seealso>summary {
    background-color: rgba(10, 58, 92, 0.15);
    color: #04233b;
}

/* ==================== */
/* DARK MODE ADMONITIONS */
/* ==================== */

[data-md-color-scheme="slate"] .md-typeset .admonition {
    background-color: rgba(10, 58, 92, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Note - Light Blue for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.note,
[data-md-color-scheme="slate"] .md-typeset details.note {
    border-color: #64B5F6;
    background-color: rgba(33, 150, 243, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.note>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.note>summary {
    background-color: rgba(33, 150, 243, 0.25);
    color: #90CAF9;
}

/* Warning - Golden/Amber for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.warning,
[data-md-color-scheme="slate"] .md-typeset details.warning {
    border-color: #e9a033;
    background-color: rgba(233, 160, 51, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.warning>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.warning>summary {
    background-color: rgba(233, 160, 51, 0.25);
    color: #f0b85a;
}

/* Danger/Error - Light Red for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.danger,
[data-md-color-scheme="slate"] .md-typeset .admonition.error,
[data-md-color-scheme="slate"] .md-typeset details.danger,
[data-md-color-scheme="slate"] .md-typeset details.error {
    border-color: #EF5350;
    background-color: rgba(244, 67, 54, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.danger>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset .admonition.error>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.danger>summary,
[data-md-color-scheme="slate"] .md-typeset details.error>summary {
    background-color: rgba(244, 67, 54, 0.25);
    color: #FFCDD2;
}

/* Tip/Hint - Light Green for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.tip,
[data-md-color-scheme="slate"] .md-typeset .admonition.hint,
[data-md-color-scheme="slate"] .md-typeset details.tip,
[data-md-color-scheme="slate"] .md-typeset details.hint {
    border-color: #81C784;
    background-color: rgba(76, 175, 80, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset .admonition.hint>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.tip>summary,
[data-md-color-scheme="slate"] .md-typeset details.hint>summary {
    background-color: rgba(76, 175, 80, 0.25);
    color: #A5D6A7;
}

/* Success - Light Green for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.success,
[data-md-color-scheme="slate"] .md-typeset .admonition.check,
[data-md-color-scheme="slate"] .md-typeset details.success,
[data-md-color-scheme="slate"] .md-typeset details.check {
    border-color: #81C784;
    background-color: rgba(76, 175, 80, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.success>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset .admonition.check>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.success>summary,
[data-md-color-scheme="slate"] .md-typeset details.check>summary {
    background-color: rgba(76, 175, 80, 0.25);
    color: #A5D6A7;
}

/* Info - Light Cyan for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.info,
[data-md-color-scheme="slate"] .md-typeset details.info {
    border-color: #4DD0E1;
    background-color: rgba(0, 188, 212, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.info>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.info>summary {
    background-color: rgba(0, 188, 212, 0.25);
    color: #80DEEA;
}

/* Abstract/Summary - Light Purple for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.abstract,
[data-md-color-scheme="slate"] .md-typeset .admonition.summary,
[data-md-color-scheme="slate"] .md-typeset details.abstract,
[data-md-color-scheme="slate"] .md-typeset details.summary {
    border-color: #BA68C8;
    background-color: rgba(156, 39, 176, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.abstract>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset .admonition.summary>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.abstract>summary,
[data-md-color-scheme="slate"] .md-typeset details.summary>summary {
    background-color: rgba(156, 39, 176, 0.25);
    color: #CE93D8;
}

/* Quote - Light Gray for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.quote,
[data-md-color-scheme="slate"] .md-typeset details.quote {
    border-color: #9E9E9E;
    background-color: rgba(117, 117, 117, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.quote>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.quote>summary {
    background-color: rgba(117, 117, 117, 0.25);
    color: #BDBDBD;
}

/* Bug - Light Pink for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.bug,
[data-md-color-scheme="slate"] .md-typeset details.bug {
    border-color: #F48FB1;
    background-color: rgba(233, 30, 99, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.bug>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.bug>summary {
    background-color: rgba(233, 30, 99, 0.25);
    color: #F8BBD0;
}

/* Question - Light Blue for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.question,
[data-md-color-scheme="slate"] .md-typeset details.question {
    border-color: #64B5F6;
    background-color: rgba(33, 150, 243, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.question>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.question>summary {
    background-color: rgba(33, 150, 243, 0.25);
    color: #90CAF9;
}

/* Example - Light Teal for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.example,
[data-md-color-scheme="slate"] .md-typeset details.example {
    border-color: #4DB6AC;
    background-color: rgba(0, 150, 136, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.example>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.example>summary {
    background-color: rgba(0, 150, 136, 0.25);
    color: #80CBC4;
}

/* Important - Golden for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.important,
[data-md-color-scheme="slate"] .md-typeset details.important {
    border-color: #e9a033;
    background-color: rgba(255, 152, 0, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.important>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.important>summary {
    background-color: rgba(255, 152, 0, 0.25);
    color: #f0b85a;
}

/* Caution - Golden for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.caution,
[data-md-color-scheme="slate"] .md-typeset details.caution {
    border-color: #e9a033;
    background-color: rgba(255, 152, 0, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.caution>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.caution>summary {
    background-color: rgba(255, 152, 0, 0.25);
    color: #f0b85a;
}

/* Failure/Fail - Light Red for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.failure,
[data-md-color-scheme="slate"] .md-typeset .admonition.fail,
[data-md-color-scheme="slate"] .md-typeset details.failure,
[data-md-color-scheme="slate"] .md-typeset details.fail {
    border-color: #EF5350;
    background-color: rgba(244, 67, 54, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.failure>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset .admonition.fail>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.failure>summary,
[data-md-color-scheme="slate"] .md-typeset details.fail>summary {
    background-color: rgba(244, 67, 54, 0.25);
    color: #FFCDD2;
}

/* See Also - Navy/Golden for dark mode */
[data-md-color-scheme="slate"] .md-typeset .admonition.seealso,
[data-md-color-scheme="slate"] .md-typeset details.seealso {
    border-color: #e9a033;
    background-color: rgba(10, 58, 92, 0.3);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.seealso>.admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.seealso>summary {
    background-color: rgba(10, 58, 92, 0.4);
    color: #f0b85a;
}

/* Navigation refinements */
.md-nav__item .md-nav__link--active {
    color: var(--md-primary-fg-color);
    font-weight: bold;
}

/* Table improvements */
.md-typeset table:not([class]) th {
    background-color: var(--md-primary-fg-color);
    color: var(--md-primary-bg-color);
}

/* Improved table density */
.md-typeset table:not([class]) {
    font-size: 0.75rem;
}

/* REPL styling */
.language-clj {
    font-size: 0.9em;
}

.asciinema-player,
.asciinema-player * {
    font-size: 12px !important;
    display: block;
    overflow-x: auto;
    font-family: 'Roboto Mono', 'Source Code Pro', 'SF Mono', 'SFMono-Regular', ui-monospace, 'DejaVu Sans Mono', 'Menlo',
        'Consolas', 'Roboto', monospace;
    white-space-collapse: preserve;
    text-wrap: nowrap;
}

/* Hide site name next to logo in header */
.md-header__title {
    visibility: hidden;
    width: 0;
    margin: 0;
    padding: 0;
}

/* Make logo larger without affecting layout */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
    transform: scale(1.5);
    transform-origin: center;
}

/* Welcome page logo styling */
.welcome-logo {
    height: 1.2em;
    width: auto;
    vertical-align: middle;
    opacity: 0.6;
    margin-right: 0.2em;
}

/* ==================== */
/* HERO SECTION STYLES  */
/* ==================== */

.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    margin: 0;
    margin-top: -1.5rem;
    padding: 2rem 2rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: visible;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: calc(100vh - var(--md-header-height, 48px) + 1.1rem);
    min-height: calc(100dvh - var(--md-header-height, 48px) + 1.1rem);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Remove content padding on home page */
.md-main__inner {
    margin-top: 0;
}

.md-content__inner {
    margin-top: 0;
    padding-top: 0;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(233, 160, 51, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(4, 35, 59, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Light/dark logo switching */
.light-only {
    display: inline-block;
}

.dark-only {
    display: none;
}

[data-md-color-scheme="slate"] .light-only {
    display: none;
}

[data-md-color-scheme="slate"] .dark-only {
    display: inline-block;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: auto;
    padding-bottom: 3rem;
}

.hero-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
}

.hero-section h1 {
    color: #04233b !important;
    font-size: 2.8rem;
    font-weight: 300;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    border: none;
}

/* Hide permalink anchor in hero section */
.hero-section .headerlink,
.hero-section a.headerlink,
.hero-section h1 .headerlink,
.hero-section h1 a.headerlink {
    display: none !important;
}

.hero-section h1 strong {
    color: #e9a033;
    font-weight: 700;
}

.hero-section p {
    color: #555;
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

.hero-btn {
    margin: 0.5rem;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-section .md-button--primary {
    background-color: #04233b;
    border-color: #04233b;
    color: #ffffff;
}

.hero-section .md-button--primary:hover {
    background-color: #e9a033;
    border-color: #e9a033;
    color: #04233b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 160, 51, 0.4);
}

.hero-section .md-button:not(.md-button--primary) {
    background-color: transparent;
    border: 2px solid #04233b;
    color: #04233b;
}

.hero-section .md-button:not(.md-button--primary):hover {
    background-color: #04233b;
    border-color: #04233b;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Hero socials container - between text and buttons */
.hero-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.hero-socials p {
    display: flex;
    gap: 1.2rem;
    margin: 0;
}

.hero-socials a {
    color: #04233b;
    opacity: 0.5;
    font-size: 1.4rem;
    transition: all 0.25s ease;
}

.hero-socials a:hover {
    opacity: 1;
    color: #e9a033;
    transform: translateY(-2px);
}

[data-md-color-scheme="slate"] .hero-socials a {
    color: rgba(255, 255, 255, 0.6);
}

[data-md-color-scheme="slate"] .hero-socials a:hover {
    color: #e9a033;
}

/* Hero buttons container */
.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* ==================== */
/* FEATURES SECTION     */
/* ==================== */

.features-section {
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 300;
    color: #04233b;
    margin-bottom: 3rem;
}

.features-section h2 strong {
    color: #e9a033;
    font-weight: 700;
}

.features-section .grid.cards {
    gap: 1.5rem;
}

.features-section .grid.cards>ul>li {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.features-section .grid.cards>ul>li:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(4, 35, 59, 0.1);
    border-color: #e9a033;
}

.feature-icon {
    color: #e9a033 !important;
    font-size: 2rem !important;
}

/* ==================== */
/* CODE DEMO SECTION    */
/* ==================== */

.code-demo-section {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    padding: 4rem 2rem;
    margin: 0;
    margin-left: calc(-50vw + 50%);
    width: 100vw;
    overflow: hidden;
}

.code-demo-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(233, 160, 51, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(4, 35, 59, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.code-demo-header,
.code-tabs {
    position: relative;
    z-index: 1;
}

.code-demo-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.code-demo-badge {
    display: inline-block;
    background: #fef3c7;
    color: #04233b;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.code-demo-header h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #04233b;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.code-demo-header h2 strong {
    color: #e9a033;
    font-weight: 700;
}

.code-demo-header p {
    color: #555;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

.code-tabs {
    max-width: 1000px;
    margin: 0 auto;
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.code-tab-list {
    display: flex;
    background: #252530;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    gap: 0;
}

.code-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.code-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.code-tab.active {
    color: #fbbf24;
    border-bottom-color: #fbbf24;
}

.code-panels {
    position: relative;
}

.code-panel {
    display: none;
}

.code-panel.active {
    display: block;
}

.code-block {
    position: relative;
    background: #1e1e2e;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #252530;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-lang {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.code-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-copy:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.code-block pre {
    padding: 1.5rem;
    margin: 0;
    font-family: 'JetBrains Mono', 'Source Code Pro', 'SF Mono', 'SFMono-Regular', ui-monospace, 'DejaVu Sans Mono', 'Menlo', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ffffff;
    white-space: pre;
    overflow-x: auto;
    background: transparent;
}

.code-block code {
    display: block;
    color: inherit;
    background: transparent;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    white-space: pre;
    overflow-x: auto;
}

/* Syntax highlighting - Closure/Lisp color pattern */
.code-block code {
    color: #f8f8f2;
}

/* Comments - gray/blue */
.code-block code .code-comment {
    color: #6272a4;
    font-style: italic;
}

/* Strings - yellow/gold */
.code-block code .code-string {
    color: #f1fa8c;
}

/* Numbers - orange/yellow */
.code-block code .code-number {
    color: #ffb86c;
}

/* Keywords - cyan/green */
.code-block code .code-keyword {
    color: #50fa7b;
    font-weight: 500;
}

/* Functions - cyan/blue */
.code-block code .code-func {
    color: #8be9fd;
    font-weight: 500;
}

/* Symbols - purple */
.code-block code .code-symbol {
    color: #bd93f9;
}

/* Operators - white/light */
.code-block code .code-operator {
    color: #f8f8f2;
}

/* Parentheses and brackets - purple/pink */
.code-block code .code-paren {
    color: #bd93f9;
}

/* Results - gray/green */
.code-block code .code-result {
    color: #6272a4;
    font-style: italic;
}

/* Light mode adjustments */
[data-md-color-scheme="default"] .code-demo-header h2 {
    color: #04233b;
}

[data-md-color-scheme="default"] .code-demo-header h2 strong {
    color: #e9a033;
}

[data-md-color-scheme="default"] .code-demo-header p {
    color: #555;
}

[data-md-color-scheme="default"] .code-tabs {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

[data-md-color-scheme="default"] .code-tab-list {
    background: #f5f5f5;
    border-bottom-color: #e0e0e0;
}

[data-md-color-scheme="default"] .code-tab {
    color: #666;
}

[data-md-color-scheme="default"] .code-tab:hover {
    color: #04233b;
    background: rgba(4, 35, 59, 0.05);
}

[data-md-color-scheme="default"] .code-tab.active {
    color: #e9a033;
    border-bottom-color: #e9a033;
}

[data-md-color-scheme="default"] .code-block-header {
    background: #f5f5f5;
    border-bottom-color: #e0e0e0;
}

[data-md-color-scheme="default"] .code-lang {
    color: #666;
}

[data-md-color-scheme="default"] .code-copy {
    background: rgba(4, 35, 59, 0.1);
    border-color: rgba(4, 35, 59, 0.2);
    color: #04233b;
}

[data-md-color-scheme="default"] .code-copy:hover {
    background: rgba(4, 35, 59, 0.15);
    border-color: rgba(4, 35, 59, 0.3);
}

[data-md-color-scheme="default"] .code-block {
    background: #ffffff;
}

[data-md-color-scheme="default"] .code-block code {
    color: #04233b;
}

/* Light mode syntax highlighting */
[data-md-color-scheme="default"] .code-block code .code-comment {
    color: #6a737d;
    font-style: italic;
}

[data-md-color-scheme="default"] .code-block code .code-string {
    color: #032f62;
}

[data-md-color-scheme="default"] .code-block code .code-number {
    color: #e9a033;
}

[data-md-color-scheme="default"] .code-block code .code-keyword {
    color: #005cc5;
    font-weight: 500;
}

[data-md-color-scheme="default"] .code-block code .code-func {
    color: #005cc5;
    font-weight: 500;
}

[data-md-color-scheme="default"] .code-block code .code-symbol {
    color: #6f42c1;
}

[data-md-color-scheme="default"] .code-block code .code-operator {
    color: #04233b;
}

[data-md-color-scheme="default"] .code-block code .code-paren {
    color: #6f42c1;
}

[data-md-color-scheme="default"] .code-block code .code-result {
    color: #6a737d;
    font-style: italic;
}

/* Dark mode styling */
[data-md-color-scheme="slate"] .code-demo-section {
    background: linear-gradient(135deg, #021828 0%, #04233b 50%, #021828 100%);
}

[data-md-color-scheme="slate"] .code-demo-section::before {
    background:
        radial-gradient(circle at 20% 80%, rgba(233, 160, 51, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(233, 160, 51, 0.08) 0%, transparent 50%);
}

[data-md-color-scheme="slate"] .code-demo-header h2 {
    color: #ffffff !important;
}

[data-md-color-scheme="slate"] .code-demo-header h2 strong {
    color: #e9a033;
}

[data-md-color-scheme="slate"] .code-demo-header p {
    color: rgba(255, 255, 255, 0.85);
}

[data-md-color-scheme="slate"] .code-demo-badge {
    background: rgba(233, 160, 51, 0.2);
    color: #f0b85a;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .code-demo-section {
        padding: 2rem 1rem;
    }

    .code-demo-header h2 {
        font-size: 1.8rem;
    }

    .code-tab-list {
        flex-wrap: wrap;
    }

    .code-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .code-block pre {
        font-size: 0.8rem;
        padding: 1rem;
    }
}

/* ==================== */
/* CTA SECTION          */
/* ==================== */

.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 300;
    color: #04233b;
    margin-bottom: 1rem;
}

.cta-section h2 strong {
    color: #e9a033;
    font-weight: 700;
}

.cta-section p {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-section .md-button {
    margin: 0.5rem;
    border-radius: 50px;
    padding: 0.8rem 2rem;
}

.cta-section .md-button--primary {
    background-color: #04233b;
    border-color: #04233b;
}

.cta-section .md-button--primary:hover {
    background-color: #e9a033;
    border-color: #e9a033;
    color: #04233b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 160, 51, 0.4);
}

.cta-section .md-button:not(.md-button--primary) {
    border: 2px solid #04233b;
    color: #04233b;
    background-color: transparent;
}

.cta-section .md-button:not(.md-button--primary):hover {
    background-color: #04233b;
    border-color: #04233b;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==================== */
/* DARK MODE OVERRIDES  */
/* ==================== */

[data-md-color-scheme="slate"] .hero-section {
    background: linear-gradient(135deg, #021828 0%, #04233b 50%, #021828 100%);
}

[data-md-color-scheme="slate"] .hero-section::before {
    background:
        radial-gradient(circle at 20% 80%, rgba(233, 160, 51, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(233, 160, 51, 0.08) 0%, transparent 50%);
}

[data-md-color-scheme="slate"] .hero-section h1 {
    color: #ffffff !important;
}

[data-md-color-scheme="slate"] .hero-section p {
    color: rgba(255, 255, 255, 0.85);
}

[data-md-color-scheme="slate"] .hero-section .md-button--primary {
    background-color: #e9a033;
    border-color: #e9a033;
    color: #04233b;
}

[data-md-color-scheme="slate"] .hero-section .md-button--primary:hover {
    background-color: #f0b85a;
    border-color: #f0b85a;
    box-shadow: 0 4px 12px rgba(233, 160, 51, 0.4);
}

[data-md-color-scheme="slate"] .hero-section .md-button:not(.md-button--primary) {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

[data-md-color-scheme="slate"] .hero-section .md-button:not(.md-button--primary):hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}


/* Hero ticker / marquee */
.hero-ticker {
    position: relative;
    margin-top: auto;
    margin-bottom: 0;
    margin-left: calc(-50vw + 50%);
    width: 100vw;
    background: linear-gradient(90deg, #04233b 0%, #0a3a5c 50%, #04233b 100%);
    overflow: hidden;
    padding: 0.5rem 0;
}

.hero-ticker__content {
    display: flex;
    gap: 2rem;
    animation: ticker 25s linear infinite;
    white-space: nowrap;
    width: max-content;
}

.hero-ticker__content span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}


[data-md-color-scheme="slate"] .hero-ticker {
    background: rgba(2, 24, 40, 0.95);
}

[data-md-color-scheme="slate"] .features-section h2,
[data-md-color-scheme="slate"] .code-demo-section h2,
[data-md-color-scheme="slate"] .cta-section h2 {
    color: #ffffff;
}

[data-md-color-scheme="slate"] .features-section .grid.cards>ul>li {
    background: #0a3a5c;
    border-color: #0a3a5c;
}

[data-md-color-scheme="slate"] .features-section .grid.cards>ul>li:hover {
    border-color: #e9a033;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}


[data-md-color-scheme="slate"] .cta-section p {
    color: rgba(255, 255, 255, 0.7);
}

[data-md-color-scheme="slate"] .md-typeset .md-button--primary,
[data-md-color-scheme="slate"] .md-button--primary,
[data-md-color-scheme="slate"] a.md-button--primary {
    background-color: #e9a033 !important;
    border-color: #e9a033 !important;
    color: #04233b !important;
}

[data-md-color-scheme="slate"] .md-typeset .md-button--primary:hover,
[data-md-color-scheme="slate"] .md-button--primary:hover,
[data-md-color-scheme="slate"] a.md-button--primary:hover {
    background-color: #f0b85a !important;
    border-color: #f0b85a !important;
    color: #04233b !important;
    box-shadow: 0 4px 12px rgba(233, 160, 51, 0.4);
}

[data-md-color-scheme="slate"] .md-typeset .md-button:not(.md-button--primary),
[data-md-color-scheme="slate"] .md-button:not(.md-button--primary),
[data-md-color-scheme="slate"] a.md-button:not(.md-button--primary) {
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
    background-color: transparent !important;
}

[data-md-color-scheme="slate"] .md-typeset .md-button:not(.md-button--primary):hover,
[data-md-color-scheme="slate"] .md-button:not(.md-button--primary):hover,
[data-md-color-scheme="slate"] a.md-button:not(.md-button--primary):hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* ==================== */
/* FOOTER STYLING       */
/* ==================== */

.md-footer {
    background-color: #04233b;
    color: rgba(255, 255, 255, 0.7);
}

.md-footer-meta {
    background-color: #021828;
}

.md-footer__link {
    color: rgba(255, 255, 255, 0.7);
}

.md-footer__link:hover {
    color: #e9a033;
}

.md-footer__title {
    color: rgba(255, 255, 255, 0.5);
}

.md-footer-copyright {
    color: rgba(255, 255, 255, 0.5);
}

.md-footer-copyright a {
    color: rgba(255, 255, 255, 0.7);
}

.md-footer-copyright a:hover {
    color: #e9a033;
}

/* Hide previous/next page navigation buttons */
.md-footer-nav,
.md-footer-nav__link,
.md-footer-nav__link--prev,
.md-footer-nav__link--next {
    display: none !important;
}

/* Footer layout */
.md-footer-meta__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Footer logo */
.md-copyright {
    display: flex;
    align-items: center;
}

.md-copyright__logo {
    display: flex;
    align-items: center;
}

.md-copyright__logo img {
    height: 32px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.25s;
}

.md-copyright__logo img:hover {
    opacity: 1;
}

/* Footer social icons alignment */
.md-social {
    display: flex;
    align-items: center;
}

.md-social__link {
    color: rgba(255, 255, 255, 0.7);
}

.md-social__link:hover {
    color: #e9a033;
}

/* ==================== */
/* RESPONSIVE           */
/* ==================== */

@media screen and (max-width: 768px) {
    .hero-section {
        padding: 3rem 1rem 4rem 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .hero-logo {
        max-width: 280px;
    }

    .hero-btn {
        display: block;
        width: 100%;
        max-width: 280px;
        margin: 0.5rem auto;
    }
}