@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

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

/* ---- CSS variables: dark (default) ---- */
:root {
    --bg:             #0f0f0f;
    --bg-panel:       #161616;
    --bg-hover:       #1e1e1e;
    --border:         #2a2a2a;
    --border-light:   #333;
    --accent:         #005B99;
    --accent-light:   #0070bb;
    --amber:          #f5a623;
    --green:          #3ecf6e;
    --text-primary:   #f0f0f0;
    --text-secondary: #888;
    --text-dim:       #444;
    --font-ui:        'Barlow', sans-serif;
    --font-mono:      'DM Mono', monospace;
    --shadow:         rgba(0,0,0,0.5);
}

/* ---- CSS variables: light ---- */
:root.light {
    --bg:             #f0f2f4;
    --bg-panel:       #ffffff;
    --bg-hover:       #e8eaed;
    --border:         #d0d4d8;
    --border-light:   #b0b6bc;
    --text-primary:   #0f0f0f;
    --text-secondary: #555;
    --text-dim:       #aaa;
    --shadow:         rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    font-family: var(--font-ui);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ---- Toolbar ---- */
.toolbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    height: 52px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px var(--shadow);
}

.toolbar-title {
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border);
    gap: 10px;
    transition: background 0.15s;
}

.toolbar-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.toolbar-title:hover { background: var(--bg-hover); }

.toolbar-sub {
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0;
    text-transform: none;
}

.toolbar-spacer { flex: 1; }

.toolbar-back {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    border-left: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.15s;
}

.toolbar-back:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 16px;
    height: 100%;
    flex-shrink: 0;
    transition: all 0.15s;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ---- Page layout ---- */
.about-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ---- Hero ---- */
.about-hero {
    padding: 64px 0 52px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 56px;
}

.about-hero-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 18px;
}

.about-hero h1 {
    font-family: var(--font-ui);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 18px;
    line-height: 1.15;
}

.about-hero p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 580px;
}

/* ---- Mode pills ---- */
.mode-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 28px;
}

.mode-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mode-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Sections ---- */
.about-section {
    margin-bottom: 52px;
}

.about-section-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 10px;
}

.about-section h2 {
    font-family: var(--font-ui);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.about-section p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 14px;
    max-width: 680px;
}

.about-section p:last-child { margin-bottom: 0; }

.about-section a {
    color: var(--accent-light);
    text-decoration: none;
}

.about-section a:hover { text-decoration: underline; }

/* ---- Cards grid ---- */
.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-top: 18px;
}

.about-card {
    background: var(--bg-panel);
    padding: 18px;
    transition: background 0.15s;
}

.about-card:hover { background: var(--bg-hover); }

.about-card-icon {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.about-card h3 {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.about-card p {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    max-width: none;
}

/* ---- Flow steps ---- */
.about-flow {
    margin-top: 18px;
    border: 1px solid var(--border);
}

.about-flow-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.about-flow-step:last-child { border-bottom: none; }
.about-flow-step:hover { background: var(--bg-hover); }

.about-flow-num {
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.about-flow-text h4 {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.about-flow-text p {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    max-width: none;
}

/* ---- Tables ---- */
.about-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    margin-top: 18px;
    border: 1px solid var(--border);
}

.about-table th {
    text-align: left;
    padding: 8px 14px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.about-table td {
    padding: 10px 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.about-table tr:last-child td { border-bottom: none; }
.about-table tr:hover td { background: var(--bg-hover); }

.about-table td:first-child {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.about-tag {
    display: inline-block;
    padding: 2px 7px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--accent-light);
    background: rgba(0, 91, 153, 0.12);
    border: 1px solid rgba(0, 112, 187, 0.25);
}

/* ---- Footer ---- */
.about-footer {
    border-top: 1px solid var(--border);
    padding: 22px 24px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.about-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.about-footer a:hover { color: var(--text-primary); }

/* ---- Mobile ---- */
@media (max-width: 1024px) {
    .toolbar-sub { display: none; }
}

@media (max-width: 600px) {
    .about-page { padding: 0 16px 60px; }
    .about-hero { padding: 40px 0 36px; }
    .about-hero h1 { font-size: 1.5rem; }
    .toolbar-title { font-size: 0.85rem; padding: 0 12px; }
    .about-cards { grid-template-columns: 1fr; }
    .about-table { font-size: 0.78rem; }
    .about-table th, .about-table td { padding: 8px 10px; }
    .about-footer { padding: 18px 16px; }
}