:root {
  --bg: #08080a;
  --card: rgba(18, 18, 20, 0.72);
  --panel: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #ededee;
  --muted: #8b8b92;
  --dim: #5c5c63;
  --online: #3ba55d;
  --idle: #faa81a;
  --dnd: #ed4245;
  --offline: #747f8d;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.035), transparent 55%),
              radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.65));
}

/* ---------- enter splash ---------- */
.enter {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(5, 5, 6, 0.9);
  backdrop-filter: blur(14px);
  transition: opacity .7s ease, visibility .7s;
  cursor: pointer;
}
.enter span {
  font-family: var(--mono); font-size: 13px; letter-spacing: .3em; text-transform: lowercase;
  color: var(--muted);
  animation: breathe 2.4s ease-in-out infinite;
}
.enter.gone { opacity: 0; visibility: hidden; }
@keyframes breathe { 50% { opacity: .35; } }

/* ---------- card ---------- */
.stage {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 48px 16px 96px;
  perspective: 1200px;
}
.card {
  width: 100%; max-width: 520px;
  padding: 28px 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(18px) saturate(120%);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04);
  text-align: center;
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
  opacity: 0; translate: 0 16px;
}
body.entered .card { animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { to { opacity: 1; translate: 0 0; } }

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.views, .platforms { display: inline-flex; gap: 6px; align-items: center; color: var(--dim); font-family: var(--mono); font-size: 11px; }
.platforms svg { color: var(--muted); }

.avatar-wrap { position: relative; width: 104px; height: 104px; margin: 6px auto 14px; }
.avatar {
  width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 6px rgba(255,255,255,.02), 0 10px 40px rgba(0,0,0,.6);
  background: #111;
}
.deco { position: absolute; inset: -12%; width: 124%; height: 124%; pointer-events: none; }
.dot {
  position: absolute; right: 4px; bottom: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #141416;
  background: var(--offline);
}
.dot.online { background: var(--online); }
.dot.idle { background: var(--idle); }
.dot.dnd { background: var(--dnd); }
.dot.online, .dot.dnd, .dot.idle { box-shadow: 0 0 12px currentColor; }
.dot.online { color: var(--online); } .dot.idle { color: var(--idle); } .dot.dnd { color: var(--dnd); }

.name {
  margin: 0;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 54px; line-height: 1; letter-spacing: -.01em;
  text-shadow: 0 0 28px rgba(255,255,255,.18);
}
.sub { margin: 10px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sep { color: var(--dim); margin: 0 4px; }
.type { margin: 14px 0 16px; min-height: 20px; font-size: 15px; }
.caret { display: inline-block; width: 1px; height: 1em; background: var(--text); margin-left: 2px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  font-family: var(--mono); font-size: 12px; color: #cfcfd4;
  transition: border-color .2s, transform .2s;
}
.chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.chip i { font-size: 13px; filter: grayscale(1) brightness(1.6); }

/* ---------- tabs ---------- */
.tabs {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; border-radius: 12px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line);
  margin-bottom: 14px;
}
.tab {
  position: relative; z-index: 1;
  border: 0; background: none; padding: 9px 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dim); transition: color .3s;
}
.tab.active { color: #0b0b0c; font-weight: 500; }
.tab-pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / 3);
  background: #f2f2f3; border-radius: 9px;
  box-shadow: 0 2px 14px rgba(255,255,255,.12);
  transition: transform .4s cubic-bezier(.3,1.3,.5,1);
}

.panel { display: none; flex-direction: column; gap: 12px; text-align: left; }
.panel.active { display: flex; animation: panel-in .35s ease; }
@keyframes panel-in { from { opacity: 0; translate: 0 6px; } }

.box, .note {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); padding: 14px 16px;
}
.note { display: flex; gap: 12px; border-style: dashed; }
.note .arrow { color: var(--muted); }
.note p { margin: 0; line-height: 1.55; font-size: 13.5px; }
.label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.about p { margin: 0 0 6px; line-height: 1.5; }
.ulink { display: inline-block; margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--dim); }
.ulink:hover { color: var(--text); }
.ulink::after { content: " ↗"; }

