:root {
  --bg: #060d1c;
  --bg-soft: #091528;
  --card: #0b1930;
  --card-hover: #0e2038;
  --line: rgba(56, 224, 210, 0.14);
  --line-strong: rgba(56, 224, 210, 0.32);
  --text: #e9f1fb;
  --muted: #a3b6d3;
  --faint: #8095ba;
  --cyan: #38e0d2;
  --blue: #5b9dff;
  --amber: #f5b942;
  --red: #f87171;
  --radius: 16px;
  --font-display: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-body: "Noto Sans", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; }

.container { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }

::selection { background: rgba(56, 224, 210, 0.3); }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

a, button, input, textarea, label { touch-action: manipulation; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 300;
  padding: 10px 18px; border-radius: 10px;
  background: var(--cyan); color: #051329; font-weight: 600; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

img, svg { max-width: 100%; }

/* ================= nav ================= */

.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 13, 28, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(56, 224, 210, 0.08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand img.brand-mark {
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(56, 224, 210, 0.25), 0 0 14px -2px rgba(56, 224, 210, 0.4);
}
.brand b {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  letter-spacing: 0.28em; color: var(--text);
}
.brand img.wordmark { height: 18px; width: auto; display: block; }
.brand img.wordmark-sm { height: 14px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) {
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a.active { color: var(--cyan); }

/* nav account menu */
.nav-me { position: relative; }
.nav-me-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; cursor: pointer; color: var(--muted);
  padding: 4px 6px; border-radius: 10px;
}
.nav-me-btn:hover { color: var(--cyan); background: rgba(56, 224, 210, 0.06); }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.nav-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 200;
  min-width: 230px; padding: 8px;
  background: #0b1a30; border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}
.nav-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.nav-menu-head b { display: block; font-family: var(--font-display); font-size: 15px; color: var(--text); }
.nav-menu-head span { font-size: 12.5px; color: var(--faint); }
.nav-menu a, .nav-menu button {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 9px; border: 0; background: none; cursor: pointer;
  color: var(--muted); text-decoration: none;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
}
.nav-menu a:hover, .nav-menu button:hover { color: var(--text); background: rgba(56, 224, 210, 0.08); }
.nav-menu button { color: var(--red); }
.nav-menu button:hover { color: var(--red); background: rgba(248, 113, 113, 0.08); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--cyan);
  margin: 5px 0; border-radius: 2px; transition: transform 0.2s, opacity 0.2s;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= buttons ================= */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  border-radius: 12px; padding: 13px 26px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  color: #051329;
  background: linear-gradient(120deg, var(--blue), var(--cyan));
  box-shadow: 0 0 0 1px rgba(56, 224, 210, 0.25), 0 10px 30px -12px rgba(56, 224, 210, 0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(56, 224, 210, 0.4), 0 16px 36px -12px rgba(56, 224, 210, 0.65); }
.btn-ghost {
  color: var(--text); background: rgba(56, 224, 210, 0.05);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(56, 224, 210, 0.12); border-color: var(--cyan); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; border-radius: 10px; }
.btn:disabled { opacity: 0.55; cursor: wait; transform: none; }
.btn:active { transform: translateY(0) scale(0.95); }

/* ================= hero ================= */

.hero {
  position: relative;
  padding: 96px 0 88px;
  background:
    radial-gradient(56rem 30rem at 78% -8%, rgba(56, 224, 210, 0.13), transparent 62%),
    radial-gradient(40rem 26rem at -6% 68%, rgba(91, 157, 255, 0.07), transparent 60%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(56, 224, 210, 0.14) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 75%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
}
.hero-grid > * { min-width: 0; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.3em;
  color: var(--blue); text-transform: uppercase;
}
.kicker::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}
.hero h1 {
  margin-top: 22px;
  font-size: clamp(38px, 4.6vw, 58px);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--blue), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { margin-top: 22px; max-width: 520px; color: var(--muted); font-size: 17.5px; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 52px; display: flex; gap: 0; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(11, 25, 48, 0.6); backdrop-filter: blur(6px);
  overflow: hidden;
}
.stat { flex: 1 1 140px; padding: 18px 22px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-display); font-size: 22px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--faint); letter-spacing: 0.04em; text-transform: uppercase; }

