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

:root {
    --resume-bg: #081d2c;
    --resume-surface: #112e42;
    --resume-border: rgba(201, 217, 232, 0.22);
    --resume-text: #f1f5f9;
    --resume-muted: #c9d9e8;
    --resume-accent: #0fbbff;
    --resume-action: #ff499e;
    --resume-error: #ffb4b4;
    --resume-success: #9ce8c5;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--resume-bg);
    color: var(--resume-text);
    font-family: "Jost", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

body.cv-page {
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

a {
    color: var(--resume-accent);
}

button,
input {
    font: inherit;
}

.resume-header {
    min-height: 72px;
    padding: 14px clamp(20px, 5vw, 72px);
    border-bottom: 1px solid var(--resume-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.resume-brand {
    color: var(--resume-text);
    font-size: 1.65rem;
    font-weight: 700;
    text-decoration: none;
}

.resume-brand span {
    color: var(--resume-accent);
}

.admin-main {
    width: min(100% - 32px, 560px);
    margin: 64px auto;
}

.admin-panel {
    padding: 28px;
    background: var(--resume-surface);
    border: 1px solid var(--resume-border);
    border-radius: 10px;
}

.admin-panel h1,
.cv-empty h1 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 4vw, 2rem);
    line-height: 1.2;
}

.intro {
    margin: 0 0 24px;
    color: var(--resume-muted);
}

.admin-form {
    display: grid;
    gap: 10px;
}

.admin-form label {
    margin-top: 6px;
    font-weight: 600;
}

.admin-form input[type="password"],
.admin-form input[type="file"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(201, 217, 232, 0.45);
    border-radius: 7px;
    background: #0b2435;
    color: var(--resume-text);
}

.admin-form input:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible {
    outline: 3px solid rgba(15, 187, 255, 0.38);
    outline-offset: 2px;
}

.primary-button,
.secondary-button,
.text-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    padding: 10px 18px;
    border: 1px solid var(--resume-action);
    background: var(--resume-action);
    color: #fff;
}

.admin-form .primary-button {
    width: 100%;
    margin-top: 12px;
}

.secondary-button,
.text-button {
    padding: 9px 14px;
    border: 1px solid var(--resume-border);
    background: transparent;
    color: var(--resume-text);
}

.text-button {
    min-height: 38px;
}

.notice {
    margin: 0 0 20px;
    padding: 11px 13px;
    border: 1px solid currentColor;
    border-radius: 7px;
}

.notice.error {
    color: var(--resume-error);
    background: rgba(140, 35, 35, 0.18);
}

.notice.success {
    color: var(--resume-success);
    background: rgba(24, 112, 72, 0.18);
}

.notice.progress {
    color: var(--resume-muted);
    background: rgba(15, 187, 255, 0.08);
}

.upload-form .notice {
    margin: 8px 0 0;
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.current-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--resume-border);
    background: #0b2435;
}

.current-file {
    margin: 0 0 22px;
    border-radius: 8px;
}

.current-file div {
    min-width: 0;
}

.current-file strong,
.current-file span {
    display: block;
}

.current-file strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-file span,
.field-help,
.empty-state,
.cv-empty p {
    color: var(--resume-muted);
}

.current-file span {
    margin-top: 2px;
    font-size: 0.9rem;
}

.empty-state {
    padding: 14px 16px;
    border: 1px dashed rgba(201, 217, 232, 0.38);
    border-radius: 8px;
}

.field-help {
    margin: 0;
    font-size: 0.9rem;
}

.upload-form {
    padding-top: 4px;
}

.cv-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cv-main {
    width: 100%;
    min-height: 0;
    margin: 0;
    display: grid;
}

.pdf-viewer {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

.cv-empty {
    max-width: 520px;
    margin: auto;
    padding: 28px;
    border: 1px solid var(--resume-border);
    background: var(--resume-surface);
    text-align: center;
}

.cv-empty .primary-button {
    margin-top: 10px;
}

@media (max-width: 640px) {
    .resume-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .cv-actions {
        width: 100%;
    }

    .cv-actions a {
        flex: 1;
    }

    .admin-main {
        margin: 32px auto;
    }

    .admin-panel {
        padding: 20px;
    }

}
