:root {
  --bg: #000;
  --surface: #121212;
  --surface-2: #1c1c1c;
  --elevated: #262626;
  --border: #262626;
  --border-strong: #363636;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --primary: #0095f6;
  --primary-hover: #1877f2;
  --like: #ff3040;
  --green: #2ecc71;
  --story: linear-gradient(45deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  max-width: 935px; margin: 0 auto; height: 60px;
  padding: 0 20px; display: flex; align-items: center; justify-content: space-between;
}
.brand { font-size: 20px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; letter-spacing: -.2px; }
.verified { display: inline-flex; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%;
  transition: background .15s;
}
.icon-btn:hover { background: var(--elevated); }

/* ---------- Profile header ---------- */
.wrap { max-width: 935px; margin: 0 auto; padding: 30px 20px 0; }

.profile {
  display: grid;
  grid-template-columns: 290px auto 1fr;
  grid-template-areas:
    "av uname uname"
    "av stats stats"
    "av bio bio"
    "av actions actions";
  column-gap: 0; row-gap: 18px;
  margin-bottom: 44px;
}
.p-avatar { grid-area: av; position: relative; justify-self: center; align-self: start; padding-top: 10px; }
.p-uname { grid-area: uname; display: flex; align-items: center; }
.p-uname h1 { font-size: 20px; font-weight: 400; margin: 0; }
.p-stats { grid-area: stats; list-style: none; padding: 0; margin: 0; display: flex; gap: 40px; font-size: 16px; }
.p-stats strong { font-weight: 600; }
.p-stats span { color: var(--text); }
.p-bio { grid-area: bio; display: flex; flex-direction: column; gap: 2px; max-width: 520px; }
.p-actions { grid-area: actions; display: flex; gap: 8px; flex-wrap: wrap; }

.avatar-btn { display: block; border-radius: 50%; position: relative; }
.avatar-ring {
  display: block; width: 168px; height: 168px; border-radius: 50%; padding: 4px;
  background: var(--border-strong);
}
.avatar-btn.has-story .avatar-ring { background: var(--story); }
.avatar-ring img, .avatar-fallback {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--bg); background: var(--elevated);
}
.avatar-fallback { display: grid; place-items: center; font-size: 48px; font-weight: 600; }
.avatar-btn.has-story:hover .avatar-ring { animation: spin-ring 1.2s linear infinite; }
@keyframes spin-ring { to { filter: hue-rotate(360deg); } }

