:root {
    --font-ui: "Plus Jakarta Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --space-1: 0.45rem;
    --space-2: 0.8rem;
    --space-3: 1.1rem;
    --space-4: 1.6rem;
    --space-5: 2.2rem;
    --control-height: 2.35rem;

    --bg: #f5f7fb;
    --bg-alt: #eef2fb;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: #ffffff;
    --text: #0f172a;
    --text-soft: #49566f;
    --line: rgba(15, 23, 42, 0.14);
    --brand: #1663ff;
    --brand-strong: #0d4dce;
    --accent: #0c91b3;
    --danger: #b52727;
    --chip-bg: rgba(22, 99, 255, 0.12);
    --chip-line: rgba(22, 99, 255, 0.24);
    --shadow-1: 0 12px 34px rgba(20, 34, 66, 0.12);
    --shadow-2: 0 22px 58px rgba(20, 34, 66, 0.2);
    color-scheme: light;
}

html[data-theme="dark"] {
    --bg: #070b16;
    --bg-alt: #0f1a2e;
    --surface: rgba(17, 27, 48, 0.72);
    --surface-strong: #121e35;
    --text: #edf3ff;
    --text-soft: #9db0d2;
    --line: rgba(166, 196, 255, 0.2);
    --brand: #76a3ff;
    --brand-strong: #94b7ff;
    --accent: #6ed7f0;
    --danger: #ff7f8b;
    --chip-bg: rgba(118, 163, 255, 0.16);
    --chip-line: rgba(148, 183, 255, 0.38);
    --shadow-1: 0 14px 38px rgba(0, 0, 0, 0.46);
    --shadow-2: 0 24px 64px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--text);
    font-family: var(--font-ui);
    line-height: 1.55;
    background:
        radial-gradient(1400px 680px at -12% -10%, rgba(91, 156, 255, 0.38) 0%, transparent 55%),
        radial-gradient(1100px 620px at 112% 4%, rgba(12, 145, 179, 0.26) 0%, transparent 54%),
        linear-gradient(155deg, var(--bg), var(--bg-alt));
    background-attachment: fixed;
}

h1,
h2,
h3 {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.05rem, 4.9vw, 3.75rem);
}

h2 {
    font-size: clamp(1.45rem, 2.8vw, 2.25rem);
}

h3 {
    font-size: 1.25rem;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-shell {
    min-height: 100vh;
    padding: 0 1.2rem 2.5rem;
}

.site-header {
    position: sticky;
    top: 1rem;
    z-index: 40;
    max-width: 1160px;
    margin: 1rem auto 0;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-1);
}

.brand {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text);
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 0.4rem;
    font-size: 0.95rem;
    gap: 0.9rem;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--control-height);
    padding: 0 0.8rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    line-height: 1;
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-link:hover {
    text-decoration: none;
    border-color: var(--line);
    background: var(--chip-bg);
    transform: translateY(-1px);
}

.nav-select {
    min-width: 7rem;
    width: auto;
    height: var(--control-height);
    margin: 0;
    padding: 0 2rem 0 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background-position: right 0.6rem center;
}

.theme-toggle {
    border: 1px solid var(--line);
    border-radius: 999px;
    height: var(--control-height);
    padding: 0 0.82rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-strong);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-1);
}

.container {
    max-width: 1160px;
    margin: 1.6rem auto 0;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-1);
    padding: clamp(1.2rem, 2.6vw, 1.8rem);
}

.hero {
    margin-bottom: 1.7rem;
    animation: fadeUp 520ms ease-out;
}

.hero h1 {
    max-width: 18ch;
    background: linear-gradient(120deg, var(--text) 0%, var(--brand) 44%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    max-width: 64ch;
    color: var(--text-soft);
    font-size: 1.04rem;
}

.cv-timeline-shell {
    margin-top: 1rem;
}

.cv-map-shell {
    margin-bottom: 1.35rem;
}

.cv-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.95rem;
}

.cv-legend-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.28rem 0.72rem;
    border: 1px solid var(--chip-line);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--surface-strong);
}

.cv-legend-chip--full-time,
.cv-map-bar--full-time {
    --cv-bar-start: #1663ff;
    --cv-bar-end: #4ba3ff;
    --cv-bar-glow: rgba(22, 99, 255, 0.18);
}