/* activity */
.activity { display: flex; gap: 14px; align-items: center; }
.activity .art { position: relative; flex: none; }
.activity .art img.big { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #111; display: block; }
.activity .art img.small { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #161618; background: #111; }
.activity .meta { min-width: 0; flex: 1; }
.activity .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity .line { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity .elapsed { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 3px; }
.bar { height: 3px; background: rgba(255,255,255,.08); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--text); border-radius: 3px; }
.times { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.custom-status { display: flex; align-items: center; gap: 8px; }
.custom-status img { width: 20px; height: 20px; }

/* stack */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-row .top { display: flex; align-items: center; gap: 10px; }
.stack-row i { font-size: 18px; filter: grayscale(1) brightness(1.6); width: 20px; text-align: center; }
.stack-row .n { font-family: var(--mono); font-size: 13px; }
.stack-row .pct { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.stack-row .desc { color: var(--muted); font-size: 12.5px; margin: 4px 0 0 30px; }
.stack-row .bar { margin-left: 30px; }
.stack-row .bar > span { width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools span { font-family: var(--mono); font-size: 11.5px; padding: 4px 9px; border-radius: 7px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: #c7c7cc; }

/* work */
.work-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-decoration: none; transition: border-color .2s, background .2s; position: relative; }
.work-card + .work-card { margin-top: 12px; }
.work-card:hover { border-color: var(--line-strong); background: rgba(255,255,255,.05); }
.work-logo { width: 72px; height: 72px; flex: none; border-radius: 14px; background: #050506; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.work-logo img { width: 100%; height: 100%; object-fit: cover; }
.work-logo b { font-family: var(--serif); font-style: italic; font-size: 40px; font-weight: 400; background: linear-gradient(135deg, #fff 40%, #7c5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.work-head { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.work-head strong { font-size: 16px; }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px 7px; }
.work-card .ext { position: absolute; top: 14px; right: 16px; color: var(--dim); }
.work-card .label { margin: 12px 0 6px; }
.work-card ul { margin: 0; padding: 0; list-style: none; }
.work-card li { color: #cfcfd4; font-size: 13.5px; line-height: 1.5; padding-left: 16px; position: relative; }
.work-card li::before { content: "–"; position: absolute; left: 0; color: var(--dim); }

/* footer */
.socials { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.icon-btn, .pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px;
  color: #d6d6da; transition: border-color .2s, transform .2s, background .2s;
}
.icon-btn { width: 44px; }
.pill-btn { padding: 0 16px; font-family: var(--mono); font-size: 12px; }
.icon-btn:hover, .pill-btn:hover { border-color: var(--line-strong); background: rgba(255,255,255,.06); transform: translateY(-2px); }

/* contact button */
.contact-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 10;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 18px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(14,14,16,.85); backdrop-filter: blur(10px);
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transition: transform .2s, border-color .2s;
}
.contact-btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.3); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); animation: fade .25s; }
.modal-card {
  position: relative; width: 100%; max-width: 440px;
  background: #121214; border: 1px solid var(--line-strong); border-radius: 18px;
  padding: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.7);
  animation: pop .3s cubic-bezier(.2,1.2,.4,1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.modal-x { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 22px; color: var(--dim); line-height: 1; }
.modal-x:hover { color: var(--text); }
.modal h2 { margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; }
.muted { color: var(--muted); line-height: 1.55; font-size: 13.5px; }
.mono { font-family: var(--mono); font-size: 11.5px; }
.step { display: none; }
.step.show { display: block; }
.steps { padding-left: 18px; color: var(--muted); line-height: 1.7; font-size: 13.5px; margin: 6px 0 10px; }
.steps a { color: var(--text); }

.primary, .ghost {
  border-radius: 11px; padding: 11px 18px; font-weight: 500; font-size: 13.5px;
  border: 1px solid var(--line-strong); transition: opacity .2s, background .2s;
}
.primary { background: #f2f2f3; color: #0b0b0c; border-color: #f2f2f3; }
.primary:hover { opacity: .88; }
.primary:disabled { opacity: .5; cursor: default; }
.ghost { background: transparent; color: var(--muted); }
.ghost:hover { color: var(--text); background: rgba(255,255,255,.04); }
.ghost.small { padding: 6px 10px; font-size: 12px; margin-left: auto; }
.step > .primary, .step > .ghost { margin-top: 14px; }

.code {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line-strong);
  background: #0a0a0b; font-family: var(--mono); font-size: 16px; letter-spacing: .04em;
}
.code small { font-size: 10.5px; color: var(--dim); letter-spacing: .2em; text-transform: uppercase; }
.code:hover small { color: var(--text); }
.waiting { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
#code-timer { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--dim); border-top-color: var(--text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.me { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.me img { width: 36px; height: 36px; border-radius: 50%; }
#me-name { font-weight: 600; }
input, textarea {
  width: 100%; display: block; margin-bottom: 10px;
  background: #0a0a0b; border: 1px solid var(--line); border-radius: 11px;
  color: var(--text); font: inherit; padding: 11px 13px; resize: vertical;
  outline: none; transition: border-color .2s;
}
input:focus, textarea:focus { border-color: rgba(255,255,255,.3); }
.row { display: flex; align-items: center; justify-content: space-between; }
.error { color: #ff7b7b; font-size: 13px; min-height: 1em; margin: 10px 0 0; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 60;
  translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 10px; background: #f2f2f3; color: #0b0b0c;
  font-family: var(--mono); font-size: 12px; transition: opacity .25s, translate .25s;
}
.toast.show { opacity: 1; translate: -50% 0; }

@media (max-width: 560px) {
  .card { padding: 22px 18px 20px; border-radius: 18px; }
  .name { font-size: 44px; }
  .contact-btn { right: 12px; bottom: 12px; padding: 11px 14px; }
  .work-logo { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
