/* ═══════════════════════════════════════════════
   E-Mothership Professional Profile — Fixed Workspace UI
   ═══════════════════════════════════════════════ */

:root {
  --bg-base: #07080f;
  --bg-surface: #0d0f1c;
  --bg-card: rgba(17, 19, 39, 0.92);
  --bg-card-hover: #161931;
  --bg-alt: rgba(10, 12, 24, 0.85);
  --border: rgba(99, 112, 255, 0.15);
  --border-hover: rgba(99, 112, 255, 0.45);
  --accent-1: #6370ff;
  --accent-2: #a45cff;
  --accent-3: #3de8c8;
  --text-primary: #e8eaf6;
  --text-secondary: #8891b8;
  --text-muted: #4a5080;
  --status-ok: #22d4a0;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 16px 50px rgba(0, 0, 0, 0.38), 0 0 0 1px var(--border);
  --shadow-soft: 0 12px 35px rgba(99, 112, 255, 0.12);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at top right, rgba(164, 92, 255, 0.12), transparent 28%), var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a {
  color: var(--accent-1);
  text-decoration: none;
}

a:hover {
  color: var(--accent-3);
}

strong {
  color: var(--text-primary);
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.app-body main {
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.profile-app {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  height: 100dvh;
}

.workspace-rail {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 24px;
  background: rgba(7, 8, 15, 0.82);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  color: var(--accent-1);
  font-size: 1.5rem;
}

.rail-brand-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.rail-brand-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.rail-intro {
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(99, 112, 255, 0.1), rgba(10, 12, 24, 0.75));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.rail-kicker,
.panel-eyebrow,
.timeline-eyebrow,
.media-kicker {
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.rail-intro p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.rail-tagline {
  margin-top: 12px;
}

.workspace-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workspace-nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
}

.workspace-nav-item:hover {
  border-color: var(--border);
  background: rgba(17, 19, 39, 0.7);
  color: var(--text-primary);
}

.workspace-nav-item.active {
  border-color: var(--border-hover);
  background: linear-gradient(135deg, rgba(99, 112, 255, 0.18), rgba(164, 92, 255, 0.16));
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(99, 112, 255, 0.12);
}

.rail-links {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rail-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.rail-links a:hover {
  color: var(--text-primary);
}

.workspace-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 18px;
  padding: 24px;
  min-width: 0;
}

.content-frame {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 19, 39, 0.9), rgba(13, 15, 28, 0.92));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.content-media {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(99, 112, 255, 0.06), rgba(10, 12, 24, 0.35));
}

.media-shell {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99, 112, 255, 0.2), rgba(164, 92, 255, 0.2));
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.media-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.event-emblem {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.event-emblem .event-mark {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
}

.event-emblem .event-organization {
  font-size: 1rem;
  font-weight: 600;
}

.event-emblem .event-division {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
}

.media-shell.theme-bank .event-emblem {
  background: linear-gradient(155deg, rgba(195, 26, 47, 0.96), rgba(124, 12, 34, 0.98));
}

.media-shell.theme-finance .event-emblem {
  background: linear-gradient(155deg, rgba(171, 41, 34, 0.96), rgba(134, 100, 21, 0.96));
}

.media-shell.theme-builder .event-emblem {
  background: linear-gradient(155deg, rgba(61, 232, 200, 0.28), rgba(25, 53, 92, 0.96));
}

.media-shell.theme-startup .event-emblem {
  background: linear-gradient(155deg, rgba(164, 92, 255, 0.9), rgba(68, 19, 110, 0.96));
}

.media-shell.theme-operations .event-emblem {
  background: linear-gradient(155deg, rgba(50, 94, 218, 0.88), rgba(20, 31, 63, 0.98));
}

.media-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
}

.media-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.content-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 28px 28px 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.12;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.panel-summary {
  color: var(--text-secondary);
  max-width: 760px;
  font-size: 0.98rem;
}

.panel-status {
  flex-shrink: 0;
  border: 1px solid rgba(61, 232, 200, 0.2);
  background: rgba(61, 232, 200, 0.08);
  color: var(--accent-3);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
}