.cv-legend-chip--part-time,
.cv-map-bar--part-time {
    --cv-bar-start: #00a77f;
    --cv-bar-end: #36d7a4;
    --cv-bar-glow: rgba(0, 167, 127, 0.18);
}

.cv-legend-chip--freelance,
.cv-map-bar--freelance {
    --cv-bar-start: #d78c18;
    --cv-bar-end: #ffd36f;
    --cv-bar-glow: rgba(215, 140, 24, 0.18);
}

.cv-legend-chip--contract,
.cv-map-bar--contract {
    --cv-bar-start: #884dff;
    --cv-bar-end: #b78cff;
    --cv-bar-glow: rgba(136, 77, 255, 0.18);
}

.cv-legend-chip--internship,
.cv-map-bar--internship {
    --cv-bar-start: #ff8f1f;
    --cv-bar-end: #ffc14d;
    --cv-bar-glow: rgba(255, 143, 31, 0.18);
}

.cv-legend-chip--education,
.cv-map-bar--education {
    --cv-bar-start: #0d8bcb;
    --cv-bar-end: #6bd3ff;
    --cv-bar-glow: rgba(13, 139, 203, 0.18);
}

.cv-legend-chip--volunteer,
.cv-map-bar--volunteer {
    --cv-bar-start: #8fbb2e;
    --cv-bar-end: #d5ef66;
    --cv-bar-glow: rgba(143, 187, 46, 0.18);
}

.cv-legend-chip--other,
.cv-map-bar--other {
    --cv-bar-start: #6f7b8d;
    --cv-bar-end: #a7b5c7;
    --cv-bar-glow: rgba(111, 123, 141, 0.18);
}

.cv-legend-chip {
    border-color: color-mix(in srgb, var(--cv-bar-start) 32%, transparent);
    background: color-mix(in srgb, var(--cv-bar-glow) 72%, var(--surface-strong));
}

.cv-map {
    display: none;
    position: relative;
}

.cv-map-current {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1.1rem;
    transform: translateX(-0.55rem);
    z-index: 3;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
}

.cv-map-current::before {
    content: "";
    position: absolute;
    top: 0.5rem;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg, rgba(12, 145, 179, 0.92), rgba(22, 99, 255, 0.5));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
    transform: translateX(-50%);
}

.cv-map-current::after {
    content: "";
    position: absolute;
    top: 0.3rem;
    left: 50%;
    width: 0.72rem;
    height: 0.72rem;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: var(--accent);
    transform: translateX(-50%);
    box-shadow: 0 0 0 0.22rem rgba(12, 145, 179, 0.18);
}

.cv-map-current-label {
    position: absolute;
    top: -0.15rem;
    left: calc(50% + 0.7rem);
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(12, 145, 179, 0.24);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: var(--shadow-1);
}

.cv-map-current.is-edge .cv-map-current-label {
    left: auto;
    right: calc(50% + 0.7rem);
}

.cv-map-current.is-dragging {
    cursor: grabbing;
}

.cv-map-current:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 72%, white);
    outline-offset: 4px;
}

body.is-dragging-cv-needle {
    -webkit-user-select: none;
    user-select: none;
}

.cv-map-scale {
    position: relative;
    height: 2rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.cv-map-marker {
    position: absolute;
    bottom: -0.65rem;
    transform: translateX(-50%);
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.cv-map-marker.is-first {
    transform: translateX(0);
}

.cv-map-marker.is-last {
    transform: translateX(-100%);
}

.cv-map-marker.is-first.is-last {
    transform: translateX(0);
}

.cv-map-marker::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1.15rem;
    width: 1px;
    height: calc(100% + 0.55rem);
    background: linear-gradient(180deg, rgba(22, 99, 255, 0.28), transparent);
    transform: translateX(-50%);
}

.cv-map-lanes {
    display: grid;
    gap: 0.8rem;
}

.cv-map-lane {
    position: relative;
    min-height: 4.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
        linear-gradient(90deg, rgba(22, 99, 255, 0.03), rgba(12, 145, 179, 0.03)),
        var(--surface-strong);
    overflow: hidden;
}

.cv-map-lane::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
    background-size: calc(var(--cv-month-unit) * 12) 100%;
    pointer-events: none;
}

.cv-map-bar {
    position: absolute;
    top: 0.55rem;
    bottom: 0.55rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--cv-bar-start) 50%, transparent);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cv-bar-start), var(--cv-bar-end));
    box-shadow: 0 10px 24px var(--cv-bar-glow);
    color: #f9fbff;
    overflow: hidden;
}

