:root {
    --background: #f7f7f5;
    --surface: #ffffff;
    --text: #171717;
    --muted: #6b6b6b;
    --border: #e5e5e5;
    --accent: #111111;

    --max-width: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);

    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.navbar {
    width: 100%;
    max-width: var(--max-width);

    margin: auto;
    padding: 24px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    font-weight: 400;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 28px;

    font-size: 14px;
}

.navbar nav a {
    transition: opacity 0.2s ease;
}

.navbar nav a:hover {
    opacity: 0.6;
}

.nav-button {
    padding: 10px 18px;

    background: var(--text);
    color: white;

    border-radius: 8px;
}

.hero {
    max-width: var(--max-width);

    margin: auto;
    padding: 100px 24px 120px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;

    align-items: center;
}

.hero-content {
    max-width: 580px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;

    color: var(--muted);

    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(48px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -4px;

    margin-bottom: 28px;
}

.hero h1 span {
    display: block;
    color: var(--muted);
}

.hero-description {
    max-width: 520px;

    font-size: 18px;
    color: var(--muted);

    margin-bottom: 34px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-button,
.secondary-button {
    display: inline-flex;

    padding: 13px 20px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.primary-button {
    background: var(--text);
    color: white;
}

.secondary-button {
    border: 1px solid var(--border);
    background: var(--surface);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.hero-preview {
    display: flex;
    justify-content: center;
}

.mock-resume {
    width: 360px;
    min-height: 470px;

    padding: 35px;

    background: white;

    border: 1px solid var(--border);

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.08);

    transform: rotate(2deg);
}

.mock-header {
    margin-bottom: 35px;
}

.mock-name {
    width: 55%;
    height: 18px;

    background: #171717;

    margin-bottom: 10px;
}

.mock-contact {
    width: 80%;
    height: 7px;

    background: #d7d7d7;
}

.mock-section {
    margin-bottom: 30px;
}

.mock-title {
    width: 35%;
    height: 8px;

    background: #171717;

    margin-bottom: 14px;
}

.mock-line {
    width: 80%;
    height: 6px;

    background: #e5e5e5;

    margin-bottom: 8px;
}

.mock-line.long {
    width: 100%;
}

.mock-line.short {
    width: 55%;
}

.features,
.how-it-works {
    max-width: var(--max-width);

    margin: auto;

    padding: 100px 24px;
}

.section-heading {
    max-width: 650px;

    margin-bottom: 55px;
}

.section-heading h2 {
    font-size: 42px;
    line-height: 1.05;

    letter-spacing: -2px;

    margin-bottom: 18px;
}

.section-heading > p:last-child {
    color: var(--muted);
}

.feature-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 16px;
}

.feature-card {
    padding: 28px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 12px;
}

.feature-icon {
    font-size: 24px;

    margin-bottom: 30px;
}

.feature-card h3 {
    font-size: 18px;

    margin-bottom: 10px;
}

.feature-card p {
    color: var(--muted);

    font-size: 14px;
}

.steps {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 30px;
}

.step {
    border-top: 1px solid var(--border);

    padding-top: 20px;
}

.step-number {
    display: block;

    font-size: 13px;
    color: var(--muted);

    margin-bottom: 35px;
}

.step h3 {
    font-size: 20px;

    margin-bottom: 10px;
}

.step p {
    color: var(--muted);

    font-size: 14px;
}

.cta {
    max-width: var(--max-width);

    margin: 50px auto 100px;

    padding: 55px;

    background: var(--text);
    color: white;

    border-radius: 16px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 30px;
}

.cta .eyebrow {
    color: #aaaaaa;
}

.cta h2 {
    font-size: 38px;
    line-height: 1;
}

.cta .primary-button {
    background: white;
    color: var(--text);

    flex-shrink: 0;
}

footer {
    padding: 30px 24px;

    text-align: center;

    color: var(--muted);

    font-size: 13px;

    border-top: 1px solid var(--border);
}

@media (max-width: 850px) {

    .navbar nav a:not(.nav-button) {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;

        padding-top: 70px;
    }

    .hero-preview {
        margin-top: 20px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .cta {
        margin-left: 24px;
        margin-right: 24px;

        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 550px) {

    .hero h1 {
        font-size: 48px;
        letter-spacing: -3px;
    }

    .mock-resume {
        width: 300px;
        min-height: 400px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .section-heading h2 {
        font-size: 34px;
    }
}

/* =========================
   GLOBAL THEME
========================= */

html.dark-mode {
    --background: #151515;
    --surface: #202020;
    --text: #f5f5f5;
    --muted: #a4a4a4;
    --border: #363636;
    --accent: #f5f5f5;
}

body {
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.theme-toggle {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-switch {
    width: 52px;
    height: 28px;
    flex: 0 0 52px;
}

.theme-switch-track {
    position: relative;
    width: 52px;
    height: 28px;
    display: block;
    border-radius: 999px;
    background: #eeeeee;
    border: 1px solid #cfcfcf;
    box-sizing: border-box;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.theme-switch-knob {
    position: absolute;
    top: 2px;
    left: 27px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    color: #171717;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: left 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.theme-switch-icon {
    display: block;
    transform: translateY(-0.5px);
}

html:not(.dark-mode) .theme-switch-track {
    background: #eeeeee;
    border-color: #cfcfcf;
}

html:not(.dark-mode) .theme-switch-knob {
    left: 27px;
    background: #ffffff;
    color: #171717;
}

html.dark-mode .theme-switch-track {
    background: #292929;
    border-color: #444444;
}

html.dark-mode .theme-switch-knob {
    left: 2px;
    background: #f1f1f1;
    color: #171717;
}

.theme-switch:hover,
.theme-switch:active {
    transform: none;
}

html.dark-mode .mock-resume {
    background: #242424;
    border-color: #3b3b3b;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

html.dark-mode .mock-name,
html.dark-mode .mock-title {
    background: #f2f2f2;
}

html.dark-mode .mock-contact {
    background: #666666;
}

html.dark-mode .mock-line {
    background: #4a4a4a;
}

html.dark-mode .nav-button {
    background: #f5f5f5;
    color: #171717;
}

html.dark-mode .primary-button {
    background: #f5f5f5;
    color: #171717;
}

html.dark-mode .secondary-button {
    background: var(--surface);
}

html.dark-mode .cta {
    background: #f5f5f5;
    color: #171717;
}

html.dark-mode .cta .eyebrow {
    color: #666666;
}

html.dark-mode .cta .primary-button {
    background: #171717;
    color: #f5f5f5;
}

html.dark-mode footer {
    border-color: var(--border);
}

@media (max-width: 850px) {
    .theme-toggle {
        min-height: 34px;
        padding: 7px 10px;
    }

    .theme-label {
        display: none;
    }
}


/* =========================
   ACCOUNT GREETING / USERNAME
========================= */
.account-greeting {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.welcome-message {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.display-name-edit {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.display-name-edit:hover {
    color: var(--text);
    background: var(--surface-2);
    border-color: var(--text);
}

.display-name-editor {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 5px 16px rgba(0,0,0,.08);
}

.display-name-editor[hidden],
.display-name-edit[hidden] {
    display: none !important;
}

.display-name-editor input {
    width: 145px;
    height: 30px;
    box-sizing: border-box;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    padding: 0 7px;
    font: inherit;
    font-size: 12px;
}

.display-name-save,
.display-name-cancel {
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
}

.display-name-save {
    border: 1px solid var(--text);
    background: var(--text);
    color: var(--background);
    padding: 0 9px;
}

.display-name-cancel {
    width: 30px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
}

@media (max-width: 700px) {
    .account-greeting {
        display: none;
    }
}
