:root {
    --page-max-width: 80vw;
    --padding-desktop: 48px;
    
    /* Portfolio colors */
    --first-color: hsl(14, 98%, 50%);
    --black-color: hsl(0, 0%, 0%);
    --black-color-light: hsl(0, 0%, 40%);
    --white-color: hsl(0, 0%, 95%);
    --title-color: hsl(0, 0%, 0%);
    --text-color: hsl(0, 0%, 35%);
    --text-color-light: hsl(0, 0%, 64%);
    --body-color: hsl(0, 0%, 87%);
    --container-color: hsl(0, 0%, 83%);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    margin: 0 auto;
    padding: var(--padding-desktop);
    max-width: var(--page-max-width);
    background: var(--body-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--title-color);
    page-break-after: avoid;
}

h1 {
    font-size: 2rem;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--container-color);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem 0;
    padding-top: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem 0;
    color: var(--black-color-light);
}

h4 {
    font-size: 1.05rem;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--black-color-light);
}

p {
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

a {
    color: var(--first-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: hsl(14, 98%, 60%);
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin: 0 0 1rem 1.5rem;
    padding: 0;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

li::marker {
    color: var(--text-color-light);
}

/* Callout Boxes */
.note,
.important,
.example {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-left: 3px solid;
    background: var(--white-color);
    font-size: 0.95rem;
}

.note {
    border-color: var(--black-color-light);
    color: var(--text-color);
}

.important {
    background: hsl(45, 100%, 95%);
    border-color: hsl(45, 100%, 50%);
    color: hsl(45, 80%, 25%);
}

.example {
    background: hsl(14, 100%, 97%);
    border-color: var(--first-color);
    color: hsl(14, 80%, 25%);
}

/* Code Blocks */
.code-block {
    background: var(--container-color);
    border: 1px solid hsl(0, 0%, 75%);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--black-color);
    overflow-x: auto;
    white-space: pre;
}

code {
    font-family: inherit;
    background: var(--container-color);
    padding: 0.2em 0.4em;
    font-size: 0.9em;
    color: var(--black-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    border: 1px solid hsl(0, 0%, 75%);
    overflow: hidden;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid hsl(0, 0%, 75%);
}

th {
    background: var(--white-color);
    font-weight: 600;
    color: var(--title-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-color);
}

tbody tr:hover {
    background: var(--white-color);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Utilities */
.muted {
    color: var(--text-color-light);
    font-size: 0.9rem;
}

.accent {
    color: var(--first-color);
    font-weight: 500;
}

.page-break {
    page-break-before: always;
    break-before: page;
}

.avoid-break {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* Documentation Layout */
.doc-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.doc-main {
    flex: 1 1 auto;
    min-width: 0;
}

.doc-toc {
    position: sticky;
    top: 2rem;
    flex: 0 0 280px;
    order: 2;
}

.doc-toc .toc-card {
    border-left: 1px solid hsl(0, 0%, 75%);
}

.doc-toc h4 {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-color-light);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.925rem;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.toc-list a .toc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--white-color);
    color: var(--text-color-light);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.toc-list a:hover {
    background: var(--white-color);
    color: var(--title-color);
    border-left-color: hsl(0, 0%, 75%);
}

.toc-list a.active {
    background: hsl(14, 100%, 97%);
    color: var(--first-color);
    border-left-color: var(--first-color);
    font-weight: 500;
}

.toc-list a.active .toc-num {
    background: var(--first-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 980px) {
    body {
        padding: 2rem;
    }

    .doc-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .doc-toc {
        position: relative;
        width: 100%;
        top: 0;
        order: -1;
    }

    .toc-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .toc-list a {
        white-space: nowrap;
    }

    .toc-list a .toc-num {
        display: none;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1.5rem;
        font-size: 14px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* Very small devices / phones */
@media (max-width: 420px) {
    :root {
        --page-max-width: 96vw;
    }

    body {
        padding: 0.75rem;
        font-size: 14px;
        max-width: 100%;
    }

    .doc-layout {
        gap: 1rem;
        flex-direction: column;
    }

    /* Hide the sticky TOC on very small screens to free space */
    .doc-toc {
        display: none;
    }

    /* Ensure the main column takes full width */
    .doc-main {
        width: 100%;
    }

    .toc-list a {
        padding: 0.35rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Reduce search bar footprint */
    .doc-search-bar {
        left: 0.5rem;
        right: 0.5rem;
        min-width: auto;
        padding: 0.5rem;
    }

    .quick-search-trigger {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }

    .project-grid {
        gap: 1rem;
    }

    .doc-card-content {
        padding: 0.75rem 1rem 1rem 1rem;
    }

    .doc-card-badge {
        padding: 0.75rem 1rem 0.5rem 1rem;
    }

    .project-title {
        font-size: 1.25rem;
    }

    .project-count {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

    .quick-search-modal {
        padding: 0.5rem;
    }

    .quick-search-header {
        padding: 0.75rem;
    }

    .result-title {
        font-size: 0.9rem;
    }

    /* Make table cells more compact on phones */
    table, th, td {
        font-size: 0.825rem;
    }

    th, td {
        padding: 0.4rem 0.5rem;
    }

    /* Reduce empty state padding */
    .index-empty {
        padding: 2.5rem 1rem;
    }
}

/* Print Styles */
@media print {
    body {
        margin: 0;
        padding: 1cm;
        max-width: none;
        color: #000;
        background: #fff;
        font-size: 11pt;
    }

    /* Language Switcher - Simple HTML Links */
    .lang-toggle-noscript {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1100;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(8px);
        border: 1px solid var(--border);
        padding: 8px 12px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .lang-toggle-noscript a {
        color: var(--accent);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.875rem;
        transition: color 0.15s ease;
    }

    .lang-toggle-noscript a:hover {
        color: var(--accent-light);
    }

    .lang-toggle-noscript span {
        color: var(--text-muted);
        margin: 0 6px;
    }

    /* Responsive adjustments */
    @media (max-width: 980px) {
        .lang-toggle-noscript {
            top: 14px;
            right: 14px;
        }
    }

    @media (max-width: 640px) {
        .lang-toggle-noscript {
            top: 12px;
            right: 12px;
        }
    }

    h1 {
        font-size: 18pt;
    }

    h2 {
        font-size: 14pt;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    .doc-toc {
        display: none;
    }

    .note,
    .important,
    .example,
    .code-block {
        page-break-inside: avoid;
        border: 1px solid #ddd;
    }

    table {
        page-break-inside: avoid;
    }

    .doc-search-bar {
        display: none;
    }
}

/* Search Bar Styles */
.doc-search-bar {
    background: rgba(255, 255, 255, 0.8);
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    border-radius: 5px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 0.875rem 1.125rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 540px;
    backdrop-filter: blur(4px);
}

.doc-search-bar.visible {
    top: 1.25rem;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.search-container > *:first-child {
    flex: 3 1 0%;
    min-width: 0;
}

.search-container > *:last-child {
    flex: 2 1 0%;
    min-width: 0;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid hsl(0, 0%, 75%);
    border-radius: 7px;
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.search-input-wrapper:focus-within {
    border-color: var(--first-color);
    box-shadow: 0 0 0 3px hsla(14, 98%, 50%, 0.08), 0 2px 4px hsla(14, 98%, 50%, 0.06);
}

.search-icon {
    color: var(--text-color-light);
    flex-shrink: 0;
    margin-right: 0.625rem;
    opacity: 0.7;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.925rem;
    color: var(--text-color);
    font-family: inherit;
    padding: 0;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-color-light);
    opacity: 0.6;
}

.search-clear {
    background: none;
    border: none;
    padding: 0.35rem;
    cursor: pointer;
    color: var(--text-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin-left: 0.25rem;
    opacity: 0.6;
}

.search-clear:hover {
    background: var(--white-color);
    color: var(--text-color);
    opacity: 1;
}

.search-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.search-count {
    font-size: 0.8125rem;
    color: var(--text-color-light);
    font-weight: 500;
    min-width: 70px;
    text-align: right;
    user-select: none;
    letter-spacing: 0.01em;
}

.search-prev,
.search-next,
.search-close {
    background: #ffffff;
    border: 1px solid hsl(0, 0%, 75%);
    padding: 0.425rem;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.search-prev:hover:not(:disabled),
.search-next:hover:not(:disabled) {
    background: hsl(14, 100%, 97%);
    border-color: var(--first-color);
    color: var(--first-color);
    box-shadow: 0 2px 6px hsla(14, 98%, 50%, 0.12);
}

.search-prev:disabled,
.search-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.search-close {
    border-color: rgba(239, 68, 68, 0.15);
    margin-left: 0.25rem;
}

.search-close:hover {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.12);
}

/* Search Highlight Styles */
.search-highlight {
    background: hsla(14, 98%, 50%, 0.12);
    color: inherit;
    padding: 0.1em 0.15em;
    border-radius: 3px;
    transition: all 0.15s ease;
    box-shadow: 0 0 0 1px hsla(14, 98%, 50%, 0.08);
}

.search-highlight-current {
    background: var(--first-color);
    color: #ffffff;
    font-weight: 500;
    box-shadow: 0 0 0 3px hsla(14, 98%, 50%, 0.2);
    padding: 0.15em 0.2em;
}

/* Mobile Search Bar */
@media (max-width: 640px) {
    .doc-search-bar {  
        display: none;
    }

    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .search-controls {
        width: 100%;
        justify-content: space-between;
    }

    .search-count {
        min-width: auto;
        flex: 1;
        text-align: left;
    }
}

/* ========================================
   Documentation Index Page Styles
   ======================================== */

.index-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Header with Quick Search Button */
.index-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--container-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

.header-left h1 {
    margin: 0 0 0.5rem 0;
    padding: 0;
    border: none;
    font-size: 2rem;
}

.header-left .muted {
    margin: 0;
}

.quick-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--white-color);
    border: 1px solid hsl(0, 0%, 75%);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.quick-search-trigger:hover {
    background: var(--first-color);
    color: white;
    border-color: var(--first-color);
    box-shadow: var(--shadow-md);
}

.quick-search-trigger svg {
    flex-shrink: 0;
}

.quick-search-trigger kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: var(--container-color);
    border: 1px solid hsl(0, 0%, 70%);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quick-search-trigger:hover kbd {
    background: white;
    color: var(--first-color);
}

/* Quick Search Modal */
.quick-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.quick-search-overlay.active {
    opacity: 1;
}

.quick-search-modal {
    width: 100%;
    max-width: 640px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
}

.quick-search-overlay.active .quick-search-modal {
    transform: translateY(0);
}

.quick-search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--container-color);
}

.quick-search-header .search-icon {
    color: var(--text-color-light);
    flex-shrink: 0;
}

.quick-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1.125rem;
    color: var(--text-color);
    font-family: inherit;
    padding: 0;
    min-width: 0;
}

.quick-search-input::placeholder {
    color: var(--text-color-light);
}

.quick-search-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.quick-search-close:hover {
    background: var(--container-color);
    color: var(--text-color);
}

.quick-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    min-height: 200px;
    max-height: 50vh;
}

.quick-search-result {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.15s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.quick-search-result:hover,
.quick-search-result.selected {
    background: hsl(14, 100%, 97%);
    border-color: var(--first-color);
}

.result-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--container-color);
    border-radius: 8px;
    color: var(--text-color-light);
    transition: all 0.15s ease;
}

.quick-search-result:hover .result-icon,
.quick-search-result.selected .result-icon {
    background: var(--first-color);
    color: white;
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--title-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-lang {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--container-color);
    color: var(--text-color);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    flex-shrink: 0;
}

.quick-search-result:hover .result-lang,
.quick-search-result.selected .result-lang {
    background: var(--first-color);
    color: white;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-color-light);
}

.result-project {
    font-weight: 500;
}

.result-version {
    color: var(--text-color-light);
}

.result-arrow {
    flex-shrink: 0;
    color: var(--text-color-light);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.15s ease;
}

.quick-search-result:hover .result-arrow,
.quick-search-result.selected .result-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--first-color);
}

.quick-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-color-light);
}

.quick-search-empty svg {
    margin-bottom: 1rem;
    opacity: 0.4;
}

.quick-search-empty p {
    margin: 0;
    font-size: 1rem;
}

.quick-search-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--container-color);
    background: hsl(0, 0%, 98%);
    border-radius: 0 0 12px 12px;
}