/* hero visual (video) */
.hero-visual { position: relative; display: flex; justify-content: center; }
.video-frame {
  position: relative; width: 100%; max-width: 520px;
  border-radius: 20px; padding: 3px;
  background: linear-gradient(135deg, rgba(56, 224, 210, 0.55), rgba(91, 157, 255, 0.35) 45%, rgba(56, 224, 210, 0.12));
  box-shadow:
    0 0 60px -8px rgba(56, 224, 210, 0.35),
    0 30px 70px -30px rgba(0, 0, 0, 0.85);
  animation: frame-float 8s ease-in-out infinite;
}
@keyframes frame-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.video-frame::after {
  content: ""; position: absolute; inset: -28px; z-index: -1; border-radius: 40px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(56, 224, 210, 0.16), transparent 70%);
}
.video-frame video {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 17px; background: var(--bg-soft);
}
.video-badge {
  position: absolute; left: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(6, 13, 28, 0.72); backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan);
}
.video-badge i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 0 rgba(91, 157, 255, 0.5);
  animation: ping 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ================= page hero (subpages) ================= */

.page-hero {
  position: relative;
  padding: 76px 0 20px;
  background: radial-gradient(48rem 24rem at 70% -30%, rgba(56, 224, 210, 0.1), transparent 62%);
}
.page-title {
  margin-top: 20px;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700; line-height: 1.12; letter-spacing: -0.018em;
  max-width: 640px;
}
.page-hero .lede { margin-top: 16px; max-width: 560px; color: var(--muted); font-size: 17px; }

/* ================= cta band ================= */

.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 40px 44px;
  background:
    radial-gradient(30rem 16rem at 90% 0%, rgba(56, 224, 210, 0.14), transparent 65%),
    var(--card);
}
.cta-band h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.01em; }
.cta-band p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

/* ================= card links (home teasers) ================= */

.card-link { display: block; text-decoration: none; color: inherit; }
.card-link .card-more {
  display: inline-block; margin-top: 18px;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--cyan);
}
.card-link .card-more::after { content: " \2192"; transition: margin-left 0.15s ease; }
.card-link:hover .card-more::after { margin-left: 4px; }

/* ================= sections ================= */

.section { padding-block: 92px; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(9, 20, 38, 0.85) 18% 82%, transparent); }
.section-head { max-width: 640px; }
.section-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.3em;
  color: var(--cyan); text-transform: uppercase;
}
.section-title {
  margin-top: 12px; font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700; letter-spacing: -0.015em; line-height: 1.15;
}
.section-title::after {
  content: ""; display: block; width: 58px; height: 3px; margin-top: 18px;
  background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 3px;
}
.section-sub { margin-top: 18px; color: var(--muted); font-size: 16.5px; }

/* ================= feature cards ================= */

.grid-3 { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-5px);
  background: var(--card-hover);
  border-color: var(--line-strong);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(56, 224, 210, 0.1);
  border: 1px solid rgba(56, 224, 210, 0.25);
}
.feature-icon svg { width: 26px; height: 26px; }
.card h3 { margin-top: 22px; font-size: 19px; }
.card .num { font-family: var(--font-display); font-size: 13px; color: var(--faint); letter-spacing: 0.2em; }
.card p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.card .soon {
  display: inline-block; margin-top: 14px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber);
  border: 1px solid rgba(245, 185, 66, 0.35); border-radius: 999px; padding: 4px 12px;
}

/* ================= how it works ================= */

.steps { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.step { position: relative; padding: 0 26px 0 0; }
.step-dot {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: #051329; background: linear-gradient(130deg, var(--blue), var(--cyan));
  box-shadow: 0 0 0 6px rgba(56, 224, 210, 0.08);
}
.step::before {
  content: ""; position: absolute; top: 19px; left: 38px; right: 12px; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--line));
}
.step:last-child::before { display: none; }
.step h4 { margin-top: 20px; font-size: 16.5px; }
.step p { margin-top: 7px; color: var(--muted); font-size: 14px; padding-right: 6px; }

/* ================= roles ================= */

.actors { margin-top: 52px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.actor {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px 24px 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.actor::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent, var(--cyan));
}
.actor:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.actor h4 { font-size: 16.5px; }
.actor p { margin-top: 7px; color: var(--muted); font-size: 13.5px; }
.actor small {
  display: inline-block; margin-top: 12px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent, var(--cyan));
}
.a-blue { --accent: var(--blue); }
.a-amber { --accent: var(--amber); }