.cv-map-bar.is-current {
    box-shadow:
        0 10px 24px var(--cv-bar-glow),
        0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}

.cv-map-bar-title,
.cv-map-bar-role {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-map-bar-title {
    font-size: 0.82rem;
    font-weight: 800;
}

.cv-map-bar-role {
    font-size: 0.72rem;
    opacity: 0.88;
}

.cv-timeline-list {
    position: relative;
    display: grid;
    gap: 1rem;
    padding-left: 1.25rem;
}

.cv-timeline-list::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    left: 0.38rem;
    width: 1px;
    background: linear-gradient(180deg, rgba(22, 99, 255, 0.45), rgba(12, 145, 179, 0.18));
}

.cv-entry {
    position: relative;
    padding: 1rem 1rem 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-strong);
}

.cv-entry::before {
    content: "";
    position: absolute;
    top: 1.2rem;
    left: -1.25rem;
    width: 0.8rem;
    height: 0.8rem;
    border: 2px solid rgba(22, 99, 255, 0.28);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 0 0 0.2rem rgba(22, 99, 255, 0.08);
}

.cv-entry-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cv-entry-category {
    margin: 0 0 0.4rem;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.cv-entry-role {
    margin: 0.1rem 0 0;
    color: var(--text-soft);
    font-weight: 600;
}

.cv-entry-range {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.cv-entry-points {
    margin: 0.85rem 0 0;
    padding-left: 1.1rem;
    color: var(--text-soft);
}

.cv-entry-points li + li {
    margin-top: 0.35rem;
}

.cv-experience-layout {
    display: block;
}

.cv-map-shell {
    display: none;
    -webkit-user-select: none;
    user-select: none;
}

.cv-map-toolbar {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.cv-map-current-kicker,
.cv-window-kicker {
    margin: 0 0 0.2rem;
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cv-map-current-date,
.cv-window-range {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.cv-map-viewport {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(22, 99, 255, 0.04), rgba(12, 145, 179, 0.05)),
        var(--surface-strong);
    box-shadow: inset 0 0 0 1px rgba(22, 99, 255, 0.05);
}

.cv-map-canvas {
    position: relative;
    width: 100%;
    min-width: calc(var(--cv-total-months) * var(--cv-month-unit));
}

.cv-experience-layout .cv-map-lanes {
    position: relative;
    display: grid;
    gap: 0.8rem;
}

.cv-experience-layout .cv-map-lane {
    overflow: hidden;
}

.cv-experience-layout .cv-map-bar {
    cursor: default;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.cv-experience-layout .cv-map-bar.is-active {
    transform: scale(1.015);
    filter: saturate(1.06);
    box-shadow:
        0 12px 24px var(--cv-bar-glow),
        0 0 0 1px rgba(255, 255, 255, 0.38) inset;
}

.cv-experience-layout .cv-map-bar.is-selected {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 18px 34px var(--cv-bar-glow),
        0 0 0 2px rgba(255, 255, 255, 0.62) inset,
        0 0 0 3px color-mix(in srgb, var(--brand) 28%, transparent);
}

.cv-experience-layout .cv-map-bar:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 72%, white);
    outline-offset: 2px;
}

.cv-experience-layout .cv-map-bar-title {
    display: block;
    width: 100%;
    max-height: 100%;
    font-size: 0.86rem;
    line-height: 1.05;
    letter-spacing: 0.01em;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}

.cv-experience-layout .cv-map-bar-role {
    display: none;
}

.cv-active-rail {
    margin-top: 1rem;
}

.cv-active-head {
    display: none;
}

.cv-active-empty {
    display: none;
    margin: 0 0 0.85rem;
}

.cv-active-empty:not([hidden]) {
    display: block;
}

.cv-entry[hidden] {
    display: none !important;
}

.cv-entry.is-active {
    animation: fadeUp 220ms ease-out;
    border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
    background:
        linear-gradient(180deg, rgba(22, 99, 255, 0.065), rgba(12, 145, 179, 0.03)),
        var(--surface-strong);
    box-shadow:
        0 16px 30px rgba(15, 23, 42, 0.08),
        inset 0 0 0 1px rgba(22, 99, 255, 0.08);
    transform: none;
}

.cv-entry.is-selected {
    border-color: color-mix(in srgb, var(--brand) 76%, white 10%);
    background:
        linear-gradient(90deg, rgba(22, 99, 255, 0.16), rgba(12, 145, 179, 0.08) 42%, transparent 100%),
        var(--surface-strong);
    box-shadow:
        0 24px 40px rgba(15, 23, 42, 0.14),
        0 0 0 2px rgba(22, 99, 255, 0.18),
        inset 0 0 0 1px rgba(22, 99, 255, 0.12);
    transform: none;
}

.cv-entry.is-selected::before {
    border-color: rgba(22, 99, 255, 0.7);
    box-shadow: 0 0 0 0.38rem rgba(22, 99, 255, 0.18);
}

.cv-entry.is-selected::after {
    content: "";
    position: absolute;
    top: 0.72rem;
    bottom: 0.72rem;
    left: 0.42rem;
    width: 0.26rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand), var(--accent));
    box-shadow: 0 0 0 0.16rem rgba(22, 99, 255, 0.1);
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-head {
    margin: 1.2rem 0 1rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-1);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
    border-color: var(--chip-line);
}

.stack {
    margin: 0.9rem 0 0.2rem;
    color: var(--text-soft);
}

.links {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.chip {
    display: inline-block;
    border: 1px solid var(--chip-line);
    border-radius: 999px;
    padding: 0.31rem 0.74rem;
    font-size: 0.81rem;
    color: var(--brand-strong);
    background: var(--chip-bg);
}

.chip:hover {
    text-decoration: none;
    filter: brightness(1.08);
}

.empty-state {
    color: var(--text-soft);
}

.admin-head {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}

.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: clamp(1.1rem, 2vw, 1.5rem);
}

.admin-dashboard .admin-head {
    margin-bottom: 0;
}

.actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.table th,
.table td {
    padding: 0.82rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.table th {
    background: var(--chip-bg);
    color: var(--text-soft);
    font-size: 0.83rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sortable-row {
    transition: background-color 180ms ease, transform 180ms ease;
}

.sortable-row.dragging {
    opacity: 0.7;
}

.drag-handle {
    margin-right: 0.55rem;
    padding: 0.1rem 0.34rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 700;
    color: var(--text-soft);
    background: var(--surface-strong);
    cursor: grab;
    user-select: none;
}

.order-value {
    font-variant-numeric: tabular-nums;
}

.row-visible {
    background: linear-gradient(90deg, rgba(44, 181, 113, 0.16), transparent 38%);
}

.visible-pill {
    display: inline-block;
    border: 1px solid rgba(44, 181, 113, 0.45);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #117349;
    background: rgba(44, 181, 113, 0.16);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html[data-theme="dark"] .row-visible {
    background: linear-gradient(90deg, rgba(70, 205, 140, 0.2), transparent 40%);
}

html[data-theme="dark"] .visible-pill {
    color: #9dffcf;
    border-color: rgba(124, 255, 189, 0.45);
    background: rgba(44, 181, 113, 0.24);
}

.narrow {
    max-width: 560px;
}

.form-shell {
    max-width: 760px;
}

.admin-wide {
    max-width: 100%;
}

.admin-surface {
    --admin-line: rgba(181, 39, 39, 0.34);
    --admin-strong-line: rgba(181, 39, 39, 0.6);
    --admin-fill: rgba(181, 39, 39, 0.1);
    --admin-text: #8a2323;
    --admin-outline: rgba(181, 39, 39, 0.18);
    position: relative;
    padding-top: clamp(2.7rem, 4.2vw, 3.25rem);
    border-color: var(--admin-line);
    background:
        linear-gradient(180deg, rgba(181, 39, 39, 0.08), rgba(181, 39, 39, 0) 28%),
        var(--surface);
    box-shadow:
        inset 0 0 0 1px rgba(181, 39, 39, 0.12),
        var(--shadow-1);
}

.admin-surface::before {
    content: "";
    position: absolute;
    top: clamp(2rem, 3.2vw, 2.35rem);
    left: 1.2rem;
    right: 1.2rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(181, 39, 39, 0.95), rgba(236, 128, 128, 0.18));
    pointer-events: none;
}

.admin-surface .chip,
.admin-surface .drag-handle,
.admin-surface .code-block,
.admin-surface .locale-card,
.admin-surface .locale-tab-button,
.admin-surface .locale-code,
.admin-surface input:not([type="checkbox"]),
.admin-surface select,
.admin-surface textarea {
    border-color: var(--admin-line);
}

.admin-surface .chip {
    color: var(--admin-text);
    background: var(--admin-fill);
}

.admin-surface .locale-tab-button,
.admin-surface .locale-code {
    color: var(--admin-text);
    background: var(--surface-strong);
}

.admin-surface .locale-tab-button.is-active,
.admin-surface .locale-code {
    background: var(--admin-fill);
}

.admin-surface .admin-frame-label {
    position: absolute;
    top: 0.95rem;
    left: clamp(1.2rem, 2.3vw, 1.7rem);
    margin: 0;
    line-height: 1;
    z-index: 1;
}

.admin-surface h1,
.admin-surface h2 {
    margin-bottom: 1rem;
}

.admin-surface .table th,
.admin-surface .table td {
    border-bottom-color: rgba(181, 39, 39, 0.18);
}

.admin-surface .table th {
    background: var(--admin-fill);
    color: var(--admin-text);
}

.admin-surface .drag-handle,
.admin-surface .button-link {
    color: var(--admin-text);
}

.admin-surface input:not([type="checkbox"]):focus,
.admin-surface .locale-tab-button:focus-visible,
.admin-surface select:focus,
.admin-surface textarea:focus {
    border-color: var(--admin-strong-line);
    outline: 3px solid var(--admin-outline);
}

.admin-surface .button {
    margin-top: 1.25rem;
    background: linear-gradient(135deg, #a61f1f, #cf4a4a);
    box-shadow: 0 10px 24px rgba(130, 24, 24, 0.32);
}

.admin-surface .checkbox-row input[type="checkbox"] {
    accent-color: #c73737;
}

html[data-theme="dark"] .admin-surface {
    --admin-line: rgba(255, 127, 139, 0.38);
    --admin-strong-line: rgba(255, 161, 170, 0.72);
    --admin-fill: rgba(255, 127, 139, 0.16);
    --admin-text: #ffb8c0;
    --admin-outline: rgba(255, 127, 139, 0.24);
    background:
        linear-gradient(180deg, rgba(255, 127, 139, 0.12), rgba(255, 127, 139, 0) 30%),
        var(--surface);
    box-shadow:
        inset 0 0 0 1px rgba(255, 127, 139, 0.16),
        var(--shadow-1);
}

label {
    display: block;
    margin-top: 0.78rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

input:not([type="checkbox"]),
select,
textarea {
    width: 100%;
    margin-top: 0.42rem;
    padding: 0.7rem 0.74rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
}

input:not([type="checkbox"]):focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(22, 99, 255, 0.24);
    outline-offset: 1px;
}

.button {
    margin-top: 1rem;
    border: 0;
    border-radius: 12px;
    padding: 0.67rem 1rem;
    font: inherit;
    font-weight: 700;
    color: #f9fbff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 10px 24px rgba(23, 70, 175, 0.35);
    cursor: pointer;
}

.button:hover {
    filter: brightness(1.08);
    text-decoration: none;
}

.button-link {
    border: 0;
    background: transparent;
    color: var(--brand);
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.nav-link.button-link {
    color: var(--text);
}

.inline-form {
    display: inline-flex;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

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

.flash-list {
    margin-bottom: 0.8rem;
}

.flash {
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.8rem;
    border: 1px solid transparent;
}

.flash-error {
    color: #951d25;
    background: rgba(252, 222, 225, 0.75);
    border-color: rgba(217, 89, 104, 0.4);
}

.flash-success {
    color: #0f5a3a;
    background: rgba(209, 244, 223, 0.75);
    border-color: rgba(60, 169, 112, 0.38);
}

.flash-info {
    color: #174f7c;
    background: rgba(212, 233, 250, 0.75);
    border-color: rgba(76, 145, 201, 0.35);
}

html[data-theme="dark"] .flash-error {
    color: #ffd6df;
    background: rgba(122, 24, 49, 0.5);
    border-color: rgba(247, 130, 156, 0.42);
}

html[data-theme="dark"] .flash-success {
    color: #cbffe1;
    background: rgba(17, 87, 59, 0.52);
    border-color: rgba(87, 230, 161, 0.4);
}

html[data-theme="dark"] .flash-info {
    color: #cde9ff;
    background: rgba(18, 62, 112, 0.5);
    border-color: rgba(126, 181, 238, 0.42);
}

.field-error {
    margin: 0.26rem 0 0;
    color: var(--danger);
    font-size: 0.86rem;
}

.date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.locale-tabs {
    display: grid;
    gap: 1rem;
}

.locale-tab-list {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.locale-tab-button {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.7rem;
    padding: 0.58rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--text-soft);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.locale-tab-button:hover {
    transform: translateY(-1px);
}

.locale-tab-button:focus-visible {
    border-color: var(--brand);
    outline: 3px solid rgba(22, 99, 255, 0.24);
    outline-offset: 1px;
}

.locale-tab-button.is-active {
    border-color: var(--chip-line);
    background: var(--chip-bg);
    color: var(--brand-strong);
    box-shadow: inset 0 0 0 1px rgba(22, 99, 255, 0.12);
}

.locale-tab-panels {
    display: grid;
}

.locale-card {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    min-width: 0;
}

.locale-tab-panel + .locale-tab-panel {
    margin-top: 1rem;
}

[data-tabs-ready] .locale-tab-panel + .locale-tab-panel {
    margin-top: 0;
}

.locale-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.2rem;
}

.locale-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.locale-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 1.7rem;
    padding: 0 0.55rem;
    border: 1px solid var(--chip-line);
    border-radius: 999px;
    color: var(--brand-strong);
    background: var(--chip-bg);
    font-family: var(--font-ui);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.code-block {
    margin: 0.3rem 0;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    color: var(--text-soft);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.84rem;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--text-soft);
}

.checkbox-row input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--brand);
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 760px) {
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.project-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 0.95rem;
    align-items: center;
    height: 100%;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-1);
    text-decoration: none;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.project-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-2);
    border-color: var(--brand);
    text-decoration: none;
}

.project-card-preview {
    width: 132px;
    height: 132px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(140, 167, 228, 0.18);
}

.project-card-preview img,
.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--text-soft);
    background:
        linear-gradient(145deg, rgba(22, 99, 255, 0.19), rgba(12, 145, 179, 0.19)),
        var(--surface-strong);
}

