/* Restume Dark — Design System
   Philosophy: "Linear meets Clerk meets Stripe."
   Dark mode first. Developer-native. Premium but not corporate.
*/

/* ── Design Tokens (CSS Variables) ─────────────────── */
:root {
    /* Base — near-black with slight blue undertone, NOT pure black */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-surface: #16213e;

    /* Text — NOT pure white */
    --text-primary: #e8e8ed;
    --text-secondary: #8888a0;
    --text-tertiary: #55556a;

    /* Accent — electric cyan-blue ("Restume Blue") */
    --accent-primary: #00d4ff;
    --accent-secondary: #0099cc;
    --accent-glow: rgba(0, 212, 255, 0.15);

    /* Semantic */
    --success: #00e676;
    --warning: #ffab40;
    --error: #ff5252;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.10);
    --border-accent: rgba(0, 212, 255, 0.30);

    /* Hero gradient */
    --gradient-hero: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 50%, #ff2d7c 100%);

    /* Typography */
    --font-headline: 'Satoshi', sans-serif;
    --font-body: 'General Sans', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

/* ── Base Styles ──────────────────────────────────── */
html {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
}

code, pre, kbd, samp {
    font-family: var(--font-code);
}

::selection {
    background-color: rgba(0, 212, 255, 0.25);
    color: var(--text-primary);
}

/* ── Component Classes ────────────────────────────── */

/* Glass card with subtle hover */
.glass-card {
    background-color: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.glass-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

/* Primary CTA with glow */
.btn-primary {
    background-color: #00d4ff;
    color: black;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}
.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

/* Ghost / secondary button */
.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8e8ed;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}
.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.04);
}

/* Code block */
.code-block {
    background-color: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1rem;
    font-family: var(--font-code);
    font-size: 0.875rem;
    color: #e8e8ed;
    overflow-x: auto;
}

/* Input field */
.input-field {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
    transition: all 0.2s ease;
}
.input-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.input-field:focus {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.2);
}

/* Skill chip / tag */
.skill-chip {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e8e8ed;
    transition: all 0.2s ease;
}
.skill-chip:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

/* Section heading */
.section-heading {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    font-family: var(--font-headline);
}

/* Muted label text */
.text-muted {
    color: var(--text-secondary);
}

/* ── AI Chat Markdown ────────────────────────────── */

/* Scoped prose styles for AI chat responses */
.chat-markdown {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}
.chat-markdown p {
    margin: 0.35em 0;
    line-height: 1.55;
}
.chat-markdown p:first-child {
    margin-top: 0;
}
.chat-markdown p:last-child {
    margin-bottom: 0;
}

.chat-markdown strong {
    color: #ffffff;
    font-weight: 600;
}

.chat-markdown em {
    color: #c8c8d4;
    font-style: italic;
}

.chat-markdown h1,
.chat-markdown h2,
.chat-markdown h3,
.chat-markdown h4 {
    font-family: var(--font-headline);
    color: #ffffff;
    font-weight: 700;
    margin: 0.6em 0 0.3em;
    line-height: 1.3;
}
.chat-markdown h1:first-child,
.chat-markdown h2:first-child,
.chat-markdown h3:first-child,
.chat-markdown h4:first-child {
    margin-top: 0;
}
.chat-markdown h1 { font-size: 1.1em; }
.chat-markdown h2 { font-size: 1.05em; }
.chat-markdown h3 { font-size: 1em; }
.chat-markdown h4 { font-size: 0.95em; }

.chat-markdown ul,
.chat-markdown ol {
    margin: 0.4em 0;
    padding-left: 1.4em;
}
.chat-markdown ul {
    list-style-type: disc;
}
.chat-markdown ol {
    list-style-type: decimal;
}
.chat-markdown li {
    margin: 0.15em 0;
    line-height: 1.5;
}
.chat-markdown li::marker {
    color: var(--accent-primary);
}

.chat-markdown code {
    font-family: var(--font-code);
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.25rem;
    padding: 0.1em 0.35em;
    font-size: 0.85em;
    color: var(--accent-primary);
}

.chat-markdown pre {
    margin: 0.5em 0;
    border-radius: 0.5rem;
    overflow-x: auto;
    max-width: 100%;
    background-color: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-markdown pre code {
    display: block;
    padding: 0.6em 0.8em;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.8em;
    line-height: 1.5;
}

.chat-markdown blockquote {
    margin: 0.4em 0;
    padding: 0.3em 0.75em;
    border-left: 3px solid var(--accent-primary);
    background-color: rgba(0, 212, 255, 0.05);
    border-radius: 0 0.25rem 0.25rem 0;
    color: var(--text-secondary);
}

.chat-markdown a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.chat-markdown a:hover {
    color: #33ddff;
}

.chat-markdown table {
    width: 100%;
    margin: 0.5em 0;
    border-collapse: collapse;
    font-size: 0.85em;
    display: block;
    overflow-x: auto;
}
.chat-markdown th,
.chat-markdown td {
    padding: 0.3em 0.5em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}
.chat-markdown th {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-weight: 600;
}

.chat-markdown hr {
    margin: 0.5em 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: block;
}
