/* DTL Website - Shared Styles
   © 2025-2026 dtlaz.org
   Lead Architect: Padam Sundar Kafle
*/

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

:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #0b1220;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-teal: #5CE1E6;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #06b6d4, #5CE1E6);
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --border-light: rgba(59, 130, 246, 0.2);
    --border-medium: rgba(59, 130, 246, 0.4);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: radial-gradient(ellipse at 20% 30%, #1a2332 0%, var(--bg-darker) 50%, var(--bg-dark) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.92);
    padding: 0.75rem 2rem;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.nav-title {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 1rem;
    text-transform: uppercase;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-teal);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* Main Content */
main {
    margin-top: 4.5rem;
    min-height: calc(100vh - 4.5rem);
}

/* Page Header */
.page-header {
    padding: 4rem 2rem 3rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header .subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Content Container */
.content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.content-wide {
    max-width: 1400px;
}

/* Section Styles */
section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    color: var(--accent-teal);
}

h4 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Links */
a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-blue);
}

/* Lists */
ul, ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Code Blocks */
pre {
    background: linear-gradient(135deg, rgba(11, 18, 32, 0.95) 0%, rgba(2, 6, 23, 0.8) 100%);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #60a5fa;
    margin: 1.5rem 0;
    position: relative;
}

pre::before {
    content: attr(data-lang);
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 0.65rem;
    color: var(--accent-teal);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: rgba(59, 130, 246, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-cyan);
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.code-comment { color: #6b7280; }
.code-keyword { color: var(--accent-teal); }
.code-enum { color: var(--success); }
.code-string { color: #fbbf24; }
.code-type { color: #a78bfa; }
.code-number { color: #f472b6; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-teal);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

td code {
    font-size: 0.85rem;
}

/* Cards */
.card {
    background: linear-gradient(135deg, rgba(11, 18, 32, 0.9) 0%, rgba(2, 6, 23, 0.7) 100%);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.15);
}

.card h3 {
    margin-top: 0;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

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

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

/* Feature Cards */
.feature-card {
    background: linear-gradient(135deg, rgba(11, 18, 32, 0.8) 0%, rgba(2, 6, 23, 0.6) 100%);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.feature-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem 0;
    color: var(--accent-teal);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.35);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-teal);
    border: 1px solid var(--accent-teal);
}

.btn-secondary:hover {
    background: rgba(92, 225, 230, 0.1);
    color: var(--accent-teal);
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-medium);
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-teal);
    background: rgba(92, 225, 230, 0.05);
}

.badge-success {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.badge-warning {
    border-color: var(--warning);
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

/* Callouts */
.callout {
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.callout-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-blue);
}

.callout-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.callout-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
}

.callout-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
}

.comparison-table table {
    min-width: 600px;
}

.comparison-table .check {
    color: var(--success);
    font-weight: bold;
}

.comparison-table .cross {
    color: var(--error);
}

.comparison-table .partial {
    color: var(--warning);
}

/* Sidebar Layout */
.with-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.sidebar {
    position: sticky;
    top: 6rem;
    height: fit-content;
}

.sidebar-nav {
    background: linear-gradient(135deg, rgba(11, 18, 32, 0.8) 0%, rgba(2, 6, 23, 0.6) 100%);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.sidebar-nav h4 {
    color: var(--accent-teal);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-teal);
}

@media (max-width: 900px) {
    .with-sidebar {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        display: none;
    }
}

/* Footer */
footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border-light);
    padding: 3rem 2rem;
    background: var(--bg-darker);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-teal);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-section a:hover {
    color: var(--accent-teal);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer-bottom strong {
    color: var(--accent-teal);
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent-teal);
}

.breadcrumb span {
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* TOC */
.toc {
    background: linear-gradient(135deg, rgba(11, 18, 32, 0.8) 0%, rgba(2, 6, 23, 0.6) 100%);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc h4 {
    color: var(--accent-teal);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.toc ul {
    margin: 0;
    padding-left: 1.25rem;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toc a:hover {
    color: var(--accent-teal);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 3rem 1.5rem 2rem;
    }
    .content {
        padding: 0 1.5rem 3rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    pre {
        font-size: 0.8rem;
        padding: 1rem;
    }
}