.project-card-copy h3 {
    margin-bottom: 0.35rem;
    color: var(--text);
}

.project-card-copy p {
    margin: 0;
}

.project-card-copy .muted {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-detail {
    max-width: 920px;
}

.project-hero {
    margin: 1.1rem 0 1.2rem;
    width: 100%;
    height: clamp(220px, 42vw, 420px);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
}

.detail-placeholder {
    font-size: clamp(3rem, 11vw, 6rem);
}

.project-body {
    margin-top: 0.8rem;
}

.project-body h2 {
    margin-bottom: 0.4rem;
}

.project-details {
    line-height: 1.7;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .site-header {
        gap: 0.65rem;
        flex-direction: column;
        align-items: flex-start;
        top: 0.5rem;
        margin-top: 0.65rem;
    }

    .top-nav {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        margin-left: 0;
        gap: 0.7rem;
    }

    .nav-left,
    .nav-right {
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .nav-link,
    .theme-toggle {
        height: 2.15rem;
        padding-inline: 0.7rem;
    }

    .nav-select {
        min-width: 6rem;
        height: 2.15rem;
    }

    .admin-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero h1 {
        max-width: 100%;
    }

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

    .cv-map {
        display: none;
    }

    .cv-entry-range {
        white-space: normal;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-card-preview {
        width: 100%;
        height: 200px;
    }
}

@media (min-width: 900px) {
    .cv-experience-layout {
        display: block;
    }

    .cv-map-shell {
        display: block;
    }

    .cv-map {
        display: block;
    }

    .cv-map-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .cv-active-rail {
        position: static;
        margin-top: 1.1rem;
        max-height: none;
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
    }

    .cv-active-head {
        display: block;
        margin-bottom: 0.9rem;
    }

    .cv-active-rail .cv-timeline-list {
        grid-auto-flow: column;
        grid-auto-columns: minmax(18rem, 22rem);
        align-items: stretch;
        padding-left: 0;
        padding-bottom: 0.4rem;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .cv-active-rail .cv-timeline-list::before {
        display: none;
    }

    .cv-active-rail .cv-entry {
        min-height: 100%;
        padding-left: 1rem;
        transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
    }

    .cv-active-rail .cv-entry::before {
        display: none;
    }
}
