/* ============ Tokens (from the original eboniphillips.com palette) ============ */
:root {
  --bg: #000;
  --ink: #fff;
  --ink-soft: rgba(255, 255, 255, 0.72);
  --ink-faint: rgba(255, 255, 255, 0.14);
  --blush: #ffdded;
  --silver: #d6dee4;
  --blush-ink: #1a0b12;
  --navy: #000624;
  --blue: #1d9bf0;
  --hot: #ff2da0;
  --teal: #4fd8e6;
  --accent: var(--blush);
  --glass: rgba(10, 10, 14, 0.55);
  --radius: 18px;
  --serif: 'Lora', Georgia, serif;
  --display: 'Lora', Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
}
.theme-martnae { --accent: var(--hot); }
.theme-empire { --accent: var(--teal); --display: 'Cinzel', 'Lora', serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ WebGL stage ============ */
.stage {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; pointer-events: none;
}
.stage.interactive { pointer-events: auto; }
.no-webgl .stage { display: none; }
.no-webgl body, body.no-webgl {
  background: radial-gradient(ellipse at 50% 20%, #2a0a1c 0%, #000 60%);
}
main, .site-footer { position: relative; z-index: 1; }

/* ============ Nav ============ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0));
  transition: background 0.3s;
}
.site-nav.scrolled { background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid var(--ink-faint); }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 15px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--ink-faint); }
.nav-links a[aria-current='page'] { background: var(--accent); color: #000; }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink-faint); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 62px 12px auto 12px; flex-direction: column; padding: 10px;
    background: rgba(0,0,0,0.92); border: 1px solid var(--ink-faint); border-radius: var(--radius);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: 0.25s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 16px; }
}

/* ============ Layout ============ */
.section { padding: clamp(72px, 12vh, 140px) var(--gutter); }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.eyebrow { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 16px; }
h2 { font-size: clamp(30px, 5vw, 52px); }
h3 { font-size: 22px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 680px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ============ Hero ============ */
.hero {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: 110px var(--gutter) 60px; position: relative;
}
.hero-inner { max-width: 820px; }
.hero .avatar {
  width: 148px; height: 148px; border-radius: 50%; object-fit: cover; margin: 0 auto 22px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 0 0 8px rgba(255, 221, 237, 0.08), 0 0 60px rgba(255, 45, 160, 0.45);
}
.hero h1 { font-size: clamp(40px, 8vw, 92px); }
.verified { display: inline-block; width: 0.42em; height: 0.42em; vertical-align: 0.5em; margin-left: 0.1em; }
.scroll-cue {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--ink-soft); border-radius: 14px;
}
.scroll-cue::after {
  content: ''; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--ink); animation: cue 1.8s infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ============ Marquee ============ */
.marquee { overflow: hidden; white-space: nowrap; padding: 18px 0; border-block: 1px solid var(--ink-faint); background: rgba(0,0,0,0.5); }
.marquee-track { display: inline-flex; gap: 36px; animation: marquee 38s linear infinite; font-size: clamp(28px, 5vw, 56px); font-weight: 700; }
.marquee-track span.star { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Socials ============ */
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--ink-faint);
  transition: transform 0.2s, background 0.2s;
}
.socials a:hover { transform: translateY(-3px) scale(1.08); background: var(--accent); }
.socials a:hover .icon { background: #000; }
.icon {
  display: inline-block; width: 20px; height: 20px; background: var(--ink);
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat;
}

/* ============ Cards ============ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 36px; }
.card {
  position: relative; display: flex; gap: 16px; align-items: flex-start;
  padding: 22px; border-radius: var(--radius); text-decoration: none;
  background: var(--blush); color: var(--blush-ink);
  transform-style: preserve-3d; transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.card h3 { font-size: 19px; margin: 0 0 4px; }
.card p { margin: 0; font-size: 15px; line-height: 1.5; opacity: 0.85; }
a.card:hover, button.card:hover { box-shadow: 0 20px 50px rgba(255, 45, 160, 0.28); }
button.card { border: 0; text-align: left; cursor: pointer; width: 100%; }
.card .mono {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #000; color: var(--blush); font-weight: 700; font-size: 17px; letter-spacing: -0.04em;
  transform: translateZ(30px);
}
.card .arrow { margin-left: auto; align-self: center; font-size: 20px; transition: transform 0.2s; }
a.card:hover .arrow { transform: translateX(4px); }

.card.dark {
  background: var(--glass); color: var(--ink); border: 1px solid var(--ink-faint);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card.dark .mono { background: var(--accent); color: #000; }
.card.dark p { color: var(--ink-soft); opacity: 1; }

/* ============ Accordion ============ */
.acc { margin-top: 36px; display: grid; gap: 12px; }
.acc details {
  border-radius: var(--radius); background: var(--glass); border: 1px solid var(--ink-faint);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden;
}
.acc summary {
  list-style: none; cursor: pointer; padding: 20px 22px; display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 19px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; margin-left: auto; font-size: 24px; color: var(--accent); transition: transform 0.25s; }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc .acc-body { padding: 0 22px 22px; color: var(--ink-soft); }

/* ============ Skills orb ============ */
.skills-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .skills-wrap { grid-template-columns: 1fr; } }
.tag-sphere { position: relative; width: min(460px, 100%); aspect-ratio: 1; margin: 0 auto; cursor: grab; touch-action: pan-y; }
.tag-sphere span {
  position: absolute; left: 50%; top: 50%; white-space: nowrap; font-weight: 600;
  transform-origin: center; will-change: transform, opacity; user-select: none;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chip-list li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ink-faint); font-size: 14px; color: var(--ink-soft); }