/* ================= projects ================= */

.projects-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.live-dot {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--blue);
}
.live-dot i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 0 rgba(91, 157, 255, 0.5);
  animation: ping 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(91, 157, 255, 0.45); }
  75%, 100% { box-shadow: 0 0 0 9px rgba(91, 157, 255, 0); }
}

.projects-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.project-card { display: flex; flex-direction: column; padding: 26px; }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-field {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue);
  border: 1px solid rgba(91, 157, 255, 0.35); border-radius: 999px; padding: 5px 13px;
  background: rgba(91, 157, 255, 0.06);
}
.project-card time { font-size: 12.5px; color: var(--faint); }
.project-card h3 { margin-top: 18px; font-size: 18.5px; line-height: 1.35; }
.project-card .summary {
  margin-top: 10px; color: var(--muted); font-size: 14.5px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.project-owner { margin-top: 20px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: #051329;
  background: linear-gradient(130deg, var(--blue), var(--cyan));
}
.project-owner span { font-size: 13px; color: var(--faint); }

.empty-state {
  margin-top: 44px; padding: 56px 32px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: rgba(11, 25, 48, 0.4);
}
.skeleton { position: relative; overflow: hidden; min-height: 210px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(56, 224, 210, 0.06) 50%, transparent 70%);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ================= join / auth ================= */

.join-grid { margin-top: 52px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; }
.benefits { display: flex; flex-direction: column; gap: 22px; }
.benefit { display: flex; gap: 16px; }
.benefit-icon {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(91, 157, 255, 0.09); border: 1px solid rgba(91, 157, 255, 0.25);
}
.benefit-icon svg { width: 21px; height: 21px; }
.benefit h4 { font-size: 16px; }
.benefit p { margin-top: 4px; color: var(--muted); font-size: 14px; }

.auth-card { padding: 0; overflow: hidden; }
.auth-card:hover { transform: none; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1; padding: 17px 10px; text-align: center; cursor: pointer;
  background: rgba(6, 13, 28, 0.45); border: 0; color: var(--muted);
  font-family: var(--font-display); font-size: 14.5px; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tab[aria-selected="true"] { color: var(--cyan); border-bottom-color: var(--cyan); background: transparent; }
.auth-body { padding: 30px 30px 28px; }
.auth-body form { display: flex; flex-direction: column; gap: 18px; }

.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
input, textarea {
  width: 100%; padding: 12px 15px; font-size: 15px; color: var(--text);
  background: rgba(6, 13, 28, 0.6);
  border: 1px solid rgba(56, 224, 210, 0.18); border-radius: 10px;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 224, 210, 0.12);
}
.form-msg { font-size: 14px; min-height: 20px; }
.form-msg.ok { color: var(--blue); }
.form-msg.err { color: var(--red); }
.hint { font-size: 12.5px; color: var(--faint); }

.session-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: rgba(91, 157, 255, 0.07); border: 1px solid rgba(91, 157, 255, 0.3);
  border-radius: 14px; padding: 16px 22px; margin-bottom: 30px;
}
.session-bar .who { display: flex; align-items: center; gap: 12px; font-size: 14.5px; }
.session-bar .who b { color: var(--blue); font-weight: 600; }

/* ================= feed ================= */

.feed-layout { max-width: 720px; }
.feed-list { display: flex; flex-direction: column; gap: 18px; }