.detail-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.detail-tabs:empty {
  display: none;
  margin-bottom: 0;
}

.detail-tab {
  border: 1px solid var(--border);
  background: rgba(17, 19, 39, 0.72);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.detail-tab.active {
  border-color: var(--border-hover);
  background: linear-gradient(135deg, rgba(99, 112, 255, 0.2), rgba(164, 92, 255, 0.2));
  color: var(--text-primary);
}

.panel-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 10px;
}

.panel-scroll.is-loading {
  opacity: 0.65;
}

.panel-scroll::-webkit-scrollbar,
.timeline-track::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.panel-scroll::-webkit-scrollbar-thumb,
.timeline-track::-webkit-scrollbar-thumb {
  background: rgba(99, 112, 255, 0.22);
  border-radius: 999px;
}

.content-block + .content-block {
  margin-top: 22px;
}

.content-block h1,
.content-block h2,
.content-block h3,
.content-block h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: 10px;
}

.content-block h1 {
  font-size: 1.4rem;
}

.content-block h2 {
  font-size: 1.1rem;
}

.content-block h3,
.content-block h4 {
  font-size: 0.98rem;
}

.content-block p {
  color: var(--text-secondary);
}

.content-block p + p {
  margin-top: 12px;
}

.content-block-title {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.content-block p,
.content-note,
.content-card p,
.capability-card p,
.contact-card p {
  color: var(--text-secondary);
}

.content-block p + p {
  margin-top: 12px;
}

.bullet-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.bullet-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-secondary);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
}

.metric-grid,
.capability-grid,
.contact-grid,
.projects-grid {
  display: grid;
  gap: 16px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.capability-card,
.content-card,
.contact-card,
.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(17, 19, 39, 0.78);
  padding: 18px;
}

.metric-card {
  text-align: center;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-3);
  margin-bottom: 6px;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.capability-grid,
.projects-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.capability-card h3,
.content-card h3,
.project-name,
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 8px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-github-stats {
  display: flex;
  gap: 10px;
}

.github-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.github-stat svg {
  stroke: var(--text-muted);
}

.project-highlight {
  display: inline-flex;
  align-self: flex-start;
  margin: 12px 0;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(61, 232, 200, 0.08);
  border: 1px solid rgba(61, 232, 200, 0.18);
  color: var(--accent-3);
}

.project-tags,
.timeline-track {
  display: flex;
  gap: 10px;
}

.project-tags {
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

.tag,
.mini-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  background: rgba(99, 112, 255, 0.08);
  border: 1px solid rgba(99, 112, 255, 0.14);
  color: var(--text-muted);
}

.content-card-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.content-card-list li {
  color: var(--text-secondary);
}

.contact-card a {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
}

.timeline-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(13, 15, 28, 0.88);
  box-shadow: var(--shadow-card);
  padding: 16px 18px 18px;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.timeline-head p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.timeline-track {
  overflow-x: auto;
  padding-bottom: 4px;
}

.timeline-item {
  min-width: 180px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(17, 19, 39, 0.76);
  padding: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: 0.2s ease;
}

.timeline-item:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.timeline-item.active {
  border-color: var(--border-hover);
  background: linear-gradient(135deg, rgba(99, 112, 255, 0.16), rgba(164, 92, 255, 0.14));
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(99, 112, 255, 0.1);
}

.timeline-item.current-item .timeline-role {
  color: var(--accent-3);
}

.timeline-period {
  color: var(--accent-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-org {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(13, 15, 28, 0.88);
  box-shadow: var(--shadow-card);
}

.footer-nav-item {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.footer-nav-item.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(99, 112, 255, 0.18), rgba(164, 92, 255, 0.18));
}

.site-footer,
.site-header {
  display: none;
}

@media (max-width: 1080px) {
  .profile-app {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .content-frame {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .profile-app {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100dvh;
  }

  .workspace-rail {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .workspace-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .workspace-stage {
    grid-template-rows: auto auto auto;
    min-height: auto;
  }

  .content-frame {
    grid-template-columns: 1fr;
  }

  .content-media {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .media-shell {
    min-height: 240px;
  }

  .capability-grid,
  .projects-grid,
  .contact-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }
}