/* ============ Portals (home) ============ */
.portals { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
@media (max-width: 760px) { .portals { grid-template-columns: 1fr; } }
.portal {
  position: relative; min-height: 340px; border-radius: 26px; overflow: hidden; text-decoration: none;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
  border: 1px solid var(--ink-faint); transform-style: preserve-3d; transition: transform 0.3s, box-shadow 0.3s;
}
.portal canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.portal > *:not(canvas) { position: relative; z-index: 1; }
.portal h3 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 6px; }
.portal p { margin: 0; color: var(--ink-soft); }
.portal.pink { background: radial-gradient(circle at 50% 35%, #4a0730 0%, #0c0008 70%); }
.portal.pink:hover { box-shadow: 0 0 70px rgba(255, 45, 160, 0.45); }
.portal.pink h3 { color: var(--hot); text-shadow: 0 0 18px rgba(255,45,160,0.8); }
.portal.teal { background: radial-gradient(circle at 50% 35%, #06303a 0%, #00050a 70%); }
.portal.teal:hover { box-shadow: 0 0 70px rgba(79, 216, 230, 0.4); }
.portal.teal h3 { color: var(--teal); font-family: 'Cinzel', serif; text-shadow: 0 0 18px rgba(79,216,230,0.6); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px;
  background: var(--accent); color: #000; text-decoration: none; font-weight: 700; border: 0; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink-faint); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.center .btn-row { justify-content: center; }

/* ============ Live hub (Martnae) ============ */
.live-hub { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; margin-top: 34px; }
@media (max-width: 980px) { .live-hub { grid-template-columns: 1fr; } }
.panel {
  border-radius: var(--radius); background: rgba(8, 0, 6, 0.72); border: 1px solid rgba(255, 45, 160, 0.28);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden;
}
.platform-tabs { display: flex; gap: 6px; padding: 10px; overflow-x: auto; border-bottom: 1px solid var(--ink-faint); scrollbar-width: none; }
.platform-tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--ink-faint); background: transparent; cursor: pointer; font-size: 15px; transition: 0.2s;
}
.platform-tabs button .icon { width: 16px; height: 16px; }
.platform-tabs button[aria-selected='true'] { background: var(--hot); border-color: var(--hot); color: #000; }
.platform-tabs button[aria-selected='true'] .icon { background: #000; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #666; }
.live-dot.on { background: #ff3b3b; box-shadow: 0 0 0 0 rgba(255,59,59,0.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,59,59,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,59,0); } }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-note {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(circle, #2b0419 0%, #000 75%);
}
.player-note p { margin: 0 0 16px; color: var(--ink-soft); }
.player-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; font-size: 15px; color: var(--ink-soft); }
.player-bar .btn { padding: 8px 16px; font-size: 14px; margin-left: auto; }
.chat-panel { display: flex; flex-direction: column; min-height: 420px; }
.chat-panel iframe { flex: 1; width: 100%; border: 0; min-height: 420px; }
.panel-head { padding: 14px 16px; border-bottom: 1px solid var(--ink-faint); font-weight: 700; display: flex; align-items: center; gap: 10px; }

.status-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--ink-faint); background: rgba(0,0,0,0.5); font-size: 14px; text-decoration: none;
}
.status-pill .icon { width: 15px; height: 15px; }

.feed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 34px; }
.feed-grid .panel iframe { width: 100%; border: 0; display: block; }
.tiktok-box { padding: 12px; min-height: 480px; display: grid; place-items: center; }
.tiktok-box blockquote { margin: 0 !important; }

/* 3D carousel */
.carousel { position: relative; height: 460px; perspective: 1400px; margin-top: 30px; touch-action: pan-y; cursor: grab; }
.carousel-ring { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; }
.carousel-ring figure {
  position: absolute; margin: 0; width: 220px; height: 320px; left: -110px; top: -160px;
  border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,45,160,0.4);
  box-shadow: 0 0 30px rgba(255,45,160,0.25); backface-visibility: hidden; background: #111;
}
.carousel-ring img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
@media (max-width: 600px) {
  .carousel { height: 360px; }
  .carousel-ring figure { width: 160px; height: 230px; left: -80px; top: -115px; }
}

/* Donate */
.donate { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.donate a { min-width: 86px; justify-content: center; }

/* ============ Diamond Empire ============ */
.theme-empire .hero h1 {
  font-family: 'Cinzel', serif; font-weight: 500; color: var(--teal); letter-spacing: 0.02em;
  text-shadow: 0 0 24px rgba(79, 216, 230, 0.55), 0 2px 0 rgba(0,0,0,0.6);
}
.theme-empire .card .mono { background: #000; color: var(--teal); }
.theme-empire a.card:hover { box-shadow: 0 20px 50px rgba(79, 216, 230, 0.3); }
.theme-empire .panel { border-color: rgba(79, 216, 230, 0.28); background: rgba(0, 8, 12, 0.7); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 36px; }
.shop-card { padding: 28px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; text-decoration: none; transition: transform 0.25s, box-shadow 0.25s; }
.shop-card .num { font-family: 'Cinzel', serif; color: var(--teal); font-size: 14px; letter-spacing: 0.2em; }
.shop-card h3 { font-family: 'Cinzel', serif; font-size: 26px; margin: 0; }
.shop-card p { color: var(--ink-soft); margin: 0; flex: 1; }
.shop-card .btn { align-self: flex-start; }
.shop-card:hover { box-shadow: 0 0 60px rgba(79, 216, 230, 0.22); }

/* ============ Footer ============ */
.site-footer { padding: 50px var(--gutter) 40px; text-align: center; border-top: 1px solid var(--ink-faint); background: rgba(0,0,0,0.8); font-size: 14px; color: var(--ink-soft); }
.site-footer a { color: var(--ink); }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(40px) rotateX(8deg); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.7,.2,1); transform-origin: top center; }
.reveal.in { opacity: 1; transform: none; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; z-index: 60;
  background: var(--blush); color: var(--blush-ink); padding: 12px 20px; border-radius: 999px; font-weight: 600; transition: 0.3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .scroll-cue::after, .live-dot.on { animation: none; }
}
.reveal.in[data-tilt] { transition: opacity 0.9s ease, transform 0.25s ease, box-shadow 0.25s ease; }
.hero-inner { position: relative; }
.hero-inner::before {
  content: ''; position: absolute; inset: -40px 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,0.65), rgba(0,0,0,0));
}
.hero .lead { text-shadow: 0 1px 12px rgba(0,0,0,0.9); color: rgba(255,255,255,0.86); }
[hidden] { display: none !important; }
.logo-fallback {
  position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-78%); margin: 0; text-align: center; z-index: -1;
  font-family: 'Lora', serif; font-weight: 700; font-size: clamp(56px, 15vw, 190px); letter-spacing: 0.02em;
  color: #ff5cb8; text-shadow: 0 0 12px #ff2da0, 0 0 40px #ff2da0, 0 0 90px #b0006a; transition: opacity 1.2s ease;
}
.logo-fallback.gone { opacity: 0; }
.no-webgl .logo-fallback { position: absolute; top: 8vh; transform: none; }
.wrap > [data-socials] .socials { justify-content: flex-start; }
.stage { opacity: 0; transition: opacity 1.4s ease; }
.stage.ready { opacity: 1; }
.portal canvas { opacity: 0; transition: opacity 1s ease; }
.portal canvas.ready { opacity: 1; }
.card > span:not(.mono):not(.arrow) { min-width: 0; overflow-wrap: anywhere; }
.portal::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 38%, rgba(0,0,0,0) 65%);
}
.section .lead, .section h2 { text-shadow: 0 2px 14px rgba(0,0,0,0.85); }

