:root {
  --bg: #0b0f17;
  --bg-elevated: #101725;
  --panel: rgba(15, 22, 36, 0.88);
  --panel-strong: rgba(18, 27, 43, 0.96);
  --panel-soft: rgba(20, 31, 48, 0.7);
  --line: rgba(136, 173, 222, 0.18);
  --line-strong: rgba(136, 173, 222, 0.28);
  --text: #e4edf7;
  --muted: #93a4bd;
  --comment: #6d809d;
  --accent: #56c2ff;
  --accent-soft: rgba(86, 194, 255, 0.16);
  --amber: #ffbe6b;
  --green: #72f1b8;
  --rose: #ff7f8a;
  --serif: "Fraunces", "Times New Roman", serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --shadow: 0 30px 80px rgba(2, 6, 15, 0.55);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(86, 194, 255, 0.14), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255, 190, 107, 0.14), transparent 24%),
    linear-gradient(180deg, #09101a 0%, #0b0f17 100%);
  color: var(--text);
  font-family: var(--mono);
  overflow-x: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.7;
}

.ambient-one {
  width: 18rem;
  height: 18rem;
  top: 10%;
  left: -4rem;
  background: rgba(86, 194, 255, 0.08);
}

.ambient-two {
  width: 22rem;
  height: 22rem;
  right: -6rem;
  bottom: 10%;
  background: rgba(255, 190, 107, 0.08);
}

.workspace {
  width: min(1500px, calc(100% - 32px));
  margin: 24px auto;
}

.ide-window {
  background: linear-gradient(180deg, rgba(10, 15, 24, 0.96), rgba(13, 18, 30, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.titlebar,
.panel-shell,
.editor-tabs,
.dashboard-grid,
.tree-grid,
.publication-list,
.cv-preview,
.action-list {
  display: grid;
  gap: 16px;
}

.titlebar {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 24, 39, 0.92);
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.close {
  background: #ff5f57;
}

.minimize {
  background: #febc2e;
}

.maximize {
  background: #28c840;
}

.titlebar-meta,
.titlebar-status {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.workspace-name {
  color: var(--text);
}

.panel-shell {
  grid-template-columns: 240px minmax(0, 1fr) 260px;
  min-height: calc(100vh - 110px);
}

.sidebar,
.inspector {
  background: var(--panel);
  padding: 18px;
  border-right: 1px solid var(--line);
}

.inspector {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.sidebar-group + .sidebar-group,
.inspector-card + .inspector-card {
  margin-top: 20px;
}

.sidebar-label,
.card-label,
.code-comment {
  color: var(--comment);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.explorer-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.explorer-item:hover,
.explorer-item.active {
  background: rgba(86, 194, 255, 0.1);
  color: var(--text);
  transform: translateX(2px);
}

.item-icon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.icon-md {
  background: #56c2ff;
}

.icon-tex {
  background: #72f1b8;
}

.icon-bib {
  background: #ffbe6b;
}

.icon-folder {
  background: #8b9fff;
}

.icon-pdf {
  background: #ff7f8a;
}

.icon-json {
  background: #c7a6ff;
}

.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-pills span,
.hero-badges span,
.paper-tag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
}

.status-card,
.dashboard-card,
.paper-card,
.pipeline-card,
.cv-column,
.inspector-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.status-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
}

.status-card p,
.inspector-card p,
.dashboard-card p,
.paper-card p,
.pipeline-card p,
.pane-body p,
.fact-list,
.timeline {
  color: var(--muted);
  line-height: 1.7;
}

.status-led {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(114, 241, 184, 0.55);
  margin-top: 5px;
}

.editor {
  min-width: 0;
  background: linear-gradient(180deg, rgba(10, 15, 24, 0.88), rgba(11, 16, 27, 0.98));
}

.editor-tabs {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  background: var(--line);
}

.editor-tab {
  padding: 14px 16px;
  background: rgba(14, 21, 34, 0.98);
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.editor-tab.active {
  color: var(--text);
  background: rgba(22, 33, 52, 0.98);
}

.command-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: rgba(9, 14, 23, 0.7);
}

.prompt,
.terminal-value {
  color: var(--accent);
}

.editor-pane {
  display: none;
  padding: 24px;
}

.editor-pane.active {
  display: block;
}

.line-layout {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 22px;
}

.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: start;
}

.line-numbers {
  display: grid;
  gap: 10px;
  color: rgba(147, 164, 189, 0.45);
  text-align: right;
  padding-top: 2px;
  user-select: none;
}

.hero-layout .pane-body {
  max-width: 70ch;
}

.profile-portrait {
  margin: 0;
  display: grid;
  gap: 8px;
}

.profile-portrait img {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.profile-portrait figcaption {
  color: var(--comment);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.pane-body h1,
.pane-body h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.02;
}

.pane-body h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  letter-spacing: -0.04em;
}

.pane-body h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.hero-subtitle {
  font-size: 1.08rem;
  max-width: 56ch;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.body-copy {
  max-width: 60ch;
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 32px;
}

.dashboard-card,
.paper-card,
.pipeline-card,
.cv-column,
.inspector-card {
  padding: 18px;
}


.dashboard-card.wide {
  grid-column: span 2;
}

.fact-list,
.timeline {
  margin: 0;
  padding-left: 18px;
}

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

.cv-preview-secondary,
.cv-preview-tertiary {
  margin-top: 16px;
}

.cv-preview-tertiary {
  grid-template-columns: 1fr;
}

.wide-column {
  grid-column: 1 / -1;
}

.timeline-block {
  display: grid;
  gap: 18px;
}

.timeline-entry + .timeline-entry {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 8px;
}

.timeline-head span {
  color: var(--amber);
  font-size: 0.85rem;
  white-space: nowrap;
}

.latex-block,
.json-block,
.terminal-output {
  margin: 18px 0 0;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(8, 13, 23, 0.75);
}

.json-block {
  overflow-x: auto;
}

.paper-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: start;
}

.paper-head h2,
.pipeline-card h2,
.cv-column h2,
.inspector-card h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.paper-meta {
  color: var(--amber);
  font-size: 0.85rem;
}

.published {
  color: var(--green);
  border-color: rgba(114, 241, 184, 0.3);
}

.review {
  color: var(--amber);
  border-color: rgba(255, 190, 107, 0.3);
}

.draft {
  color: var(--rose);
  border-color: rgba(255, 127, 138, 0.3);
}

.contact-grid {
  display: grid;
  gap: 16px;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list p {
  margin: 0;
}

.contact-list strong {
  color: var(--text);
}

.action-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
}

.action-list a[aria-disabled="true"] {
  opacity: 0.9;
}

.terminal-card {
  background: rgba(8, 13, 23, 0.88);
}

@media (max-width: 1180px) {
  .panel-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .inspector {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .titlebar,
  .panel-shell,
  .dashboard-grid,
  .tree-grid,
  .publication-list,
  .cv-preview {
    grid-template-columns: 1fr;
  }

  .titlebar {
    gap: 12px;
  }

  .titlebar-meta,
  .titlebar-status {
    flex-wrap: wrap;
  }

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

  .dashboard-card.wide {
    grid-column: auto;
  }

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

  .timeline-head {
    flex-direction: column;
    align-items: start;
  }

  .hero-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workspace {
    width: min(100% - 14px, 100%);
    margin: 10px auto;
  }

  .titlebar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .editor-pane,
  .sidebar,
  .inspector {
    padding: 16px;
  }

  .line-layout {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 14px;
  }

  .pane-body h1 {
    font-size: 2.7rem;
  }
}