.composer { padding: 22px; margin-bottom: 26px; }
.composer:hover { transform: none; }
.composer-top { display: flex; gap: 14px; }
.composer-top form { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.composer textarea { resize: vertical; min-height: 74px; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.attach-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  padding: 8px 14px; border: 1px dashed var(--line-strong); border-radius: 10px;
  transition: color 0.15s, border-color 0.15s;
  max-width: 60%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.attach-btn:hover { color: var(--cyan); border-color: var(--cyan); }

.composer-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px; margin-bottom: 26px;
}
.composer-cta:hover { transform: none; }
.composer-cta p { color: var(--muted); font-size: 14.5px; }

.post-card { padding: 22px 24px; }
.post-card:hover { transform: none; }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-head .avatar { text-decoration: none; }
.post-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.post-author {
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 15.5px;
}
.post-author:hover { color: var(--cyan); }
.post-sub { font-size: 12.5px; color: var(--faint); }
.post-delete {
  background: none; border: 0; cursor: pointer;
  color: var(--faint); font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 8px;
}
.post-delete:hover { color: var(--red); background: rgba(248, 113, 113, 0.08); }
.post-body { margin-top: 14px; font-size: 15px; color: var(--text); white-space: pre-line; }
.post-video {
  margin-top: 14px; width: 100%; max-height: 420px;
  border-radius: 12px; background: #000;
  border: 1px solid var(--line);
}
.post-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(56, 224, 210, 0.08); }
.like-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: none; border: 0; color: var(--muted);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.like-btn:hover { color: var(--blue); background: rgba(91, 157, 255, 0.08); }
.like-count { font-variant-numeric: tabular-nums; }
.like-btn.liked { color: var(--blue); }

/* onboarding */
.onboarding-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }

/* publish card (projects page) */
.publish-card { padding: 18px 22px; margin-bottom: 32px; max-width: 720px; }
.publish-card:hover { transform: none; }
.publish-toggle {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.publish-placeholder {
  flex: 1; padding: 12px 18px; border-radius: 999px;
  border: 1px solid rgba(56, 224, 210, 0.22); color: var(--faint);
  font-family: var(--font-body); font-size: 14.5px;
  transition: border-color 0.15s, color 0.15s;
}
.publish-toggle:hover .publish-placeholder { border-color: var(--cyan); color: var(--muted); }
.publish-card form { display: flex; flex-direction: column; gap: 16px; }

/* ================= profile (LinkedIn-style card) ================= */

.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

.profile-layout { max-width: 840px; }
.profile-card { padding: 0; overflow: hidden; position: relative; }
.profile-card:hover { transform: none; }
.profile-cover {
  height: 148px;
  background:
    radial-gradient(24rem 12rem at 82% 20%, rgba(56, 224, 210, 0.35), transparent 65%),
    radial-gradient(20rem 12rem at 15% 90%, rgba(91, 157, 255, 0.3), transparent 60%),
    linear-gradient(120deg, #10305e, #0b4a56);
}
.profile-body { padding: 0 30px 28px; }
.profile-avatar-wrap { position: relative; width: 116px; margin-top: -58px; }
.avatar-xl {
  width: 116px; height: 116px; font-size: 36px; border-radius: 50%;
  border: 4px solid var(--card);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}
.avatar-cam {
  position: absolute; right: 2px; bottom: 6px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--cyan);
  border: 1px solid var(--line-strong); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.avatar-cam:hover { background: var(--card-hover); color: var(--text); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: none; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.icon-btn:hover { color: var(--cyan); border-color: var(--cyan); background: rgba(56, 224, 210, 0.06); }
.profile-edit-btn { position: absolute; top: 162px; right: 22px; }

.profile-name { font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.015em; margin-top: 16px; }
.profile-meta { margin-top: 5px; color: var(--cyan); font-size: 15.5px; font-weight: 500; }
.profile-joined { margin-top: 4px; color: var(--faint); font-size: 13px; }
.profile-stats { margin-top: 10px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.profile-bio { margin-top: 16px; color: var(--muted); font-size: 15px; max-width: 640px; }
.edit-card { margin-top: 20px; display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.project-owner .avatar { text-decoration: none; }

/* ================= footer ================= */

.footer {
  border-top: 1px solid rgba(56, 224, 210, 0.09);
  background: rgba(6, 13, 28, 0.8);
  padding: 56px 0 34px; margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .motto { margin-top: 16px; color: var(--muted); font-size: 14px; max-width: 320px; }
.footer h5 {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 16px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--muted); text-decoration: none; font-size: 14.5px; transition: color 0.15s; }
.footer a:hover { color: var(--cyan); }
.footer-bottom {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid rgba(56, 224, 210, 0.07);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--faint); font-size: 13px;
}
.footer-bottom .tag { letter-spacing: 0.24em; text-transform: uppercase; font-size: 11px; }

/* ================= reveal animation ================= */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.grid-3 > .reveal:nth-child(2), .actors > .reveal:nth-child(2), .steps > .reveal:nth-child(2) { transition-delay: 0.06s; }
.grid-3 > .reveal:nth-child(3), .actors > .reveal:nth-child(3), .steps > .reveal:nth-child(3) { transition-delay: 0.12s; }
.actors > .reveal:nth-child(4), .steps > .reveal:nth-child(4) { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================= responsive ================= */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; }
  .video-frame { max-width: 560px; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .steps { gap: 34px; }
  .step::before { display: none; }
  .actors { grid-template-columns: repeat(2, 1fr); }
  .join-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(6, 13, 28, 0.97); border-bottom: 1px solid var(--line);
    display: none; padding: 10px 24px 20px;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a:not(.btn) { padding: 13px 0; border-bottom: 1px solid rgba(56, 224, 210, 0.07); }
  .nav-links .btn { margin-top: 14px; }
  .hero { padding: 64px 0 64px; }
  .section { padding-block: 64px; }
  .actors { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
}

/* ================= password toggle ================= */

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: none; border: 0; cursor: pointer; color: var(--faint);
  transition: color 0.15s;
}
.pw-toggle:hover { color: var(--cyan); }

/* ================= touch targets (44px, per WCAG / HIG) ================= */

@media (pointer: coarse) {
  .btn { min-height: 46px; }
  .btn-sm, .tab, .like-btn, .icon-btn, .avatar-cam, .post-delete, .pw-toggle, .attach-btn { min-height: 44px; }
  .icon-btn, .avatar-cam { width: 44px; }
}

/* ================= 3D: hero particles + card tilt ================= */

.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}

.tilt { position: relative; transform-style: preserve-3d; will-change: transform; }
.reveal.in.tilt { transition: opacity 0.7s ease, transform 0.18s ease-out; }
.tilt:not(.reveal) { transition: transform 0.18s ease-out; }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(56, 224, 210, 0.09), transparent 62%);
  opacity: 0; transition: opacity 0.2s ease;
}
.tilt:hover::after { opacity: 1; }
.video-frame.tilting { animation: none; }

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .hero-canvas { display: none; }
}

