:root {
  --bg: #0c0c0e;
  --panel: #151518;
  --panel-2: #1b1b1f;
  --panel-3: #232329;
  --line: #2a2a31;
  --line-2: #393941;
  --text: #ececef;
  --muted: #a0a0aa;
  --dim: #6f6f7a;
  --paper: #f3f0e9;
  --rail: 76px;
  --pad: 32px;
  --r: 12px;
  color-scheme: dark;
  --ab-fg: var(--text);
  --ab-muted: var(--muted);
  --ab-accent: var(--paper);
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- rail */
.rail { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 16px; background: var(--bg); border-right: 1px solid #18181c; }
.rail-item { all: unset; box-sizing: border-box; width: 64px; display: grid; justify-items: center; gap: 4px; padding: 9px 0 7px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 500; cursor: pointer; text-align: center; }
.rail-item svg { width: 22px; height: 22px; }
.rail-item:hover { color: var(--text); background: var(--panel); }
.rail-item[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.rail-item:focus-visible { outline: 2px solid var(--paper); }
.rail-gap { flex: 1; }
.rail-me .me-name { font-size: 10px; line-height: 1.2; max-width: 60px; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, #4a4a52, #2a2a30); color: #f1f1f4; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }

/* ---------- phone top bar */
.topbar { display: none; }

/* ---------- main */
.main { margin-left: var(--rail); padding: 0 var(--pad) 64px; min-height: 100vh; min-width: 0; }

/* ---------- composer */
.composer { position: sticky; top: 0; z-index: 10; padding: 18px 0 12px; background: var(--bg); }
.composer::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 18px; background: linear-gradient(var(--bg), rgba(12, 12, 14, 0)); pointer-events: none; }
.bar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); max-width: 1100px; }
.bar:focus-within { border-color: var(--line-2); background: var(--panel-2); }
.bar-icon { width: 20px; height: 20px; color: var(--dim); flex: none; }
.bar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 15px/1 Inter, ui-sans-serif, system-ui, sans-serif; caret-color: var(--paper); }
.bar input::placeholder { color: var(--dim); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; flex: none; }
.chip svg { width: 16px; height: 16px; }
button.chip { cursor: pointer; }
button.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip-ar { font-variant-numeric: tabular-nums; min-width: 52px; justify-content: center; }
.go { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 11px; background: var(--paper); color: #141416; font-weight: 600; font-size: 14px; cursor: pointer; flex: none; }
.go svg { display: none; width: 18px; height: 18px; stroke-width: 2.2; }
.go:hover { background: #fff; }
.go:active { transform: translateY(1px); }
.suggest { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; max-width: 1100px; mask-image: linear-gradient(90deg, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); }
.suggest::-webkit-scrollbar { display: none; }
.sug { all: unset; box-sizing: border-box; flex: none; height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border-radius: 15px; border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.sug:hover { color: var(--text); border-color: var(--line-2); background: var(--panel); }
.sug:focus-visible { outline: 2px solid var(--paper); }
.sug svg { width: 14px; height: 14px; }
.sug-more { padding: 0 9px; }

/* ---------- views */
.view-head { display: flex; align-items: center; gap: 18px; margin: 14px 0 16px; }
.view-head h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.tabs { display: flex; gap: 4px; }
.tab { all: unset; padding: 5px 11px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--panel-2); color: var(--text); }
.tab:focus-visible { outline: 2px solid var(--paper); }

/* ---------- the wall */
.wall { display: flex; gap: 16px; align-items: flex-start; }
.col { flex: 1; min-width: 0; display: grid; gap: 16px; }
.card { min-width: 0; }
.card-pic { all: unset; display: block; width: 100%; border-radius: 10px; overflow: hidden; background: var(--panel); cursor: zoom-in; position: relative; }
.card-pic img { display: block; width: 100%; height: auto; opacity: 0; transition: opacity .5s ease, transform .5s ease; }
.card-pic img.is-in { opacity: 1; }
.card-pic:hover img { transform: scale(1.012); }
.card-pic:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.card-frame { position: relative; }
.card-acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transform: translateY(-3px); transition: opacity .18s, transform .18s; pointer-events: none; }
.card-act { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(14, 14, 16, .78); color: #f2f2f4; font-size: 12px; font-weight: 500; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card-act:hover { background: rgba(30, 30, 34, .95); }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-acts, .card:focus-within .card-acts { opacity: 1; transform: none; pointer-events: auto; }
}
.card-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 44px 12px 10px; border-radius: 0 0 10px 10px; background: linear-gradient(rgba(8, 8, 10, 0), rgba(8, 8, 10, .82) 62%); opacity: 0; transition: opacity .18s; pointer-events: none; }
.card-prompt { margin: 0 0 4px; color: #f2f2f5; font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: 0; display: flex; gap: 8px; align-items: baseline; color: #a8a8b2; font-size: 12px; min-width: 0; }
.card-meta b { color: #d6d6dc; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; letter-spacing: .06em; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-info, .card:focus-within .card-info { opacity: 1; }
}
@media (hover: none), (pointer: coarse) { .card-info { display: none; } }

/* ---------- create: jobs */
.feed { display: grid; gap: 34px; padding-top: 18px; }
.empty { padding: 60px 0; color: var(--dim); }
.empty p { margin: 0; }
.job { display: grid; grid-template-columns: minmax(0, 860px) minmax(200px, 300px); gap: 26px; align-items: start; }
.job[data-ar="2:3"] { grid-template-columns: minmax(0, 860px) minmax(200px, 300px); }
.job[data-ar="2:3"] .job-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.job[data-ar="2:3"] .cell figcaption { flex-wrap: wrap; gap: 6px; }
.job[data-ar="2:3"] .cell-name { flex-basis: 100%; }
.job-head { position: sticky; top: 120px; padding-top: 2px; }
.job-prompt { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.job-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.job-chips .chip { height: 26px; font-size: 12px; padding: 0 9px; }
.job-status { margin: 0; color: var(--text); font-size: 13px; min-height: 1.45em; }
.job-status.is-busy { color: var(--muted); }
.job-status.is-busy::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--muted); vertical-align: middle; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cell { margin: 0; min-width: 0; }
.cell-pic { all: unset; display: block; width: 100%; aspect-ratio: 16 / 9; position: relative; border-radius: 8px; overflow: hidden; background: #111114; cursor: zoom-in; }
.job[data-ar="2:3"] .cell-pic { aspect-ratio: 2 / 3; }
.cell-pic:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.cell-back { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(22px) brightness(.42) saturate(1.1); opacity: 0; transition: opacity .3s; }
.cell-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.cell-pic.is-real .cell-img, .cell-pic.is-real .cell-back { opacity: 1; }
.cell-img { transition: opacity .24s ease; }
.grain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; transition: opacity .3s ease; }
.cell figcaption { display: flex; align-items: center; gap: 8px; padding: 7px 2px 0; min-width: 0; }
.cell-name { flex: 1; min-width: 0; display: grid; }
.cell-t { font-size: 12.5px; font-weight: 600; color: #dcdce2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-c { font-size: 10.5px; letter-spacing: .06em; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-acts { display: flex; gap: 4px; flex: none; }
.act { height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.act:hover { color: var(--text); border-color: var(--line-2); background: var(--panel-2); }
.act:disabled { opacity: .35; cursor: default; }

/* ---------- about */
.profile { max-width: 720px; padding: 28px 0 40px; }
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.profile-head .avatar { width: 76px; height: 76px; font-size: 24px; }
.profile h1 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.015em; }
.profile .role { margin: 2px 0 0; color: var(--muted); }
.profile .bio { font-size: 16px; line-height: 1.55; margin: 0 0 8px; color: #dadade; }
.profile .loc { color: var(--dim); margin: 0 0 18px; }
.profile-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; font-weight: 500; font-size: 13.5px; cursor: pointer; }
.btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.btn-primary { background: var(--paper); color: #141416; border-color: var(--paper); }
.btn-primary:hover { background: #fff; }
.btn svg { width: 16px; height: 16px; }
.profile h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; margin: 0 0 12px; }
.exp { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.exp li { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid #1c1c21; }
.exp b { font-weight: 600; }
.exp span { color: var(--muted); font-size: 13px; }
.exp small { color: var(--dim); font-size: 12.5px; line-height: 1.45; }

/* ---------- the full-size view */
.detail { position: fixed; inset: 0; z-index: 50; background: #0a0a0c; }
.detail-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 28px 80px; }
.detail-bar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-end; padding: 12px 0 6px; pointer-events: none; }
.d-close { pointer-events: auto; width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line); background: rgba(24, 24, 28, .92); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.d-close svg { width: 18px; height: 18px; stroke-width: 2; }
.d-close:hover { background: var(--panel-3); }
.d-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; max-width: 1500px; margin: 0 auto; }
.d-figure { margin: 0; display: grid; place-items: center; min-width: 0; }
.d-figure img { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); object-fit: contain; border-radius: 6px; }
.d-side { min-width: 0; padding-top: 6px; }
.d-side h2 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.015em; }
.d-client { margin: 4px 0 18px; color: var(--dim); font-size: 11.5px; letter-spacing: .08em; }
.d-label { margin: 0 0 6px; color: var(--dim); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.d-prompt { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: #e2e2e7; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.d-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.d-chips .chip { height: 26px; font-size: 12px; padding: 0 9px; }
.d-credits { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 5px; font-size: 13px; }
.d-credits li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
.d-credits span { color: var(--dim); }
.d-lede { margin: 0 0 16px; color: #cfcfd5; font-size: 14px; line-height: 1.55; }
.d-work { max-width: 1100px; margin: 54px auto 0; padding-top: 30px; border-top: 1px solid #1f1f25; }
.d-work .ab-heading { font-size: 15px; color: var(--text); }
.d-work .ab-text { color: var(--muted); }
.d-work .ab-media { --ab-chrome: 110px; gap: 30px; }
.d-work .ab-section { gap: 12px; }
.d-work .ab-image img { border-radius: 6px; }
.d-work audio { color-scheme: dark; }

/* ---------- toast */
.toast { position: fixed; z-index: 60; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 9px 16px; border-radius: 10px; background: var(--paper); color: #141416; font-weight: 600; font-size: 13px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- laptop and smaller */
@media (max-width: 1100px) {
  .job, .job[data-ar="2:3"] { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .job[data-ar="2:3"] .job-grid { max-width: 860px; }
  .job-head { position: static; order: -1; }
  .d-top { grid-template-columns: minmax(0, 1fr); }
  .d-side { max-width: 720px; }
}

/* ---------- phone */
@media (max-width: 760px) {
  :root { --pad: 12px; }
  .rail { display: none; }
  .topbar { display: flex; position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0; align-items: center; justify-content: space-between; background: rgba(12, 12, 14, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid #18181c; }
  .seg { display: flex; gap: 4px; background: var(--panel); border-radius: 10px; padding: 3px; }
  .seg button { all: unset; padding: 6px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
  .seg button[aria-current="page"] { background: var(--panel-3); color: var(--text); }
  .top-me { all: unset; cursor: pointer; border-radius: 50%; }
  .top-me .avatar { width: 34px; height: 34px; }
  .main { margin-left: 0; padding: calc(52px + env(safe-area-inset-top)) var(--pad) calc(132px + env(safe-area-inset-bottom)); }
  .composer::after { display: none; }
  .composer { position: fixed; z-index: 15; top: auto; bottom: 0; left: 0; right: 0; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(12, 12, 14, 0), var(--bg) 22%); display: flex; flex-direction: column-reverse; }
  .bar { height: 52px; padding: 0 6px 0 12px; gap: 6px; border-radius: 14px; }
  .bar-icon, .bar .chip-model { display: none; }
  .bar input { font-size: 16px; }
  .chip-ar { min-width: 46px; padding: 0 8px; height: 30px; }
  .go { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 10px; }
  .go span { display: none; }
  .go svg { display: block; }
  .suggest { margin: 0 0 8px; max-width: none; }
  .view-head { margin: 14px 0 12px; }
  .view-head h1 { font-size: 17px; }
  .wall { gap: 10px; }
  .col { gap: 10px; }
  .feed { padding-top: 14px; gap: 30px; }
  .job-prompt { font-size: 14px; margin-bottom: 8px; }
  .job-chips { margin-bottom: 8px; }
  .job-grid, .job[data-ar="2:3"] .job-grid { gap: 10px 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell figcaption { flex-wrap: wrap; gap: 6px; }
  .cell-name { flex-basis: 100%; }
  .cell-acts { width: 100%; }
  .act { flex: 1; height: 30px; }
  .detail-scroll { padding: 0 12px 60px; }
  .detail-bar { padding-top: calc(8px + env(safe-area-inset-top)); }
  .d-top { gap: 18px; }
  .d-figure img { max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); }
  .d-side h2 { font-size: 21px; }
  .d-work { margin-top: 32px; padding-top: 22px; }
  .d-credits li { grid-template-columns: 76px minmax(0, 1fr); }
  .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
  .profile { padding-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .card-pic img, .cell-img, .toast { transition: none; }
}
