/* ==========================================================================
   main.css — Base styles, CSS variables, typography, resets, scrollbar,
              accent system, code blocks, tables, callout boxes, glow, etc.
   ========================================================================== */

/* ========== RESET ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Google Sans', 'DM Sans', system-ui, sans-serif;
    background: #000;
    color: #d4d4d8;
    overflow-x: hidden;
}

h1,
h2 {
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

h3,
h4,
h5,
h6 {
    font-family: 'Google Sans', 'DM Sans', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #262626;
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: #404040;
}

/* ========== ACCENT SYSTEM ========== */
:root {
    --accent: #facc15;
    --accent-rgb: 250, 204, 21;
    --accent-dim: #facc1520;
}

[data-lang="html"] {
    --accent: #fb923c;
    --accent-rgb: 251, 146, 60;
    --accent-dim: #fb923c20;
}

[data-lang="css"] {
    --accent: #e879f9;
    --accent-rgb: 232, 121, 249;
    --accent-dim: #e879f920;
}

[data-lang="javascript"] {
    --accent: #fbbf24;
    --accent-rgb: 251, 191, 36;
    --accent-dim: #fbbf2420;
}

[data-lang="sql"] {
    --accent: #38bdf8;
    --accent-rgb: 56, 189, 248;
    --accent-dim: #38bdf820;
}

[data-lang="git"] {
    --accent: #fb7185;
    --accent-rgb: 251, 113, 133;
    --accent-dim: #fb718520;
}

/* ========== CARDS ========== */
.content-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.content-card:hover {
    border-color: rgba(var(--accent-rgb), 0.2);
    box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.04);
    transform: translateY(-1px);
}

.content-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #e5e5e5;
    letter-spacing: -0.02em;
}

.content-card p,
.content-card li {
    font-size: 14.5px;
    line-height: 1.8;
    color: #a3a3a3;
}

.content-card ul,
.content-card ol {
    padding-left: 20px;
}

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

.content-card strong {
    color: #d4d4d8;
}

/* ========== CODE BLOCKS ========== */
.code-wrapper {
    position: relative;
    margin: 14px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
}

.code-wrapper .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 14px;
    background: #0f0f0f;
    border-bottom: 1px solid #1a1a1a;
    font-size: 11px;
    font-weight: 600;
    color: #404040;
    font-family: 'Google Sans Code', 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-wrapper .copy-btn {
    background: #171717;
    border: 1px solid #262626;
    color: #525252;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    cursor: pointer;
    font-family: 'Google Sans', 'DM Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.code-wrapper .copy-btn:hover {
    background: #262626;
    color: #a3a3a3;
}

.code-wrapper pre {
    margin: 0;
    padding: 18px;
    overflow-x: auto;
    background: transparent !important;
}

.code-wrapper code {
    font-family: 'Google Sans Code', 'JetBrains Mono', monospace !important;
    font-size: 13px;
    line-height: 1.7;
    background: transparent !important;
}

/* ========== TABLES ========== */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13.5px;
    border-radius: 12px;
    overflow: hidden;
}

.styled-table thead {
    background: #0f0f0f;
}

.styled-table th {
    padding: 11px 16px;
    text-align: left;
    font-weight: 700;
    color: #a3a3a3;
    border-bottom: 2px solid rgba(var(--accent-rgb), 0.2);
    font-family: 'Google Sans', 'DM Sans', sans-serif;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.styled-table td {
    padding: 9px 16px;
    color: #737373;
    border-bottom: 1px solid #141414;
}

.styled-table tbody tr:hover {
    background: #0a0a0a;
}

.styled-table code {
    background: #141414;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: var(--accent);
}

/* ========== DIVIDER ========== */
.section-divider {
    height: 1px;
    margin: 40px auto;
    max-width: 1100px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.12), transparent);
}

/* ========== CALLOUT BOXES ========== */
.tip-box {
    background: #0a0f1a;
    border-left: 3px solid #3b82f6;
    padding: 12px 18px;
    border-radius: 0 10px 10px 0;
    margin: 12px 0;
    font-size: 13.5px;
    color: #7da0c9;
    line-height: 1.7;
}

.warn-box {
    background: #14100a;
    border-left: 3px solid #f59e0b;
    padding: 12px 18px;
    border-radius: 0 10px 10px 0;
    margin: 12px 0;
    font-size: 13.5px;
    color: #c9a055;
    line-height: 1.7;
}

.danger-box {
    background: #140a0c;
    border-left: 3px solid #ef4444;
    padding: 12px 18px;
    border-radius: 0 10px 10px 0;
    margin: 12px 0;
    font-size: 13.5px;
    color: #c97a7a;
    line-height: 1.7;
}

/* ========== SQL OUTPUT TABLE ========== */
.sql-output {
    margin: 10px 0;
}

.sql-output summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #404040;
    padding: 8px 14px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: 'Google Sans', 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sql-output summary:hover {
    color: #737373;
    background: #0a0a0a;
}

.sql-output[open] summary {
    border-radius: 8px 8px 0 0;
    border-bottom-color: transparent;
}

.sql-output .output-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    background: #050505;
    border: 1px solid #1a1a1a;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.sql-output .output-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--accent);
    background: #0a0a0a;
    border-bottom: 1px solid #1a1a1a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
}

.sql-output .output-table td {
    padding: 6px 12px;
    color: #737373;
    border-bottom: 1px solid #0f0f0f;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
}

.sql-output .output-table tbody tr:hover {
    background: #0a0a0a;
}

.sql-output .output-table tbody tr:last-child td {
    border-bottom: 0;
}

.sql-output .row-count {
    font-size: 11px;
    color: #333;
    padding: 4px 12px;
    background: #050505;
    border: 1px solid #1a1a1a;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    font-family: 'JetBrains Mono', monospace;
}

/* ========== ATMOSPHERIC GLOW ========== */
.glow-orb {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.03) 0%, transparent 70%);
}

.kw {
    color: var(--accent);
    font-weight: 600;
}

/* ========== HERO (per-language) ========== */
.section-hero {
    padding: 80px 48px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-hero h1 {
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    font-size: 64px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.05;
    margin: 0 0 16px;
    letter-spacing: -0.04em;
}

.section-hero p {
    font-size: 17px;
    color: #525252;
    max-width: 600px;
    line-height: 1.7;
}

/* ========== SUBSECTION HEADERS ========== */
.subsection-header {
    font-size: 36px;
    font-weight: 400;
    color: #fafafa;
    margin: 0 0 8px;
    padding-top: 24px;
    letter-spacing: -0.01em;
}

.subsection-desc {
    font-size: 14px;
    color: #525252;
    margin: 0 0 28px;
    line-height: 1.6;
}