.note {
  position: absolute; z-index: 2; top: -22px; left: 50%; transform: translateX(-50%);
  max-width: 180px; width: max-content;
  background: var(--elevated); color: var(--text);
  padding: 8px 12px; border-radius: 16px; font-size: 12px; line-height: 1.3;
  text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.note::after, .note::before {
  content: ""; position: absolute; background: var(--elevated); border-radius: 50%;
}
.note::after { width: 10px; height: 10px; bottom: -8px; left: 38%; }
.note::before { width: 5px; height: 5px; bottom: -14px; left: 33%; }

.open-badge {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: #0b2615; color: #5ee08f; border: 2px solid var(--bg);
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
}
.open-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(46,204,113,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }

.p-name { font-weight: 600; font-size: 14px; }
.p-headline { color: var(--muted); font-size: 13px; }
.p-text { margin-top: 2px; white-space: normal; word-wrap: break-word; }
.p-text a { color: #e0f1ff; }
.p-text ul { margin: 4px 0; padding-left: 18px; }
.p-meta { color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; }
.p-link { color: #e0f1ff; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }
.p-link:hover { text-decoration: underline; }
.p-socials { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.p-socials a {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: var(--elevated); color: var(--text); transition: background .15s, transform .15s;
}
.p-socials a:hover { background: var(--border-strong); transform: translateY(-2px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px; border-radius: var(--radius);
  background: var(--elevated); color: var(--text); font-weight: 600; font-size: 14px;
  transition: background .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: var(--border-strong); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-icon { padding: 0 10px; }
.btn-block { width: 100%; height: 40px; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- Highlights ---------- */
.highlights {
  display: flex; gap: 32px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 0 32px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.highlights::-webkit-scrollbar { display: none; }
.hl { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 0 0 auto; width: 88px; scroll-snap-align: start; }
.hl-ring {
  width: 87px; height: 87px; border-radius: 50%; padding: 3px;
  border: 1px solid var(--border-strong); background: var(--bg); transition: transform .2s;
}
.hl:hover .hl-ring { transform: scale(1.05); }
.hl:active .hl-ring { transform: scale(.95); }
.hl-ring img, .hl-fallback {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--elevated);
}
.hl-fallback { display: grid; place-items: center; font-size: 30px; font-weight: 700; color: #fff; }
.hl-name { font-size: 12px; font-weight: 600; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Tabs ---------- */
.tabs { display: flex; justify-content: center; gap: 60px; border-top: 1px solid var(--border); }
.tab {
  display: flex; align-items: center; gap: 6px; height: 52px; margin-top: -1px;
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  border-top: 1px solid transparent; transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-top-color: var(--text); }
.panel { display: none; padding-bottom: 40px; }
.panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 10px;
  background: var(--elevated); font-weight: 600; font-size: 13px; transition: background .15s;
}
.chip:hover { background: var(--border-strong); }
.chip.active { background: var(--text); color: #000; }

/* ---------- Projects grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.post { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.post.hide { display: none; }
.post img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post:hover img { transform: scale(1.03); }
.post-ph {
  width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; gap: 4px; color: #fff;
}
.post-ph strong { font-size: 18px; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.post-ph small { opacity: .8; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; font-size: 11px; }
.post-badge { position: absolute; top: 10px; right: 10px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.post-over {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(0, 0, 0, .45); color: #fff; opacity: 0; transition: opacity .2s; padding: 12px; text-align: center;
}
.post:hover .post-over, .post:focus-visible .post-over { opacity: 1; }
.post-title { font-weight: 700; font-size: 15px; }
.post-stats { display: flex; gap: 24px; font-weight: 700; font-size: 16px; }
.post-stats span { display: inline-flex; align-items: center; gap: 6px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 26px; font-weight: 800; margin: 14px 0 6px; }
.empty-ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border: 2px solid var(--text); border-radius: 50%; color: var(--text); }

/* ---------- Experience ---------- */
.timeline { list-style: none; margin: 16px auto 0; padding: 0; max-width: 640px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 23px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.tl-item { display: flex; gap: 18px; padding: 14px 0; position: relative; }
.tl-logo {
  flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--elevated); display: grid; place-items: center;
  overflow: hidden; border: 3px solid var(--bg); position: relative; z-index: 1; color: var(--muted);
}
.tl-logo img { width: 100%; height: 100%; object-fit: cover; }
.tl-body { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.tl-body h3 { margin: 0; font-size: 16px; }
.tl-company { color: var(--text); margin-top: 2px; }
.tl-company a { color: #e0f1ff; }
.tl-date { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tl-desc { color: #d6d6d6; margin-top: 10px; }
.tl-desc ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.quote { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.stars span { color: var(--border-strong); font-size: 16px; }
.stars span.on { color: #ffc83d; }
.quote blockquote { margin: 0; font-size: 15px; color: #e6e6e6; flex: 1; }
.quote figcaption { display: flex; align-items: center; gap: 10px; }
.quote figcaption small { display: block; color: var(--muted); }
.q-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--story); display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: 0 0 auto; }
.q-avatar img { width: 100%; height: 100%; object-fit: cover; }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 20px 50px; }

/* ---------- Story viewer ---------- */
.story-viewer {
  position: fixed; inset: 0; z-index: 100; background: #1a1a1a;
  display: flex; align-items: center; justify-content: center; gap: 24px;
  animation: zoomIn .22s ease;
}
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.sv-close { position: absolute; top: 16px; right: 16px; color: #fff; z-index: 10; width: 44px; height: 44px; display: grid; place-items: center; }
.sv-card {
  position: relative; height: min(92vh, 860px); aspect-ratio: 9 / 16; max-width: 100vw;
  border-radius: 10px; overflow: hidden; background: #000; user-select: none; -webkit-user-select: none;
}
.sv-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 3px; z-index: 3; }
.sv-bar { flex: 1; height: 2px; background: rgba(255,255,255,.35); border-radius: 2px; overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bar.done i { width: 100%; }
.sv-head {
  position: absolute; top: 22px; left: 12px; right: 12px; z-index: 3;
  display: flex; align-items: center; gap: 10px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.sv-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--elevated); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.sv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sv-title { font-size: 14px; }
.sv-date { color: rgba(255,255,255,.7); font-size: 13px; }
.sv-pause { margin-left: auto; width: 28px; height: 28px; color: #fff; display: grid; place-items: center; }
.sv-media { position: absolute; inset: 0; display: grid; place-items: center; }
.sv-media img { width: 100%; height: 100%; object-fit: contain; }
.sv-media .sv-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(.5); }
.sv-media img { position: relative; }
.sv-text {
  width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 16px;
  padding: 40px 28px; text-align: center; color: #fff;
}
.sv-text h3 { margin: 0; font-size: 28px; line-height: 1.15; }
.sv-text p { margin: 0; font-size: 18px; line-height: 1.5; opacity: .95; }
.sv-tap { position: absolute; top: 70px; bottom: 90px; width: 35%; z-index: 2; }
.sv-tap-l { left: 0; }
.sv-tap-r { right: 0; width: 65%; }
.sv-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 50px 16px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.sv-foot:empty { display: none; }
.sv-foot h4 { margin: 0; font-size: 16px; }
.sv-foot p { margin: 0; font-size: 14px; opacity: .9; white-space: pre-line; }
.sv-link {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #000;
  font-weight: 600; padding: 9px 16px; border-radius: 20px; font-size: 13px;
}
.sv-arrow {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.85); color: #000;
  display: grid; place-items: center; flex: 0 0 auto; transition: opacity .15s;
}
.sv-arrow:disabled { opacity: 0; pointer-events: none; }

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center; padding: 40px 70px;
  animation: fadeOnly .2s ease;
}
@keyframes fadeOnly { from { opacity: 0; } }
.m-close { position: absolute; top: 14px; right: 14px; color: #fff; z-index: 2; }
.m-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: #000; display: grid; place-items: center; z-index: 2;
}
.m-prev { left: 20px; } .m-next { right: 20px; }
.m-arrow:disabled { display: none; }

.pm {
  display: flex; width: min(1200px, 100%); height: min(88vh, 860px);
  background: var(--bg); border-radius: 4px; overflow: hidden; animation: zoomIn .2s ease;
}
.pm-media { position: relative; flex: 1 1 60%; background: #000; min-width: 0; display: flex; flex-direction: column; }
.pm-side { flex: 0 0 420px; display: flex; flex-direction: column; border-left: 1px solid var(--border); min-width: 0; }

.carousel { position: relative; flex: 1; overflow: hidden; }
.c-track { display: flex; height: 100%; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.c-slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; }
.c-slide img { width: 100%; height: 100%; object-fit: contain; }
.c-ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px; text-align: center; color: #fff; }
.c-ph strong { font-size: 32px; }
.c-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.8); color: #000; display: grid; place-items: center; z-index: 2;
}
.c-btn.prev { left: 12px; } .c-btn.next { right: 12px; }
.c-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; z-index: 2; }
.c-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); transition: background .2s; }
.c-dots i.on { background: #fff; }
.big-heart {
  position: absolute; top: 50%; left: 50%; z-index: 3; pointer-events: none; color: #fff;
  transform: translate(-50%, -50%) scale(0); filter: drop-shadow(0 4px 20px rgba(0,0,0,.4));
}
.big-heart.pop { animation: heartPop .9s ease forwards; }
@keyframes heartPop {
  15% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(.95); }
  45%, 80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -60%) scale(.2); opacity: 0; }
}

.media-switch { display: flex; gap: 4px; padding: 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
.media-switch button { flex: 1; height: 32px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.media-switch button.on { background: var(--elevated); color: var(--text); }

.browser { flex: 1; display: flex; flex-direction: column; background: #fff; min-height: 0; }
.browser-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #2b2b2b; }
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.browser-dots i:nth-child(2) { background: #febc2e; } .browser-dots i:nth-child(3) { background: #28c840; }
.browser-url { flex: 1; background: #1a1a1a; color: var(--muted); border-radius: 6px; padding: 5px 10px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-bar a { color: var(--muted); display: grid; }
.browser iframe { flex: 1; border: 0; width: 100%; background: #fff; }

.pm-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pm-head .sv-avatar { background: var(--story); padding: 2px; }
.pm-head .sv-avatar img { border-radius: 50%; border: 2px solid var(--bg); }
.pm-head-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pm-head-txt strong { font-size: 14px; }
.pm-head-txt span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-status { margin-left: auto; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: #0b2615; color: #5ee08f; white-space: nowrap; }

.pm-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; }
.pm-title { margin: 0; font-size: 22px; line-height: 1.2; }
.pm-summary { color: var(--muted); margin: 6px 0 0; }
.pm-desc { color: #e6e6e6; }
.pm-desc ul { padding-left: 18px; margin: 6px 0; }
.pm-desc a { color: #e0f1ff; }
.pm-section h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.fact small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.fact span { font-weight: 600; overflow-wrap: anywhere; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack span { background: var(--elevated); border-radius: 20px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.feats li { display: flex; gap: 8px; align-items: flex-start; }
.feats svg { color: var(--green); flex: 0 0 auto; margin-top: 1px; }
.pm-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-links .btn { flex: 1; }


.pm-actions { border-top: 1px solid var(--border); padding: 6px 12px 10px; }
.pm-icons { display: flex; align-items: center; gap: 4px; margin-left: -8px; }
.pm-icons .icon-btn:hover { background: none; opacity: .6; }
.pm-icons .views { margin-left: auto; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.like-btn.liked { color: var(--like); }
.like-btn.liked svg { fill: var(--like); }
.like-btn.bump svg { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.3); } 60% { transform: scale(.9); } }
.pm-likes { font-weight: 600; padding: 0 4px; }
.pm-ago { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .3px; padding: 2px 4px 0; }


.pm-loading { margin: auto; width: 32px; height: 32px; border: 3px solid var(--border-strong); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Contact dialog */
.dialog { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; animation: zoomIn .2s ease; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: 0; font-size: 16px; }
.form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.form input, .form textarea {
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius);
  color: var(--text); padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical; outline: none; transition: border-color .15s;
}
.form input:focus, .form textarea:focus { border-color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); z-index: 200;
  background: var(--elevated); color: var(--text); padding: 12px 18px; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); font-weight: 500; transition: transform .3s ease; max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .modal { padding: 20px 56px; }
  .pm-side { flex-basis: 360px; }
}

@media (max-width: 735px) {
  .topbar-in { height: 50px; padding: 0 16px; }
  .brand { font-size: 18px; }
  .wrap { padding: 20px 16px 0; }
  .profile > * { min-width: 0; }
  .profile {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
      "av uname"
      "av stats"
      "bio bio"
      "actions actions";
    column-gap: 24px; row-gap: 6px; margin-bottom: 24px;
  }
  .p-avatar { padding-top: 22px; align-self: center; }
  .avatar-ring { width: 92px; height: 92px; padding: 3px; }
  .avatar-ring img, .avatar-fallback { border-width: 3px; }
  .avatar-fallback { font-size: 28px; }
  .note { top: -12px; font-size: 11px; max-width: 120px; padding: 6px 9px; }
  .open-badge { font-size: 9px; padding: 2px 7px; bottom: -4px; }
  .p-uname { align-self: end; padding-top: 18px; }
  .p-uname h1 { font-size: 18px; font-weight: 600; }
  .p-stats { gap: 8px; justify-content: space-between; font-size: 14px; align-self: start; max-width: 260px; }
  .p-stats li, .p-stats li a { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
  .p-stats span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .p-stats strong { font-size: 16px; }
  .p-stats span { font-size: 13px; }
  .p-bio { margin-top: 10px; }
  .p-actions { margin-top: 10px; }
  .p-actions { flex-wrap: nowrap; }
  .p-actions .btn { flex: 1 1 0; min-width: 0; height: 32px; padding: 0 10px; }
  .p-actions .btn-icon { flex: 0 0 auto; }

  .highlights { gap: 16px; margin: 0 -16px 18px; padding: 4px 16px 10px; }
  .hl { width: 66px; gap: 6px; }
  .hl-ring { width: 66px; height: 66px; padding: 2px; }
  .hl-fallback { font-size: 22px; }
  .hl-name { font-size: 12px; font-weight: 400; max-width: 70px; }

  .tabs { gap: 0; margin: 0 -16px; justify-content: space-around; }
  .tab { flex: 1; justify-content: center; height: 46px; }
  .tab svg { width: 24px; height: 24px; }
  .tab span { display: none; }
  .tab.active { color: var(--primary); border-top-color: transparent; }

  .chips { padding-top: 12px; }
  .grid { gap: 2px; margin: 0 -16px; }
  .post-ph { padding: 8px; }
  .post-ph strong { font-size: 12px; }
  .post-ph small { display: none; }
  .post-badge { top: 6px; right: 6px; }
  .post-badge svg { width: 16px; height: 16px; }
  .post-over { display: none; }

  .story-viewer { background: #000; }
  .sv-card { height: 100%; width: 100%; aspect-ratio: auto; border-radius: 0; }
  .sv-arrow { display: none; }
  .sv-close { top: 14px; right: 2px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
  .sv-pause { margin-right: 36px; }

  .modal { padding: 0; align-items: stretch; }
  .m-arrow { display: none; }
  .m-close { top: 6px; right: 6px; background: rgba(0,0,0,.5); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; }
  .pm { flex-direction: column; height: 100%; border-radius: 0; overflow-y: auto; }
  .pm-media { flex: 0 0 auto; }
  .carousel { flex: 0 0 auto; aspect-ratio: 4 / 5; }
  .browser { height: 70vh; flex: 0 0 auto; }
  .pm-side { display: contents; }
  .pm-head { order: -1; padding-right: 54px; }
  .pm-body { flex: 0 0 auto; overflow: visible; }
  .row2 { grid-template-columns: 1fr; }
  #contactModal { padding: 16px; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
