:root {
  --bg: #0a0e14;
  --bg-2: #0d131c;
  --win: #0f1620;
  --win-bar: #141c28;
  --line: #1e2a39;
  --ink: #d6e2f0;
  --ink-soft: #8498ad;
  --ink-faint: #5a6b7e;
  --green: #5cf2a7;      /* prompt / accent */
  --cyan: #57c7ff;       /* links */
  --amber: #ffcf6b;      /* highlights */
  --mono: 'JetBrains Mono', 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;              /* single screen; panel scrolls internally */
}
a { color: inherit; text-decoration: none; }

/* Animated background: drifting grid + glow */
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(92,242,167,.08), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, rgba(87,199,255,.07), transparent 60%),
    linear-gradient(var(--bg), var(--bg-2));
}
.bg::after {
  content: ""; position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(92,242,167,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92,242,167,.045) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: drift 24s linear infinite;
}
@keyframes drift { to { background-position: 40px 40px, 40px 40px; } }

/* ---------- Terminal window ---------- */
.terminal {
  position: relative; z-index: 1;
  width: min(960px, 100%);
  height: min(680px, calc(100vh - 48px));
  display: flex; flex-direction: column;
  background: var(--win);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(92,242,167,.05);
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--win-bar);
  border-bottom: 1px solid var(--line); flex: none;
}
.dots { display: flex; gap: 7px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: #37414f; }
.dots span:nth-child(1) { background: #ff5f56; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }
.term-title { color: var(--ink-faint); font-size: 13px; flex: 1; text-align: center; }
.term-clock { color: var(--ink-faint); font-size: 12px; min-width: 64px; text-align: right; }

.term-body {
  flex: 1; min-height: 0;
  padding: 26px 30px 24px;
  display: flex; flex-direction: column; gap: 18px;
}

/* ---------- Boot block ---------- */
.boot { flex: none; }
.line { font-size: 14px; margin-bottom: 10px; }
.prompt { color: var(--green); }
.sep, .path { color: var(--cyan); }
.path { color: var(--amber); }
.dollar { color: var(--ink-faint); margin: 0 6px 0 2px; }
.cmd { color: var(--ink); }
.who {
  font-size: clamp(26px, 4.6vw, 46px); font-weight: 700; letter-spacing: -.5px;
  color: #fff; line-height: 1.05; min-height: 1.1em;
}
.who::after { content: "▌"; color: var(--green); animation: blink 1s steps(1) infinite; margin-left: 2px; }
.who.done::after { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tagline { color: var(--ink-soft); font-size: 14px; margin-top: 12px; max-width: 70ch; }
.tagline strong { color: var(--amber); font-weight: 700; }

/* ---------- Menu ---------- */
.menu { display: flex; flex-wrap: wrap; gap: 8px; flex: none; border-top: 1px solid var(--line); padding-top: 16px; }
.menu-item {
  font-family: var(--mono); font-size: 13px; color: var(--ink-soft);
  background: transparent; border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 13px; cursor: pointer; transition: all .15s;
}
.menu-item:hover { color: var(--green); border-color: var(--green); }
.menu-item.active { color: var(--bg); background: var(--green); border-color: var(--green); font-weight: 700; }

/* ---------- Output ---------- */
.output { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; }
.output::-webkit-scrollbar { width: 8px; }
.output::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.panel { display: none; animation: fade .25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.run { color: var(--ink-faint); font-size: 13px; margin-bottom: 14px; }
.run .dollar { color: var(--green); }
.p { color: var(--ink-soft); font-size: 14px; margin-bottom: 12px; max-width: 72ch; }

.facts { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.facts li { display: flex; gap: 14px; font-size: 13.5px; }
.facts .k { color: var(--green); min-width: 90px; }
.facts .k::before { content: "• "; }
.facts .v { color: var(--ink); }

/* Jobs */
.jobs { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.jobs li { padding-left: 16px; border-left: 2px solid var(--line); }
.j-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.j-co { color: #fff; font-weight: 700; font-size: 16px; }
.j-when { color: var(--ink-faint); font-size: 12.5px; }
.j-role { color: var(--amber); font-size: 13px; }
.jobs p { color: var(--ink-soft); font-size: 13.5px; margin-top: 6px; max-width: 74ch; }

/* Skills */
.skill-grid { display: flex; flex-direction: column; gap: 16px; }
.sg-title { color: var(--green); font-size: 13px; display: block; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span { font-size: 12.5px; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; padding: 5px 10px; }

/* Projects */
.proj { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--bg-2); }
.pr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pr-name { color: #fff; font-weight: 700; font-size: 16px; }
.pr-when { color: var(--ink-faint); font-size: 12.5px; }
.proj p { color: var(--ink-soft); font-size: 13.5px; }
.pr-link { display: inline-block; margin-top: 12px; color: var(--cyan); font-size: 13px; }
.pr-link:hover { text-decoration: underline; }

/* Contact */
.mail {
  font-family: var(--mono); font-size: 15px; color: var(--green);
  background: transparent; border: 1px dashed var(--green); border-radius: 6px;
  padding: 10px 16px; cursor: pointer; transition: all .15s; margin-bottom: 18px;
}
.mail:hover { background: rgba(92,242,167,.1); }
.links { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; }
.links a { color: var(--cyan); font-size: 13.5px; }
.links a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { padding: 0; }
  .terminal { height: 100vh; border-radius: 0; border: none; width: 100%; }
  .term-body { padding: 20px 18px; }
  .term-clock { display: none; }
  .facts li { flex-direction: column; gap: 2px; }
}
@media (max-height: 560px) {
  body { overflow: auto; place-items: start center; }
  .terminal { height: auto; min-height: 100vh; }
}
