:root {
  --bg: #0c0f0c;
  --panel: #15180f;
  --border: #262a24;
  --text: #d8dcd3;
  --muted: #9aa094;
  --dim: #6b7166;
  --bright: #f2f4ee;
  --green: #7ee787;
  --amber: #ffb454;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body {
  padding: 32px 16px 64px;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.term {
  width: 100%;
  max-width: 900px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.term-bar {
  background: var(--panel);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3f37;
  display: inline-block;
}

.term-title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--dim);
}

.term-body {
  padding: 36px 20px 44px;
  font-size: 15px;
  line-height: 1.8;
}

.line-block { margin-bottom: 40px; }
.line-block:last-of-type { margin-bottom: 24px; }

.prompt {
  color: var(--green);
  margin: 0 0 4px;
  word-break: break-word;
}

.path { color: var(--dim); }

.name {
  margin: 6px 0 8px;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 700;
  color: var(--bright);
}

.role {
  margin: 0;
  color: var(--muted);
}

.projects {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.projects a {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  padding: 4px 0;
}

.projects a:hover .proj-name,
.projects a:focus-visible .proj-name { text-decoration: underline; }

.proj-name { color: var(--amber); width: 160px; flex-shrink: 0; }
.proj-desc { color: var(--muted); flex: 1 1 240px; }
.proj-link { color: var(--text); }
.projects a:hover .proj-link,
.projects a:focus-visible .proj-link { color: var(--amber); }

.paper {
  margin: 14px 0 0;
  padding-left: 18px;
  border-left: 2px solid var(--border);
}

.paper-title { margin: 0 0 6px; color: var(--bright); }
.paper-meta { margin: 0; color: var(--dim); font-size: 13px; }

.pdf-embed {
  margin-top: 18px;
  padding-left: 18px;
  border-left: 2px solid transparent;
}

.pdf-embed iframe {
  width: 100%;
  max-width: 620px;
  height: 60vh;
  max-height: 520px;
  border: 1px solid var(--border);
  background: #f2f2ee;
  display: block;
}

.pdf-fallback {
  display: inline-block;
  margin-top: 10px;
  color: var(--amber);
  font-size: 13px;
  text-decoration: none;
}
.pdf-fallback:hover { text-decoration: underline; }

.contact {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact a {
  color: var(--amber);
  text-decoration: none;
}
.contact a:hover { text-decoration: underline; }

.cursor-line { margin: 0; }

.cursor {
  display: inline-block;
  width: 9px;
  height: 18px;
  background: var(--green);
  vertical-align: -3px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 640px) {
  .term-body { padding: 28px 16px 36px; font-size: 14px; }
  .proj-name { width: auto; }
  .projects a { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  .projects a > * { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}