/* ================= learning ================= */

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip-btn {
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: rgba(56, 224, 210, 0.05); border: 1px solid var(--line);
  color: var(--muted); font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chip-btn:hover { border-color: var(--line-strong); color: var(--text); }
.chip-btn.active { color: #051329; background: linear-gradient(120deg, var(--blue), var(--cyan)); border-color: transparent; }

.course-card { text-decoration: none; color: inherit; }
.level-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.lv-beginner { color: var(--blue); border: 1px solid rgba(91, 157, 255, 0.4); background: rgba(91, 157, 255, 0.07); }
.lv-intermediate { color: var(--cyan); border: 1px solid rgba(56, 224, 210, 0.4); background: rgba(56, 224, 210, 0.07); }
.lv-advanced { color: var(--amber); border: 1px solid rgba(245, 185, 66, 0.4); background: rgba(245, 185, 66, 0.07); }

.course-foot {
  margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--faint);
}
.course-progress-pill {
  font-size: 12px; font-weight: 700; color: var(--cyan);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}

.back-link { color: var(--faint); text-decoration: none; font-size: 13.5px; }
.back-link:hover { color: var(--cyan); }
.course-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.course-meta { margin-top: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.author-link { color: var(--cyan); text-decoration: none; }
.author-link:hover { text-decoration: underline; }
.course-cta { padding-top: 34px; }

.progress-wrap { margin-top: 26px; display: flex; align-items: center; gap: 14px; max-width: 460px; }
.progress-bar {
  flex: 1; height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(56, 224, 210, 0.1); border: 1px solid var(--line);
}
.progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.4s ease;
}
.progress-label { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.lessons-list { display: flex; flex-direction: column; gap: 14px; max-width: 780px; }
.lesson-item { padding: 0; overflow: hidden; }
.lesson-item:hover { transform: none; }
.lesson-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px; padding: 18px 22px;
}
.lesson-item summary::-webkit-details-marker { display: none; }
.lesson-check {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line-strong); color: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lesson-check.done { background: linear-gradient(120deg, var(--blue), var(--cyan)); color: #051329; border-color: transparent; }
.lesson-check[role="button"]:hover { border-color: var(--cyan); }
.lesson-no { flex: none; font-family: var(--font-display); font-size: 13px; color: var(--faint); width: 18px; }
.lesson-title { flex: 1; font-family: var(--font-display); font-weight: 600; font-size: 15.5px; }
.lesson-dur { flex: none; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.lesson-body { padding: 4px 22px 22px 62px; color: var(--muted); font-size: 14.5px; }
.lesson-body .post-video { margin-top: 14px; }

/* ================= mobile app: bottom nav + responsive pass ================= */

.bottom-nav { display: none; }

@media (max-width: 640px) {
  .bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
    display: flex; justify-content: space-around; align-items: stretch;
    background: rgba(6, 13, 28, 0.94);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(56, 224, 210, 0.14);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    flex: 1; min-height: 48px; padding: 4px 6px; border-radius: 12px;
    color: var(--faint); text-decoration: none;
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  }
  .bottom-nav a.active { color: var(--cyan); }
  .bottom-nav a:active { background: rgba(56, 224, 210, 0.08); }

  /* keep content clear of the fixed bar */
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

  /* app-like density */
  .page-hero { padding: 40px 0 10px; }
  .cta-band { padding: 26px 20px; }
  .cta-band .btn { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .projects-grid { grid-template-columns: 1fr; }
  .post-card { padding: 18px; }
  .composer { padding: 16px; }
  .composer-top { gap: 10px; }
  .auth-body { padding: 22px 18px; }
  .profile-body { padding: 0 20px 24px; }
  .profile-edit-btn { top: 156px; right: 14px; }
  .course-head-row { gap: 16px; }
  .course-cta { padding-top: 6px; width: 100%; }
  .course-cta .btn, .course-cta a { width: 100%; }
  .lesson-item summary { padding: 15px 16px; gap: 11px; }
  .lesson-body { padding: 2px 16px 18px 16px; }
  .footer { padding: 40px 0 24px; }
  .footer-bottom { margin-top: 30px; }
}

/* ================= mobile refinements per ui-ux-pro-max app rules ================= */

/* status bar safe area (PWA standalone / notch) */
.nav { padding-top: env(safe-area-inset-top, 0px); }

@media (max-width: 640px) {
  /* bottom tabs are the primary nav; hamburger keeps only secondary destinations */
  .nav-links a.nav-primary { display: none; }
  .nav-links { top: calc(68px + env(safe-area-inset-top, 0px)); }

  /* 16px inputs prevent iOS auto-zoom on focus */
  input, textarea { font-size: 16px; }

  /* press feedback on touch */
  .card:active { transform: scale(0.99); }
  .post-video { max-height: 280px; }
}

/* ================= comments + password flows ================= */

.link-btn {
  background: none; border: 0; cursor: pointer; text-align: left; padding: 0;
  color: var(--cyan); font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }
.reset-link-out {
  display: inline-block; margin-top: 4px;
  color: #051329; background: linear-gradient(120deg, var(--blue), var(--cyan));
  padding: 10px 18px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px;
}

.comments-wrap { margin-top: 14px; border-top: 1px solid rgba(56, 224, 210, 0.08); padding-top: 14px; }
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comment-row { display: flex; gap: 10px; }
.comment-row .avatar { width: 30px; height: 30px; font-size: 11px; flex: none; text-decoration: none; }
.comment-bubble {
  flex: 1; min-width: 0;
  background: rgba(6, 13, 28, 0.55); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px;
}
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-author {
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px;
}
.comment-author:hover { color: var(--cyan); }
.comment-time { flex: 1; font-size: 11.5px; color: var(--faint); }
.comment-delete { font-size: 17px; padding: 0 4px; }
.comment-bubble p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.comment-form { display: flex; gap: 10px; margin-top: 14px; }
.comment-input {
  flex: 1; padding: 10px 14px; font-size: 14px; border-radius: 999px;
}
.comment-signin { display: inline-block; margin-top: 12px; color: var(--cyan); }

/* ================= search + notifications + follow ================= */

.nav-icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav-icon-link:hover, .nav-icon-link.active { color: var(--cyan); background: rgba(56, 224, 210, 0.07); }

.nav-bell { position: relative; }
.bell-badge {
  position: absolute; top: 3px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.bell-menu { min-width: 320px; max-height: 420px; overflow-y: auto; }
.bell-list { display: flex; flex-direction: column; }
.bell-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px; text-decoration: none;
  color: var(--muted); font-size: 13.5px;
}
.bell-item:hover { background: rgba(56, 224, 210, 0.07); }
.bell-item.unread { background: rgba(91, 157, 255, 0.07); }
.bell-item .avatar { width: 34px; height: 34px; font-size: 12px; flex: none; }
.bell-item b { color: var(--text); font-weight: 600; }
.bell-item em { display: block; font-style: normal; font-size: 11.5px; color: var(--faint); }

.search-form {
  margin-top: 22px; display: flex; align-items: center; gap: 12px;
  max-width: 560px; padding: 6px 6px 6px 16px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--faint);
}
.search-form input {
  flex: 1; background: none; border: 0; padding: 10px 4px; font-size: 16px;
}
.search-form input:focus { outline: none; box-shadow: none; border: 0; }

.search-people { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  text-decoration: none; color: inherit;
}
.person-card .avatar { width: 46px; height: 46px; font-size: 15px; flex: none; }
.person-card b { display: block; font-family: var(--font-display); font-size: 15.5px; color: var(--text); }
.person-card span { font-size: 12.5px; color: var(--faint); }

.doc-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 9px 16px; border-radius: 10px;
  background: rgba(91, 157, 255, 0.08); border: 1px solid rgba(91, 157, 255, 0.3);
  color: var(--blue); text-decoration: none; font-size: 13.5px; font-weight: 600;
  max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.doc-chip:hover { border-color: var(--blue); }

.profile-follow-btn { position: absolute; top: 162px; right: 22px; }
.profile-card .profile-edit-btn { right: 22px; }

@media (max-width: 640px) {
  .profile-follow-btn { top: 156px; right: 14px; }
  .bell-menu { position: fixed; left: 12px; right: 12px; top: calc(64px + env(safe-area-inset-top, 0px)); min-width: 0; }
}

/* ================= LinkedIn-style mobile top bar + 5-tab bottom nav ================= */

.m-topbar { display: none; }
.profile-actions { position: absolute; top: 162px; right: 22px; display: flex; gap: 10px; }
.nav-msg-link { position: relative; }

@media (max-width: 640px) {
  .brand { display: none; }
  .m-topbar { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
  .m-me { width: 34px; height: 34px; flex: none; color: var(--muted); text-decoration: none; }
  .m-search {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
    padding: 9px 15px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line);
    color: var(--faint); font-size: 14px; text-decoration: none;
  }
  .m-msg { position: relative; flex: none; }
  #bellBtn { display: none; }
  .profile-actions { top: 156px; right: 14px; }
}

.bottom-nav .post-fab {
  width: 40px; height: 40px; border-radius: 13px; margin-bottom: 1px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(120deg, var(--blue), var(--cyan));
  color: #051329;
  box-shadow: 0 6px 18px -6px rgba(56, 224, 210, 0.55);
}
.bottom-nav .bottom-bell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  flex: 1; min-height: 48px; padding: 4px 6px; border-radius: 12px;
  background: none; border: 0; cursor: pointer;
  color: var(--faint); font-family: var(--font-body);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
}
.bell-anchor { position: relative; display: inline-flex; }
.bell-anchor .bell-badge { top: -5px; right: -9px; }

/* ================= messages / chat ================= */

.threads-list { display: flex; flex-direction: column; gap: 12px; }
.thread-row {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  text-decoration: none; color: inherit;
}
.thread-row:hover { transform: none; border-color: var(--line-strong); }
.thread-row.unread { border-color: rgba(91, 157, 255, 0.45); }
.thread-row .avatar { width: 46px; height: 46px; font-size: 15px; flex: none; }
.thread-mid { flex: 1; min-width: 0; }
.thread-mid b { display: block; font-family: var(--font-display); font-size: 15.5px; color: var(--text); }
.thread-mid span {
  display: block; font-size: 13px; color: var(--faint);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.thread-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.thread-side em { font-style: normal; font-size: 11.5px; color: var(--faint); }
.thread-badge { position: static; }

.chat-section { padding-top: 24px; padding-bottom: 24px; }
.chat-shell { display: flex; flex-direction: column; height: calc(100dvh - 200px); min-height: 380px; }
.chat-head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; margin-bottom: 12px; }
.chat-head:hover { transform: none; }
.chat-partner { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.chat-partner .avatar { width: 40px; height: 40px; font-size: 13px; flex: none; }
.chat-partner b { display: block; font-family: var(--font-display); font-size: 15.5px; color: var(--text); }
.chat-partner em { font-style: normal; font-size: 12px; color: var(--faint); }
.chat-list {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-list:hover { transform: none; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-bubble {
  padding: 9px 14px; border-radius: 14px 14px 14px 4px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 14.5px; color: var(--text);
}
.chat-msg.mine .chat-bubble {
  border-radius: 14px 14px 4px 14px;
  background: rgba(91, 157, 255, 0.14); border-color: rgba(91, 157, 255, 0.35);
}
.chat-msg em { font-style: normal; font-size: 10.5px; color: var(--faint); margin-top: 3px; }
.chat-form { display: flex; gap: 10px; margin-top: 12px; }
.chat-form input { flex: 1; border-radius: 999px; padding: 12px 18px; }

@media (max-width: 640px) {
  .chat-shell { height: calc(100dvh - 220px); }
}

/* ================= phone-style post media + autoplay ================= */

.post-image, .post-video {
  display: block; width: 100%;
  margin-top: 14px;
  border-radius: 14px;
  background: #000;
  border: 1px solid var(--line);
  object-fit: contain;
  max-height: 580px;
}

@media (max-width: 640px) {
  .post-image, .post-video { max-height: 72vh; border-radius: 12px; }
}

/* ================= composer responsive fix + chromeless video ================= */

.composer-top form { min-width: 0; }
.composer textarea { width: 100%; min-width: 0; }
.composer-actions { flex-wrap: wrap; justify-content: flex-start; row-gap: 10px; }
.composer-actions .btn { margin-left: auto; }
.attach-btn {
  flex: 0 1 auto; min-width: 0; max-width: 150px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.attach-btn span { overflow: hidden; text-overflow: ellipsis; }
.post-card, .composer { overflow: hidden; }
.comment-form .comment-input { min-width: 0; }

.video-wrap { position: relative; margin-top: 14px; }
.video-wrap .post-video { margin-top: 0; cursor: pointer; }
.mute-btn {
  position: absolute; right: 12px; bottom: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 13, 28, 0.75); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25); cursor: pointer;
  backdrop-filter: blur(6px);
}
.mute-btn:hover { background: rgba(6, 13, 28, 0.9); }

@media (max-width: 640px) {
  .attach-btn { max-width: 118px; padding: 8px 10px; font-size: 12.5px; }
  .composer-actions { gap: 8px; }
  .composer-actions .btn { flex: 1 1 100%; margin-left: 0; }
}

/* ================= document viewer (paged PDF/PPT, LinkedIn-style) ================= */

.doc-viewer { position: relative; margin-top: 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0a0a0a; }
.doc-pages {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.doc-pages::-webkit-scrollbar { display: none; }
.doc-pages img {
  flex: 0 0 100%; width: 100%; scroll-snap-align: start;
  max-height: 560px; object-fit: contain; background: #0a0a0a; display: block;
}
.doc-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 13, 28, 0.68); color: #fff; border: 1px solid rgba(255,255,255,0.22);
  font-size: 20px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px);
}
.doc-nav:hover { background: rgba(6, 13, 28, 0.88); }
.doc-prev { left: 10px; }
.doc-next { right: 10px; }
.doc-counter {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(6, 13, 28, 0.68); color: #fff; font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; backdrop-filter: blur(6px);
}
.doc-viewer-foot {
  display: flex; align-items: center; gap: 9px; padding: 10px 14px;
  background: var(--card); border-top: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600;
}
.doc-viewer-foot span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-viewer-foot:hover { color: var(--cyan); }
.doc-kind-badge {
  flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(91, 157, 255, 0.12); color: var(--blue); border: 1px solid rgba(91, 157, 255, 0.3);
}

@media (max-width: 640px) {
  .doc-pages img { max-height: 68vh; }
  .doc-nav { width: 30px; height: 30px; }
}

/* ================= mobile: fixed viewport, no pinch/double-tap zoom ================= */

/* pan-x/pan-y excludes pinch-zoom; this is the authoritative rule (touch-action is the
   intersection of an element's value and its ancestors', so descendants can't re-enable zoom) */
html, body { touch-action: pan-x pan-y; }