/* ============ Modal ============ */
.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.25s; }
.modal-panel {
  position: relative; width: min(960px, 100%); max-height: calc(100svh - 32px); overflow: auto;
  background: #0b0b10; border: 1px solid var(--ink-faint); border-radius: 22px; padding: 28px;
  transform: translateY(24px) scale(0.97); opacity: 0; transition: transform 0.3s cubic-bezier(.2,.8,.2,1), opacity 0.25s; outline: none;
}
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-panel { transform: none; opacity: 1; }
.modal-close {
  position: sticky; top: 0; float: right; margin: -12px -12px 0 0; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--ink-faint); background: rgba(0,0,0,0.7); cursor: pointer; font-size: 16px;
}
.modal-close:hover { background: var(--accent); color: #000; }
@media (max-width: 600px) { .modal-panel { padding: 20px 16px; border-radius: 18px; } }

.confetti {
  position: fixed; z-index: 90; width: 8px; height: 12px; border-radius: 2px; pointer-events: none;
  animation: confetti 0.9s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes confetti { to { transform: translate(var(--dx), calc(var(--dy) + 140px)) rotate(var(--r)); opacity: 0; } }
.hand { font-family: 'Caveat', 'Lora', cursive; }

/* ---------- Room dock ---------- */
.room-dock {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40;
  display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(8, 4, 10, 0.82); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.room-dock a {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-size: 14px; white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.room-dock a:hover { background: rgba(255,255,255,0.08); }
.room-dock a.active { background: var(--accent); color: #000; }
@media (max-width: 640px) {
  .room-dock a { padding: 9px 11px; font-size: 18px; }
  .room-dock a span { display: none; }
}
.site-footer { padding-bottom: 96px; }


/* ============ Home: orb hint, business card, lenses ============ */
.orb-hint { font-family: 'Caveat', cursive; font-size: 22px; color: var(--blush); margin: 12px 0 0; opacity: 0.85; }
.connect-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 40px; }
@media (max-width: 900px) { .connect-wrap { grid-template-columns: 1fr; } }
.bcard-stage { perspective: 1400px; display: grid; place-items: center; padding: 20px 0; }
.bcard {
  position: relative; width: min(460px, 100%); aspect-ratio: 1.75; transform-style: preserve-3d; cursor: grab; touch-action: pan-y;
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1); outline: none;
}
.bcard.dragging { transition: none; cursor: grabbing; }
.bcard:focus-visible { outline: 2px solid var(--blush); outline-offset: 6px; border-radius: 20px; }
.bcard-face {
  position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 60px rgba(255,45,160,0.2);
}
.bcard-front {
  display: flex; align-items: center; gap: 20px; padding: 26px 30px; color: var(--blush-ink);
  background: radial-gradient(circle at 85% 15%, #fff 0%, transparent 40%), linear-gradient(135deg, #ffdded, #ffc2df 60%, #ffb0d4);
}
.bcard-front::after { /* foil shine */
  content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.55) 45%, transparent 60%);
  background-size: 250% 100%; animation: foil 5s ease-in-out infinite;
}
@keyframes foil { 0%, 100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }
.bcard-mono { position: absolute; top: 18px; right: 22px; font-weight: 700; font-size: 20px; letter-spacing: -0.04em; background: #000; color: var(--blush); padding: 6px 9px; border-radius: 10px; }
.bcard-avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; flex: none; }
.bcard-name { font-size: clamp(22px, 4vw, 30px); font-weight: 700; margin: 0; line-height: 1.1; }
.bcard-title { margin: 6px 0 0; font-size: 15px; }
.bcard-alias { margin: 2px 0 0; font-family: 'Caveat', cursive; font-size: 22px; color: #b0006a; }
.bcard-hint { position: absolute; bottom: 14px; right: 20px; font-size: 12px; opacity: 0.6; }
.bcard-back {
  transform: rotateY(180deg); background: linear-gradient(135deg, #14040d, #000); border: 1px solid rgba(255,221,237,0.3);
  padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: center;
}
.bcard-back-title { grid-column: 1 / -1; margin: 0 0 4px; font-family: 'Caveat', cursive; font-size: 26px; color: var(--blush); }
.bcard-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; text-align: left; cursor: pointer;
  background: rgba(255,221,237,0.08); border: 1px solid rgba(255,221,237,0.18); color: #fff; font-size: 14px; font-weight: 700; min-width: 0;
}
.bcard-row:hover { background: var(--blush); color: #000; }
.bcard-row small { display: block; font-weight: 400; font-size: 12px; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-row span { min-width: 0; }
@media (max-width: 480px) { .bcard-back { grid-template-columns: 1fr; gap: 5px; padding: 12px; } .bcard-row { padding: 6px 10px; } .bcard-row small { display: none; } .bcard-back-title { font-size: 20px; } .bcard-avatar { width: 64px; height: 64px; } }
.quick-actions { display: grid; gap: 14px; }
.quick-actions .mono { font-size: 20px; }
.skill-lenses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.skill-lenses button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--ink-faint); background: none; cursor: pointer; font-size: 14px; }
.skill-lenses button[aria-pressed='true'] { background: var(--hot); color: #000; border-color: var(--hot); }
.tiers { flex-wrap: wrap; }
.tiers button { white-space: nowrap; }


/* ============ 3D depth scenes (see initDepth in common.js) ============ */
[data-scene] { transform-style: preserve-3d; will-change: transform; }
[data-scene] > * { transform-style: preserve-3d; }
#quick-actions .card { transform: translateZ(20px); }
#quick-actions .card:hover { transform: translateZ(70px); }


/* Portfolio gallery ring */
.gallery3d { position: relative; height: 460px; margin: 30px 0 20px; perspective: 1400px; cursor: grab; touch-action: pan-y; overflow: hidden; }
.g-floor { position: absolute; left: 10%; right: 10%; bottom: 20px; height: 160px; background: radial-gradient(ellipse at center, rgba(255,45,160,0.25), transparent 70%); transform: rotateX(75deg); }
.g-ring { position: absolute; left: 50%; top: 45%; transform-style: preserve-3d; }
.g-frame {
  position: absolute; width: 280px; left: -140px; top: -130px; padding: 12px 12px 10px; border-radius: 6px; text-decoration: none;
  background: linear-gradient(#22282c, #0c0f11); box-shadow: 0 0 0 3px #d6dee4, 0 20px 40px rgba(0,0,0,0.6); backface-visibility: hidden;
  transition: box-shadow 0.3s;
}
.g-frame:hover { box-shadow: 0 0 0 3px #fff, 0 0 40px rgba(255,45,160,0.6); }
.g-art { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.g-art img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.g-label { display: block; margin-top: 8px; text-align: center; font-family: 'Cinzel', serif; font-size: 14px; color: #f6ecd8; }
@media (max-width: 700px) { .gallery3d { height: 360px; } .g-frame { width: 200px; left: -100px; top: -100px; } }



/* ============ Home: the two worlds, stacked ============ */
.world { position: relative; min-height: max(100svh, 680px); overflow: hidden; isolation: isolate; }
.world-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s; }
.world-canvas.ready { opacity: 1; }
.world .k-tip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; max-width: 240px; padding: 10px 14px; border-radius: 12px;
  background: rgba(8, 4, 10, 0.92); border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.world .k-tip b { display: block; font-size: 16px; line-height: 1.2; }
.world .k-tip span { font-size: 13px; color: var(--ink-soft); }

/* Martnae */
.world-martnae { background: linear-gradient(#050008, #2a0424 55%, #8a1257 62%, #0a0010 63%); }
.world-martnae .k-tip { border-color: rgba(255,45,160,0.5); }
.world-martnae .k-tip b { color: var(--blush); font-family: 'Press Start 2P', monospace; font-size: 11px; line-height: 1.6; }
.mw-hud { position: relative; z-index: 2; min-height: inherit; display: grid; grid-template-rows: auto 1fr auto; padding: 96px var(--gutter) 30px; pointer-events: none; }
.mw-hud a, .mw-hud button { pointer-events: auto; }
.mw-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mw-copy { align-self: center; max-width: 520px; display: grid; gap: 12px; justify-items: start; }
.mw-kicker { margin: 0; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--blush); }
.mw-title {
  margin: 0; font-family: 'Press Start 2P', monospace; font-size: clamp(34px, 6vw, 70px); line-height: 1; color: #ffdded; letter-spacing: 0.02em;
  text-shadow: 0 0 6px #ff2da0, 0 0 22px #ff2da0, 0 0 60px rgba(255,45,160,0.7), 4px 4px 0 #6a0a42;
}
.mw-sub { margin: 0; color: rgba(255,255,255,0.85); font-size: 17px; }
.mw-hint { margin: 6px 0 0; padding: 6px 8px; border-radius: 6px; background: rgba(0,0,0,0.55); font-family: 'Press Start 2P', monospace; font-size: 10px; color: #4fd8e6; animation: blink 1.6s steps(1) infinite; }
.mw-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.mw-menu a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-size: 15px;
  background: rgba(10, 0, 12, 0.6); border: 1px solid rgba(255,45,160,0.3); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: 0.2s;
}
.mw-menu b {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; color: #1a0612; font-family: 'Lora', serif;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25);
}
.mw-menu a[data-btn='A'] b { background: #ff2da0; } .mw-menu a[data-btn='B'] b { background: #4fd8e6; }
.mw-menu a[data-btn='X'] b { background: #b57bff; } .mw-menu a[data-btn='Y'] b { background: #ffdded; }
.mw-menu a:hover, .mw-menu a.hot { border-color: var(--hot); background: rgba(255,45,160,0.18); transform: translateX(4px); }
.world-martnae .ps-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,0.6); color: #aaa; font-family: 'Press Start 2P', monospace; font-size: 10px; }
.world-martnae .ps-status i { width: 8px; height: 8px; border-radius: 50%; background: #666; }
.world-martnae .ps-status b { font-weight: 400; }
.world-martnae .ps-status.on { color: #fff; background: #ff3b5c; }
.world-martnae .ps-status.on i { background: #fff; animation: blink 1.2s steps(1) infinite; }
.world-martnae .ps-inventory { display: flex; gap: 8px; }
.world-martnae .ps-slot {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,0,0,0.55);
  border: 2px solid #4a1a36; transition: transform 0.2s, border-color 0.2s;
}
.world-martnae .ps-slot .icon { width: 20px; height: 20px; }
.world-martnae .ps-slot:hover { transform: translateY(-4px); border-color: var(--hot); }
.world-martnae .ps-clip {
  justify-self: start; display: flex; gap: 12px; align-items: center; max-width: 380px; padding: 8px; border-radius: 12px; text-decoration: none;
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.world-martnae .ps-clip img { width: 110px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.world-martnae .ps-clip span { font-size: 14px; }
.world-martnae .ps-clip small { display: block; font-family: 'Press Start 2P', monospace; font-size: 8px; color: #4fd8e6; margin-bottom: 4px; }
.world-martnae .ps-start {
  margin-top: 6px; padding: 14px 24px; border-radius: 12px; text-decoration: none; font-family: 'Press Start 2P', monospace; font-size: 12px;
  background: var(--hot); color: #000; box-shadow: 0 6px 0 #7a0a4a, 0 0 30px rgba(255,45,160,0.5); transition: transform 0.1s, box-shadow 0.1s;
}
.world-martnae .ps-start span { animation: blink 1s steps(1) infinite; }
.world-martnae .ps-start:hover { transform: translateY(2px); box-shadow: 0 4px 0 #7a0a4a, 0 0 40px rgba(255,45,160,0.8); }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 899px) {
  .mw-copy { align-self: end; justify-items: center; text-align: center; margin: 44svh auto 0; }
  .mw-hint { display: none; }
  .world-martnae .ps-clip { justify-self: center; margin-top: 16px; }
}
@media (max-width: 420px) { .mw-menu { grid-template-columns: 1fr; } .world-martnae .ps-slot { width: 36px; height: 36px; } }

/* The Diamond Empire */
.world-empire { background: radial-gradient(ellipse at 60% 40%, #0e1a1e, #05080a 70%); border-top: 1px solid rgba(214,222,228,0.2); }
.world-empire .k-tip { border-color: rgba(214,222,228,0.45); background: rgba(6, 9, 11, 0.94); }
.world-empire .k-tip b { font-family: 'Cinzel', serif; color: #f4f7f9; }
.ew-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ew-label {
  position: absolute; left: 0; top: 0; pointer-events: auto; padding: 6px 12px; border-radius: 2px; text-decoration: none; white-space: nowrap;
  font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #e9eef1;
  background: rgba(6, 9, 11, 0.7); border: 1px solid rgba(214,222,228,0.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ew-label b { font-weight: 700; }
.ew-label.hot, .ew-label:hover { background: linear-gradient(180deg, #f4f7f9, #aab5bc); color: #0c0f11; border-color: #fff; }
.ew-panel {
  position: absolute; z-index: 3; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(440px, 40vw);
  padding: 34px 30px 26px; text-align: center; border-radius: 4px;
  background: linear-gradient(160deg, rgba(14, 18, 21, 0.9), rgba(4, 6, 8, 0.94));
  border: 1px solid rgba(214,222,228,0.45);
  box-shadow: inset 0 0 0 6px rgba(4,6,8,0.9), inset 0 0 0 7px rgba(214,222,228,0.3), 0 30px 70px rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ew-panel::after { /* slow silver sheen */
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.07) 48%, transparent 60%); background-size: 250% 100%;
  animation: foil 8s ease-in-out infinite;
}
.ew-crest { width: 64px; margin: 0 auto 6px; color: #d6dee4; filter: drop-shadow(0 0 10px rgba(214,222,228,0.6)); }
.ew-kicker { margin: 0; font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: #aab5bc; }
.ew-title {
  margin: 8px 0; font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: 0.04em; line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, #e9eef1 35%, #8e9aa2 58%, #f4f7f9 78%, #5f6b73 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px rgba(214,222,228,0.25));
}
.ew-sub { margin: 0 auto; max-width: 360px; font-style: italic; color: #c9d2d8; font-size: 15px; }
.ew-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 18px; position: relative; padding-top: 20px; }
.ew-kpis::before {
  content: '◆'; position: absolute; top: 0; left: 0; right: 0; text-align: center; font-size: 10px; color: #aab5bc;
  background: linear-gradient(90deg, transparent, #aab5bc 30%, transparent 46%, transparent 54%, #aab5bc 70%, transparent) center / 100% 1px no-repeat;
}
.ew-kpis div { display: flex; flex-direction: column; padding: 12px 6px; border-radius: 2px; background: linear-gradient(180deg, rgba(214,222,228,0.12), rgba(214,222,228,0.03)); border: 1px solid rgba(214,222,228,0.35); }
.ew-kpis dd { margin: 0; font-family: 'Cinzel', serif; font-size: 26px; font-weight: 700; color: #f4f7f9; }
.ew-kpis dt { font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 0.08em; color: #aab5bc; }
.ew-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ew-cta .btn { border-radius: 2px; font-family: 'Cinzel', serif; letter-spacing: 0.06em; font-size: 14px; padding: 12px 18px; color: #0c0f11; background: linear-gradient(180deg, #ffffff, #aab5bc 55%, #6f7b83); box-shadow: 0 6px 20px rgba(214,222,228,0.2); }
.ew-cta .btn.ghost { background: transparent; color: #f4f7f9; border: 1px solid #aab5bc; box-shadow: none; }
.ew-hint { margin: 14px 0 0; font-size: 12px; color: #8e9aa2; }
@media (max-width: 899px) {
  .world-empire { min-height: 0; display: flex; flex-direction: column; }
  .world-empire .world-canvas, .world-empire .ew-labels { position: relative; inset: auto; height: 62svh; min-height: 400px; }
  .world-empire .ew-labels { position: absolute; top: 0; left: 0; right: 0; height: 62svh; min-height: 400px; }
  .ew-panel { position: relative; left: auto; top: auto; transform: none; width: auto; margin: -40px 16px 40px; }
  .ew-label { font-size: 10px; padding: 5px 8px; }
}

/* ============ Degrees: framed certificates on a gallery wall ============ */
.cert-wall { display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 3vw, 40px); padding: 40px var(--gutter) 10px; perspective: 1600px; flex-wrap: wrap; }
.cert-frame {
  --rx: 0deg; --ry: 0deg;
  position: relative; width: min(380px, 100%); padding: 0; border: 0; background: none; color: inherit; cursor: zoom-in; font: inherit;
  transform: rotateY(calc(var(--i) * -9deg + var(--ry))) rotateX(var(--rx)) translateZ(calc(var(--i) * var(--i) * 20px));
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.cert-frame:hover { transform: rotateY(var(--ry)) rotateX(var(--rx)) translateZ(60px); }
.cert-light { position: absolute; left: 20%; right: 20%; top: -30px; height: 10px; border-radius: 6px 6px 2px 2px; background: linear-gradient(#aab5bc, #5f6b73); }
.cert-light::after { content: ''; position: absolute; left: -30%; right: -30%; top: 8px; height: 180px; background: radial-gradient(ellipse at 50% 0%, rgba(255,250,240,0.35), transparent 70%); pointer-events: none; }
.cert-mat {
  display: block; padding: 14px; background: linear-gradient(135deg, #20262a, #0c0f11);
  box-shadow: inset 0 0 0 2px #aab5bc, inset 0 0 0 5px #0c0f11, inset 0 0 0 6px #5f6b73, 0 30px 50px rgba(0,0,0,0.6);
}
.cert-caption { display: block; margin-top: 16px; text-align: center; font-family: 'Cinzel', serif; font-size: 14px; }
.cert-caption small { display: block; margin-top: 4px; font-family: 'Lora', serif; font-size: 13px; color: var(--ink-soft); }

.cert-paper {
  container-type: inline-size; position: relative; aspect-ratio: 11 / 8.5; padding: 3.2cqw; color: #1d2226;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,0.8), transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(160,150,130,0.18), transparent 50%),
    linear-gradient(135deg, #fbf8f1, #efe9dc);
}
.cert-border {
  position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.6cqw;
  padding: 3cqw 5cqw; border: 0.5cqw double #5f6b73; outline: 0.25cqw solid #aab5bc; outline-offset: -1.6cqw;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 1.2cqw, rgba(95,107,115,0.05) 1.2cqw 1.4cqw),
    repeating-conic-gradient(from 0deg at 50% 50%, transparent 0 4deg, rgba(95,107,115,0.03) 4deg 8deg);
}
.cert-school { margin: 0; font-family: 'UnifrakturMaguntia', 'Cinzel', serif; font-size: 7.2cqw; line-height: 1.05; color: #12171a; }
.cert-small { margin: 0; font-family: 'Lora', serif; font-style: italic; font-size: 2.4cqw; line-height: 1.35; color: #3b454c; max-width: 80%; }
.cert-name { margin: 0.4cqw 0; font-family: 'Pinyon Script', 'Caveat', cursive; font-size: 7.6cqw; line-height: 1.1; color: #0e1316; }
.cert-degree { margin: 0; font-family: 'UnifrakturMaguntia', 'Cinzel', serif; font-size: 5.2cqw; line-height: 1.1; }
.cert-field { margin: 0; font-family: 'Cinzel', serif; font-size: 2.8cqw; font-weight: 700; letter-spacing: 0.04em; max-width: 90%; }
.cert-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 3cqw; width: 100%; margin-top: 1.4cqw; }
.cert-sign { flex: 1; font-family: 'Cinzel', serif; font-size: 1.9cqw; letter-spacing: 0.08em; color: #3b454c; }
.cert-sign i { display: block; height: 1px; margin-bottom: 0.8cqw; background: #3b454c; }
.cert-seal { flex: none; width: 15cqw; filter: drop-shadow(0 0.4cqw 0.6cqw rgba(0,0,0,0.3)); }
.cert-seal .s1 { fill: #c9d2d8; stroke: #6f7b83; stroke-width: 3; stroke-dasharray: 2 2.4; }
.cert-seal .s2 { fill: none; stroke: #6f7b83; stroke-width: 1.2; }
.cert-seal .s-ring { font-family: 'Cinzel', serif; font-size: 8.6px; letter-spacing: 1.2px; fill: #3b454c; font-weight: 700; }
.cert-seal .s-mono { font-family: 'UnifrakturMaguntia', serif; font-size: 26px; fill: #2a3034; }
.cert-paper.in-progress { background: linear-gradient(135deg, #fbf8f1, #f1ece2); }
.cert-stamp {
  position: absolute; right: 6cqw; top: 8cqw; padding: 0.8cqw 2cqw; transform: rotate(-12deg);
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 2.8cqw; letter-spacing: 0.14em; text-transform: uppercase;
  color: #b0006a; border: 0.45cqw double #b0006a; border-radius: 0.8cqw; opacity: 0.75; mix-blend-mode: multiply;
}
.modal-panel.cert-modal { width: min(1000px, 94vw); max-width: none; background: #0c0f11; padding: 44px 18px 18px; }
.cert-zoom .cert-paper { box-shadow: 0 0 0 2px #aab5bc, 0 30px 60px rgba(0,0,0,0.6); }
@media (max-width: 800px) {
  .cert-frame { transform: rotateX(var(--rx)) rotateY(var(--ry)); }
  .cert-light { display: none; }
}

/* ============ Home: signature name ============ */
.sig-name { display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 6px; }
.sig { width: min(680px, 84vw); height: auto; overflow: visible; }
.sig text {
  font-family: 'Great Vibes', 'Caveat', cursive; font-size: 132px; fill: url(#sig-ink); fill-opacity: 0;
  stroke: #ffdded; stroke-width: 1.3; stroke-dasharray: 1600; stroke-dashoffset: 1600;
  filter: drop-shadow(0 0 14px rgba(255,45,160,0.55));
  animation: sig-draw 3.2s cubic-bezier(.5,.1,.3,1) forwards, sig-fill 1.2s 2.4s ease forwards, sig-glow 4s 3.6s ease-in-out infinite;
}
.sig-name .verified { width: clamp(22px, 3.4vw, 38px); height: auto; flex: none; margin: 0 0 0 -6px; align-self: center; }
@keyframes sig-draw { to { stroke-dashoffset: 0; } }
@keyframes sig-fill { to { fill-opacity: 1; stroke-opacity: 0.25; } }
@keyframes sig-glow { 50% { filter: drop-shadow(0 0 26px rgba(255,45,160,0.9)); } }
@media (prefers-reduced-motion: reduce) { .sig text { animation: none; stroke-dashoffset: 0; fill-opacity: 1; } }
.world-martnae { border-top: 1px solid rgba(255,45,160,0.3); background: linear-gradient(#050008, #1a0220 55%, #0a0010); }

/* Home: white greeting and Home button, pink section labels */
.theme-home .hero .eyebrow { color: #fff; }
.theme-home .section .eyebrow { color: var(--hot); }
.theme-home .nav-links a[aria-current='page'] { background: #fff; color: #000; }
.mw-top { gap: 10px; }
.mw-score { margin-right: auto; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.85); color: #b0006a; font-family: 'Press Start 2P', monospace; font-size: 11px; box-shadow: 0 6px 18px rgba(255,79,163,0.35); }
.mw-score.bump { animation: bump 0.35s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 50% { transform: scale(1.25); } }
.world-martnae { background: linear-gradient(#010003, #12031a 60%, #3a0630); }

/* ============ Rooms: sections you enter (see rooms.js) ============ */
.rv-open { overflow: hidden; }
.rv-open .room-dock { display: none; }
.room-view {
  position: fixed; inset: 0; z-index: 45; display: grid; grid-template-rows: auto 1fr; padding-top: 62px;
  background: var(--bg);
}
.theme-martnae .room-view { background: radial-gradient(ellipse at 50% 0%, #2a0620, #070008 60%); }
.theme-empire .room-view { background: radial-gradient(ellipse at 50% 0%, #0d1a1e, #030607 60%); }
.rv-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter); min-width: 0;
  background: rgba(0,0,0,0.55); border-bottom: 1px solid var(--ink-faint); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.rv-num { flex: none; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--accent); color: #000; }
.rv-title { flex: none; font-family: var(--display); font-size: clamp(16px, 2vw, 22px); }
.rv-tabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.rv-tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 13px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--ink-faint); color: inherit;
}
.rv-tabs button i { font-style: normal; font-weight: 700; opacity: 0.7; }
.rv-tabs button[aria-current='true'] { background: var(--accent); color: #000; border-color: transparent; }
.rv-back { flex: none; padding: 9px 16px; border-radius: 999px; cursor: pointer; font-weight: 700; background: #fff; color: #000; border: 0; }
.rv-body { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.rv-body > .section { min-height: 100%; }
@media (max-width: 760px) {
  .rv-bar { flex-wrap: wrap; row-gap: 8px; }
  .rv-title { flex: 1; }
  .rv-tabs { order: 3; flex-basis: 100%; justify-content: flex-start; }
}

/* Door transitions */
.rv-doors { position: fixed; inset: 0; z-index: 72; pointer-events: none; overflow: hidden; }
.rv-doors i { position: absolute; top: 0; bottom: 0; width: 50.5%; transition: transform 0.5s cubic-bezier(.6,.05,.3,1); }
.rv-doors .l { left: 0; transform: translateX(-101%); }
.rv-doors .r { right: 0; transform: translateX(101%); }
.rv-doors.closed { pointer-events: auto; }
.rv-doors.closed i { transform: none; }
.rv-display { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); opacity: 0; transition: opacity 0.2s; font-family: 'Cinzel', serif; font-weight: 700; font-size: 44px; }
.rv-doors.closed .rv-display:not(:empty) { opacity: 1; transition-delay: 0.35s; }
/* Elevator: brushed steel with a lit floor number */
.rv-doors-elevator i { background: linear-gradient(90deg, #8e9aa2, #e9eef1 30%, #aab5bc 55%, #d6dee4 80%, #7d8a92); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25); }
.rv-doors-elevator i::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 6px); }
.rv-doors-elevator .l { border-right: 2px solid #2a3034; }
.rv-doors-elevator .rv-display { color: #4fd8e6; text-shadow: 0 0 16px #4fd8e6; background: #050506; padding: 4px 22px; border-radius: 8px; border: 1px solid #4fd8e6; }
/* Mansion: tall double doors in blush lacquer with silver handles */
.rv-doors-doors i {
  background:
    linear-gradient(#fff0 0 0) padding-box,
    linear-gradient(160deg, #ffe3ef, #f7b8d4 60%, #e79ac0);
  box-shadow: inset 0 0 0 14px rgba(255,255,255,0.35), inset 0 0 0 16px rgba(176,0,106,0.25), inset 0 0 60px rgba(176,0,106,0.2);
}
.rv-doors-doors i::before { content: ''; position: absolute; left: 12%; right: 12%; top: 10%; height: 36%; border: 3px solid rgba(255,255,255,0.6); border-radius: 12px 12px 4px 4px; }
.rv-doors-doors i::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 10%; height: 36%; border: 3px solid rgba(255,255,255,0.6); border-radius: 4px; }
.rv-doors-doors .l { box-shadow: inset -3px 0 0 rgba(176,0,106,0.35), inset 0 0 60px rgba(176,0,106,0.2); }
.rv-doors-doors .l::after { box-shadow: 0 0 0 0 transparent; }
.rv-doors-doors .rv-display { top: 46%; width: 18px; height: 90px; padding: 0; font-size: 0; border-radius: 10px; background: linear-gradient(#ffffff, #aab5bc); box-shadow: 30px 0 0 0 #d6dee4; opacity: 1; left: calc(50% - 30px); }
@media (prefers-reduced-motion: reduce) { .rv-doors i { transition: none; } }
[data-theme='day'] .rv-bar { background: rgba(255,255,255,0.8); }
[data-theme='day'] .theme-martnae .room-view, [data-theme='day'] .theme-empire .room-view { background: var(--bg); }
.rv-doors-doors:not(.closed) .rv-display { opacity: 0; transition: opacity 0.1s; }

/* ============ Home: the estate ============ */
.estate { background: linear-gradient(#04030a, #140a1c); min-height: max(100svh, 700px); }
.estate .world-canvas { cursor: grab; }
.estate-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.estate-label {
  position: absolute; left: 0; top: 0; pointer-events: auto; padding: 7px 14px; border-radius: 999px; white-space: nowrap; text-decoration: none; cursor: pointer;
  font: inherit; font-size: 14px; color: #fff; background: rgba(8, 6, 12, 0.72); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 35%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 0.2s, color 0.2s;
}
.estate-label b { font-weight: 700; }
.estate-empire b { font-family: 'Cinzel', serif; letter-spacing: 0.04em; }
.estate-martnae b { font-family: 'Great Vibes', cursive; font-size: 24px; font-weight: 400; line-height: 1; }
.estate-label.hot, .estate-label:hover { background: var(--c); color: #000; }
.estate-hud { position: relative; z-index: 3; min-height: inherit; padding: 90px var(--gutter) 28px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; pointer-events: none; }
.estate-hud a, .estate-hud button { pointer-events: auto; }
.estate-copy {
  pointer-events: auto; max-width: 380px; padding: 18px 20px; border-radius: 18px;
  background: rgba(8, 6, 12, 0.66); border: 1px solid rgba(255,255,255,0.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.estate-copy h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 8px; }
.estate-copy .eyebrow { color: var(--hot); margin-bottom: 6px; }
.estate-sub { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.estate-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.estate-menu a { padding: 7px 10px; border-radius: 10px; text-decoration: none; font-size: 13px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); transition: 0.2s; }
.estate-menu a:hover { background: #fff; color: #000; }
.estate-chips { display: flex; gap: 8px; align-items: center; }
.estate .ps-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,0.6); color: #aaa; font-family: 'Press Start 2P', monospace; font-size: 10px; }
.estate .ps-status i { width: 8px; height: 8px; border-radius: 50%; background: #666; }
.estate .ps-status b { font-weight: 400; }
.estate .ps-status.on { color: #fff; background: #ff3b5c; }
.estate .ps-status.on i { background: #fff; animation: blink 1.2s steps(1) infinite; }
.estate .k-tip { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; max-width: 240px; padding: 10px 14px; border-radius: 12px; background: rgba(8,6,12,0.92); border: 1px solid rgba(255,255,255,0.18); }
.estate .k-tip b { display: block; font-size: 15px; }
.estate .k-tip span { font-size: 13px; color: var(--ink-soft); }
.estate-veil { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0; background: radial-gradient(circle, color-mix(in srgb, var(--c, #fff) 60%, #000), #000 70%); transition: opacity 0.45s; }
.estate-veil.on { opacity: 1; }
@media (max-width: 760px) {
  .estate-hud { flex-direction: column-reverse; justify-content: flex-end; padding-top: 80px; }
  .estate-copy { max-width: none; margin-top: auto; }
  .estate-label { font-size: 12px; padding: 5px 10px; }
  .estate-martnae b { font-size: 18px; }
}
[data-theme='day'] .estate-copy { background: rgba(255,255,255,0.86); border-color: var(--line); }
[data-theme='day'] .estate-menu a { background: #fff; border-color: var(--line); color: #2a1622; }
[data-theme='day'] .estate-label { background: rgba(255,255,255,0.9); color: #2a1622; }
[data-theme='day'] .estate .ps-status { background: #fff; color: #2a1622; }

/* Estate pop-up for The Diamond Empire and Martnae */
.estate-popup {
  position: absolute; z-index: 6; right: var(--gutter); top: 50%; transform: translateY(-50%); width: min(400px, calc(100% - 32px)); padding: 22px 22px 18px;
  border-radius: 20px; background: rgba(8, 6, 12, 0.9); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 40px color-mix(in srgb, var(--c) 25%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: ep-in 0.35s cubic-bezier(.2,.8,.2,1);
}
@keyframes ep-in { from { opacity: 0; transform: translateY(-46%); } }
.estate-popup[hidden] { display: none; }
.ep-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: rgba(255,255,255,0.7); font-size: 18px; cursor: pointer; padding: 6px; }
.ep-kicker { margin: 0; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c); }
.estate-popup h3 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 32px); }
.estate-popup-empire h3 { font-family: 'Cinzel', serif; }
.estate-popup-martnae h3 { font-family: 'Great Vibes', cursive; font-weight: 400; font-size: clamp(38px, 4.5vw, 52px); line-height: 1; color: #ffdded; }
.ep-text { margin: 0 0 10px; font-size: 15px; color: var(--ink-soft); }
.estate-popup ul { margin: 0 0 16px; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.estate-popup li::marker { color: var(--c); }
.ep-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-enter { background: var(--c); color: #000; }
@media (max-width: 760px) { .estate-popup { top: auto; bottom: 16px; left: 16px; right: 16px; width: auto; transform: none; } @keyframes ep-in { from { opacity: 0; transform: translateY(12px); } } }
[data-theme='day'] .estate-popup { background: rgba(255,255,255,0.95); }
[data-theme='day'] .estate-popup-martnae h3 { color: #c2185b; }
[data-theme='day'] .ep-x { color: #2a1622; }

/* Touch screens: bigger tap targets for the buttons over 3D scenes and in room bars */
@media (pointer: coarse) {
  .rv-tabs button, .rv-back { min-height: 40px; }
  .estate-label, .estate-menu a, .mansion-doors a, .hq-views .btn, .closet-views .btn, .room-views .btn, .g-hud-right .btn, .mall-hud-right .btn { min-height: 38px; display: inline-flex; align-items: center; }
  .rv-body { touch-action: pan-y; }
}
/* Estate layout: welcome panel along the bottom, badges top right, pop-up opposite its building */
.estate-hud { align-items: flex-end; }
.estate-chips { position: absolute; top: 80px; right: var(--gutter); }
.estate-copy { max-width: 560px; }
.estate-menu { grid-template-columns: repeat(3, 1fr); }
.estate.popup-open .estate-copy { opacity: 0; pointer-events: none; transform: translateY(10px); }
.estate-copy { transition: opacity 0.3s, transform 0.3s; }
.estate-popup.on-left { right: auto; left: var(--gutter); }
@media (max-width: 760px) { .estate-menu { grid-template-columns: 1fr 1fr; } .estate-popup.on-left { left: 16px; } }
/* Estate clock: the visitor's local time and part of the day */
.estate-chips { flex-direction: column; align-items: flex-end; }
.estate-clock { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ec-time { padding: 7px 12px; border-radius: 999px; background: rgba(8,6,12,0.66); border: 1px solid rgba(255,255,255,0.14); font-size: 13px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ec-where { pointer-events: auto; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.2); background: rgba(8,6,12,0.66); color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.ec-where:hover { background: #fff; color: #000; }
[data-theme='day'] .ec-time, [data-theme='day'] .ec-where { background: rgba(255,255,255,0.88); color: #2a1622; border-color: var(--line); }
.estate-popup, .estate-popup .btn, .estate-label, .estate-menu a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 760px) { .estate-chips { top: 70px; } .ec-time { font-size: 12px; } }
/* The bottom menu never runs off a small phone: it scrolls sideways inside itself instead. */
.room-dock { max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
.room-dock::-webkit-scrollbar { display: none; }
.room-dock a { flex: none; }
@media (max-width: 380px) { .room-dock a { padding: 8px 9px; font-size: 16px; } }

/* ---------- Work experience timeline ---------- */
.xp-line { list-style: none; margin: 30px auto 0; padding: 0 var(--gutter); max-width: 860px; position: relative; }
.xp-line::before { content: ''; position: absolute; left: calc(var(--gutter) + 9px); top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--hot), var(--silver) 60%, transparent); opacity: 0.6; }
.xp { position: relative; padding-left: 40px; margin-bottom: 18px; transition-delay: calc(var(--i) * 70ms); }
.xp-dot { position: absolute; left: 2px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--silver); }
.xp-now .xp-dot { border-color: var(--hot); background: var(--hot); box-shadow: 0 0 0 5px rgba(255, 45, 160, 0.18), 0 0 16px var(--hot); }
.xp-card { background: var(--glass); border: 1px solid var(--ink-faint); border-radius: var(--radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color 0.3s, transform 0.3s; }
.xp-card:hover { border-color: rgba(255, 45, 160, 0.45); transform: translateX(4px); }
.xp-card summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative; }
.xp-card summary::-webkit-details-marker { display: none; }
.xp-card h3 { margin: 4px 0 2px; font-size: clamp(18px, 2vw, 22px); }
.xp-when { font-size: 13px; letter-spacing: 0.08em; color: var(--ink-soft); }
.xp-when b { margin-left: 8px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hot); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; }
.xp-org { margin: 0; color: var(--blush); }
.xp-org a { color: inherit; }
.xp-org span { color: var(--ink-soft); font-size: 14px; }
.xp-more { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ink-faint); font-size: 20px; transition: transform 0.3s; }
.xp-card[open] .xp-more { transform: translateY(-50%) rotate(45deg); }
.xp-points { margin: 0; padding: 0 20px 6px 40px; color: var(--ink-soft); line-height: 1.6; }
.xp-points li { margin-bottom: 6px; }
.xp-skills { padding: 6px 20px 18px; margin: 0; }
.xp-skills li { font-size: 13px; }

/* ---------- Services ---------- */
.svc-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(18px, 3vw, 36px); align-items: start; margin-top: 30px; }
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.svc { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--ink-faint); font-weight: 600; transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s; transition-delay: calc(var(--i) * 40ms); }
.svc:hover { border-color: rgba(159, 240, 192, 0.6); box-shadow: 0 10px 30px rgba(159, 240, 192, 0.12); }
.svc-icon { font-size: 28px; }
.svc-info { padding: 22px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--ink-faint); }
.svc-info p { display: flex; gap: 12px; margin: 0 0 16px; color: var(--ink-soft); }
.svc-info b { display: block; color: var(--ink); }
.svc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 820px) { .svc-wrap { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .svc-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } .svc { flex-direction: row; align-items: center; padding: 12px; font-size: 14px; gap: 8px; } .svc-icon { font-size: 20px; } .xp-card summary { padding-right: 48px; } }

[data-theme='day'] :is(.xp-card, .svc, .svc-info) { background: var(--surface, #fff); border-color: var(--line); box-shadow: var(--soft-shadow); }
[data-theme='day'] .xp-org { color: #c2185b; }
[data-theme='day'] .xp-dot { background: #fff; border-color: #9aa3ab; }
[data-theme='day'] .xp-now .xp-dot { background: var(--hot); border-color: var(--hot); }

/* ---------- Education room: certifications and organizations ---------- */
.edu-more { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 40px); margin-top: 40px; align-items: start; }
.lic-list, .org-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lic, .org { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--ink-faint); }
.lic h3, .org h3 { margin: 0 0 4px; font-size: 17px; }
.lic p, .org p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.lic small { color: var(--ink-soft); opacity: 0.8; font-size: 12px; }
.lic a { font-size: 13px; color: var(--teal); margin-left: 6px; }
.lic-seal { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; background: radial-gradient(circle at 35% 30%, #fff, var(--silver) 60%, #8a949c); box-shadow: 0 0 0 3px rgba(214, 222, 228, 0.25); }
.org-badge { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: #fff; background: linear-gradient(135deg, #0b2a1a, #1f7a45); border: 1px solid rgba(255, 255, 255, 0.2); }
.org:first-child .org-badge { background: linear-gradient(135deg, #000624, #1b3a8a); }
.org-role { color: var(--blush) !important; }
@media (max-width: 820px) { .edu-more { grid-template-columns: 1fr; } }
[data-theme='day'] :is(.lic, .org) { background: var(--surface, #fff); border-color: var(--line); box-shadow: var(--soft-shadow); }
[data-theme='day'] .org-role { color: #c2185b !important; }
[data-theme='day'] .lic a { color: #0e7c88; }
