:root {
    color-scheme: dark;
    --bg: #0b1020;
    --bg-soft: #111936;
    --card: rgba(18, 25, 52, 0.78);
    --card-strong: rgba(21, 32, 67, 0.92);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f4f7fb;
    --muted: #aab4c8;
    --accent: #6ae6ff;
    --accent-2: #9d7cff;
    --accent-3: #35f2a7;
    --danger: #ff6b8a;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 28px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(106, 230, 255, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(157, 124, 255, 0.20), transparent 34rem),
        linear-gradient(135deg, #090d1b 0%, #111a36 50%, #0c1328 100%);
    overflow-x: hidden;
}

a {
    color: inherit;
}

button, input {
    font: inherit;
}

.ambient {
    position: fixed;
    inset: auto;
    width: 32rem;
    height: 32rem;
    border-radius: 999px;
    filter: blur(32px);
    opacity: 0.28;
    pointer-events: none;
    z-index: 0;
}

.ambient-one {
    left: -12rem;
    top: 8rem;
    background: #6ae6ff;
}

.ambient-two {
    right: -14rem;
    bottom: 4rem;
    background: #9d7cff;
}

.page {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.auth-shell {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
}

.glass-card {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.auth-card {
    width: min(520px, 100%);
    padding: 34px;
    border-radius: var(--radius);
}

.soft-enter {
    animation: soft-enter 0.45s ease both;
}

@keyframes soft-enter {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.badge, .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.badge {
    padding: 8px 12px;
    border: 1px solid rgba(106, 230, 255, 0.28);
    border-radius: 999px;
    background: rgba(106, 230, 255, 0.08);
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(34px, 6vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.06em;
    margin-bottom: 18px;
}

.auth-card h1 {
    font-size: clamp(34px, 5vw, 54px);
}

h2 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

h3 {
    font-size: 20px;
    line-height: 1.2;
}

.muted {
    color: var(--muted);
}

.form {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.field-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.input {
    width: 100%;
    min-height: 50px;
    padding: 13px 15px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input:focus {
    border-color: rgba(106, 230, 255, 0.72);
    box-shadow: 0 0 0 4px rgba(106, 230, 255, 0.12);
    background: rgba(255, 255, 255, 0.10);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-primary {
    color: #07101e;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn.small {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 13px;
}

.full {
    width: 100%;
}

.auth-links, .button-row, .hero-actions, .table-actions, .panel-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.auth-links {
    justify-content: space-between;
    margin-top: 20px;
    color: var(--muted);
    font-size: 14px;
}

.flash-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 50;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 36px));
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--card-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.flash-error {
    border-color: rgba(255, 107, 138, 0.4);
}

.flash-success {
    border-color: rgba(53, 242, 167, 0.4);
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
}

.topbar > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent-3);
    box-shadow: 0 0 0 6px rgba(53, 242, 167, 0.12);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: clamp(28px, 5vw, 56px);
    border-radius: calc(var(--radius) + 8px);
}

.headline {
    font-size: clamp(20px, 2.6vw, 34px);
    color: var(--accent);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.hero-summary {
    max-width: 760px;
    color: #dce6f8;
    font-size: 18px;
    line-height: 1.72;
}

.hero-actions {
    margin-top: 28px;
}

.contact-card {
    align-self: stretch;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.avatar {
    width: 154px;
    height: 188px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    border-radius: 999px;
    overflow: hidden;
    color: #07101e;
    background:
        linear-gradient(135deg, rgba(106, 230, 255, 0.22), rgba(157, 124, 255, 0.22)),
        rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(106, 230, 255, 0.35);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.30),
        0 0 0 8px rgba(255, 255, 255, 0.035);
    font-size: 32px;
    font-weight: 1000;
    letter-spacing: -0.08em;
}

.profile-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 49% 35%;
    filter: saturate(1.04) contrast(1.03);
}

dl {
    display: grid;
    gap: 16px;
    margin: 0;
}

dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

dd {
    margin: 4px 0 0;
    line-height: 1.45;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.fact-card {
    padding: 24px;
    border-radius: 24px;
}

.fact-card strong {
    display: block;
    color: var(--accent);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.fact-card span {
    color: var(--muted);
    font-weight: 700;
}

.section {
    margin-top: 18px;
    padding: clamp(24px, 4vw, 38px);
    border-radius: var(--radius);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.compact-heading {
    margin-bottom: 18px;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.focus-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    line-height: 1.5;
}

.focus-item span {
    color: var(--accent-3);
    font-weight: 1000;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    padding: 24px;
    border-radius: 24px;
}

.project-card p {
    color: var(--muted);
    line-height: 1.65;
}

.tag-row, .skill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span, .skill-cloud span {
    padding: 8px 10px;
    border-radius: 999px;
    color: #dce6f8;
    background: rgba(106, 230, 255, 0.10);
    border: 1px solid rgba(106, 230, 255, 0.16);
    font-size: 12px;
    font-weight: 800;
}

.timeline {
    position: relative;
    display: grid;
    gap: 18px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(var(--accent), rgba(255, 255, 255, 0.06));
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 16px;
}

.timeline-marker {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    margin-top: 5px;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(106, 230, 255, 0.12);
}

.timeline-body {
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.timeline-body p {
    color: var(--muted);
    line-height: 1.6;
}

.period {
    color: var(--accent) !important;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.company {
    color: #dce6f8 !important;
    font-weight: 800;
}

.split-section {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
}

.clean-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.6;
}

.subhead {
    margin: 28px 0 12px;
}

.language-line {
    margin-top: 20px;
    color: var(--muted);
}

.resume-footer {
    margin-top: 22px;
    color: var(--muted);
    text-align: center;
}

.admin-main {
    width: min(1320px, calc(100% - 32px));
}

.admin-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 28px;
    border-radius: var(--radius);
    margin-bottom: 18px;
}

.admin-header h1 {
    font-size: clamp(32px, 4vw, 56px);
}

.admin-panel {
    margin-top: 18px;
    padding: 24px;
    border-radius: var(--radius);
}

.admin-form {
    display: grid;
    grid-template-columns: 1.3fr 0.6fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.panel-title-row {
    justify-content: space-between;
    margin-bottom: 12px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.admin-table th, .admin-table td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    vertical-align: top;
    text-align: left;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status.ok {
    color: #072015;
    background: var(--accent-3);
}

.status.info {
    color: #07101e;
    background: var(--accent);
}

.status.off {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.link-btn {
    border: 0;
    padding: 0;
    color: var(--accent);
    background: transparent;
    cursor: pointer;
    font-weight: 900;
}

.link-btn.danger {
    color: var(--danger);
}

.ua-cell {
    max-width: 420px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 980px) {
    .hero, .split-section {
        grid-template-columns: 1fr;
    }

    .facts-grid, .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .page {
        width: min(100% - 20px, 1180px);
        padding: 18px 0 38px;
    }

    .auth-card, .hero, .section, .admin-panel, .admin-header {
        padding: 22px;
        border-radius: 22px;
    }

    .topbar, .admin-header, .panel-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .facts-grid, .project-grid, .focus-grid, .admin-form {
        grid-template-columns: 1fr;
    }

    .hero-actions, .button-row, .auth-links {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn, .button-row .btn, .button-row form, .auth-links a {
        width: 100%;
    }

    h1 {
        letter-spacing: -0.04em;
    }
}

@media (max-width: 680px) {
    .avatar {
        width: 132px;
        height: 162px;
        margin-bottom: 18px;
        border-width: 2px;
    }

    .contact-card {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .avatar {
        width: 118px;
        height: 146px;
    }
}