.search-hint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-color-light);
}

.search-hint kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: white;
    border: 1px solid var(--container-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Main Content Area */
.index-main {
    min-height: 400px;
}

.index-content {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

/* Project Sections */
.project-section {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-header {
    margin-bottom: 2rem;
}

.project-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.project-title {
    margin: 0;
    padding: 0;
    font-size: 1.875rem;
    color: var(--title-color);
    position: relative;
}

.project-title::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: var(--first-color);
    border-radius: 2px;
}

.project-count {
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 600;
    background: var(--white-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--container-color);
}

.project-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--first-color) 0%, transparent 100%);
    border-radius: 1px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* Documentation Cards */
.doc-card {
    background: white;
    border: 1px solid hsl(0, 0%, 85%);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--first-color), hsl(14, 98%, 60%));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.doc-card:hover::before {
    transform: scaleX(1);
}

.doc-card:hover {
    border-color: var(--first-color);
}

.doc-card-badge {
    padding: 1rem 1.5rem 0.5rem 1.5rem;
}

.doc-card-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.doc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--container-color);
}

.doc-card-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--title-color);
    line-height: 1.4;
    flex: 1;
    transition: color 0.2s ease;
}

.doc-card:hover .doc-card-title {
    color: var(--first-color);
}

.doc-card-lang {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    background: var(--first-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.doc-card-description {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9375rem;
    line-height: 1.7;
    flex: 1;
}

.doc-card-meta {
    display: flex;
    gap: 1.5rem;
    padding-top: 0.75rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color-light);
    font-size: 0.8125rem;
    font-weight: 500;
}

.meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.doc-card-footer {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, hsl(0, 0%, 98%), hsl(0, 0%, 96%));
    border-top: 1px solid var(--container-color);
}

.doc-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--first-color);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
}

.doc-card-link:hover {
    gap: 0.875rem;
    color: hsl(14, 98%, 60%);
}

.doc-card-link svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.doc-card-link:hover svg {
    transform: translateX(4px);
}

/* Empty State */
.index-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    background: var(--white-color);
    border-radius: 12px;
    border: 2px dashed var(--container-color);
}

.empty-icon {
    margin-bottom: 1.5rem;
    color: var(--text-color-light);
    opacity: 0.5;
}

.index-empty h3 {
    margin: 0 0 0.5rem 0;
    color: var(--title-color);
    font-size: 1.25rem;
}

.index-empty p {
    margin: 0;
    font-size: 1rem;
}

/* Responsive Design for Index Page */
@media (max-width: 980px) {
    .index-header {
        margin-bottom: 2rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-search-trigger {
        width: 100%;
        justify-content: center;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .quick-search-modal {
        max-width: 90%;
    }
}

@media (max-width: 640px) {
    .index-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .header-left h1 {
        font-size: 1.5rem;
    }

    .quick-search-trigger span {
        display: none;
    }

    .quick-search-overlay {
        padding: 2rem 0.75rem 1rem 0.75rem;
    }

    .quick-search-modal {
        max-width: 100%;
        max-height: 80vh;
    }

    .quick-search-header {
        padding: 1rem;
    }

    .quick-search-input {
        font-size: 1rem;
    }

    .quick-search-result {
        padding: 0.875rem 1rem;
    }

    .result-icon {
        width: 36px;
        height: 36px;
    }

    .result-title {
        font-size: 0.9375rem;
    }

    .search-hint {
        flex-wrap: wrap;
        justify-content: center;
    }

    .index-content {
        gap: 2.5rem;
    }

    .project-header {
        margin-bottom: 1.5rem;
    }

    .project-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .project-title {
        font-size: 1.375rem;
    }

    .project-title::before {
        display: none;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .doc-card-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .doc-card-lang {
        align-self: flex-start;
    }

    .doc-card-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}

