/* CLI Session portfolio — light (2a) / dark (2b) themes from Portfolio Directions.dc.html */

:root {
  --desk: #dde2ec;
  --accent: #2f6bff;
  --term-bg: #f5f7fb;
  --term-shadow: 0 22px 55px -20px rgba(20, 30, 60, .55);
  --bar-bg: #e8ebf3;
  --bar-border: #d4dae7;
  --bar-title: #6b7488;
  --chip-bg: #dbe1ee;
  --chip-fg: #8a93a6;
  --accent-chip-bg: rgba(47, 107, 255, .08);
  --fg: #2a3244;
  --fg-strong: #1b2130;
  --fg-body: #3a4258;
  --fg-sub: #5a6377;
  --fg-muted: #8a93a6;
  --ls-body: #4a5266;
  --ls-note: #5a6377;
  --prompt-green: #1a9d5a;
  --prompt-path: #2f6bff;
  --git-branch: #c2410c;
  --pill-bg: #fff;
  --pill-border: #d9dfec;
  --card-bg: #fff;
  --card-border: #d9dfec;
  --cell-bg: #e9edf5;
  --lv0: #e9edf5;
  --lv1: #a9c0ff;
  --lv2: #6f9bff;
  --lv3: #4278ff;
  --lv4: #2f6bff;
  --cursor: #2a3244;
  --err: #c2410c;
  --tag-bg: #eef1f7;
}

:root[data-theme="dark"] {
  --desk: #0a0d13;
  --accent: #38bdf8;
  --term-bg: #11151d;
  --term-shadow: 0 24px 60px -18px rgba(0, 0, 0, .75), 0 0 0 1px #1e2632;
  --bar-bg: #181d27;
  --bar-border: #232a37;
  --bar-title: #7b8494;
  --chip-bg: #222835;
  --chip-fg: #6b7484;
  --accent-chip-bg: rgba(56, 189, 248, .12);
  --fg: #c5ccda;
  --fg-strong: #f2f5fa;
  --fg-body: #aab2c2;
  --fg-sub: #98a1b2;
  --fg-muted: #6b7484;
  --ls-body: #aab2c2;
  --ls-note: #7b8494;
  --prompt-green: #4ade80;
  --prompt-path: #60a5fa;
  --git-branch: #f0883e;
  --pill-bg: #1a202b;
  --pill-border: #2a3140;
  --card-bg: #161b24;
  --card-border: #262d3a;
  --cell-bg: #1c222d;
  --lv0: #1c222d;
  --lv1: #1e5573;
  --lv2: #2585b0;
  --lv3: #2ea6d6;
  --lv4: #38bdf8;
  --cursor: #c5ccda;
  --err: #f0883e;
  --tag-bg: #1a202b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--desk);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color: var(--fg);
  transition: background .35s ease;
}

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

.desk {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 44px 20px 64px;
}

.term {
  border-radius: 11px;
  overflow: hidden;
  box-shadow: var(--term-shadow);
  background: var(--term-bg);
  transition: background .35s ease;
}

/* ---- title bar ---- */

.titlebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bar-bg);
  border-bottom: 1px solid var(--bar-border);
  transition: background .35s ease;
}

.light { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.light.red { background: #ff5f57; }
.light.yellow { background: #febc2e; }
.light.green { background: #28c840; }

.tb-title {
  margin-left: 10px;
  font-size: 12px;
  color: var(--bar-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-chips { margin-left: auto; display: flex; gap: 6px; }

.chip {
  font: 500 10.5px 'JetBrains Mono', monospace;
  padding: 3px 8px;
  background: var(--chip-bg);
  border-radius: 4px;
  color: var(--chip-fg);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.chip:hover { color: var(--accent); background: var(--accent-chip-bg); }
.chip-accent { background: var(--accent-chip-bg); color: var(--accent); }
.chip-toggle { line-height: 1.4; }

/* ---- session ---- */

.session { padding: 22px 22px 26px; font-size: 13.5px; line-height: 1.75; }

section { scroll-margin-top: 58px; }

.prompt { color: var(--fg); }
.p-arrow { color: var(--prompt-green); }
.p-path { color: var(--prompt-path); }
.p-git { color: var(--fg-muted); }
.p-branch { color: var(--git-branch); }

.out { margin: 4px 0 20px; }

/* whoami */
.out-whoami .name {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-strong);
  letter-spacing: -.01em;
}
.out-whoami .sub { color: var(--fg-sub); }

/* about */
.out-about { color: var(--fg-body); max-width: 640px; }
.hl { color: var(--accent); }

/* ls listings */
.ls {
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  column-gap: 1.4em;
  row-gap: 3px;
  color: var(--ls-body);
  font-size: 12.5px;
  line-height: 1.6;
}
.ls-total { grid-column: 1 / -1; color: var(--fg-muted); }
.perm { color: var(--fg-muted); }
.dir { color: var(--accent); text-decoration: none; }
a.dir:hover { text-decoration: underline; }
a.dir::after { content: " ↗"; font-size: 10px; opacity: .7; }
.note { color: var(--ls-note); }
.note-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.note-link:hover { border-bottom-color: var(--accent); }

/* skills pills */
.pills { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 7px; font-size: 12px; }
.pill {
  padding: 5px 10px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 5px;
  transition: background .35s ease, border-color .35s ease;
}

/* contribution graph */
.contrib-card {
  margin-top: 6px;
  margin-bottom: 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 9px;
  padding: 16px 16px 14px;
  transition: background .35s ease, border-color .35s ease;
}
.contrib-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 12px;
  font-size: 12px;
}
.contrib-total { color: var(--fg-strong); font-weight: 700; }
.contrib-streaks { color: var(--fg-sub); }
.contrib-streaks .cur { color: var(--accent); font-weight: 700; }
.contrib-streaks .max { color: var(--fg-strong); }
.contrib-months {
  position: relative;
  height: 13px;
  font-size: 10px;
  color: var(--fg-muted);
  margin-bottom: 5px;
}
.contrib-months span { position: absolute; top: 0; }
#contrib-canvas { width: 100%; height: 104px; display: block; }
.contrib-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 11px;
  font-size: 10.5px;
  color: var(--fg-muted);
}
.contrib-user { color: var(--accent); text-decoration: none; }
.contrib-user:hover { text-decoration: underline; }
.legend { display: flex; align-items: center; gap: 5px; }
.legend .cell { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.legend .lv0 { background: var(--lv0); }
.legend .lv1 { background: var(--lv1); }
.legend .lv2 { background: var(--lv2); }
.legend .lv3 { background: var(--lv3); }
.legend .lv4 { background: var(--lv4); }

/* work history */
.wh { margin-top: 6px; color: var(--ls-body); font-size: 12.5px; }
.wh-row { padding: 6px 0; opacity: 0; transform-origin: center bottom; }
.wh-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  cursor: pointer; list-style: none;
  padding: 5px 8px; margin: 0 -8px; border-radius: 6px;
}
.wh-head::-webkit-details-marker { display: none; }
.wh-head:hover { background: var(--accent-chip-bg); }
.wh-caret {
  color: var(--accent);
  display: inline-block;
  transition: transform .2s ease;
}
.wh-row[open] .wh-caret { transform: rotate(90deg); }
.wh-title { color: var(--fg-strong); font-weight: 700; font-size: 13.5px; }
.wh-co { color: var(--accent); }
.wh-dates { color: var(--fg-muted); margin-left: auto; }
.wh-hint { color: var(--fg-muted); opacity: .65; font-size: 10.5px; }
.wh-row[open] .wh-hint { display: none; }
@keyframes wh-expand {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.wh-body { padding: 2px 8px 6px 0; }
.wh-row[open] .wh-body { animation: wh-expand .25s ease both; }
.wh-bullets { margin: 5px 0 0; line-height: 1.7; }
.wh-tags { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.tag { padding: 3px 8px; background: var(--tag-bg); border-radius: 5px; }

/* drop-in animation from the design */
@keyframes wh-drop {
  0% { opacity: 0; transform: translateY(-52px) scaleY(1); animation-timing-function: cubic-bezier(.6,0,.9,.35); }
  18% { opacity: 1; transform: translateY(0) scaleY(1); }
  25% { transform: translateY(0) scaleY(.84); animation-timing-function: cubic-bezier(.1,.55,.4,1); }
  32% { transform: translateY(0) scaleY(1.05); }
  52% { transform: translateY(-20px) scaleY(1); animation-timing-function: cubic-bezier(.6,0,.9,.35); }
  66% { transform: translateY(0) scaleY(.9); animation-timing-function: cubic-bezier(.1,.55,.4,1); }
  80% { transform: translateY(-8px) scaleY(1); animation-timing-function: cubic-bezier(.6,0,.9,.35); }
  90% { transform: translateY(0) scaleY(.97); }
  95% { transform: translateY(-2px); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}
.wh.wh-in .wh-row { animation: wh-drop .95s both; }
.wh.wh-in .wh-row:nth-child(1) { animation-delay: .04s; }
.wh.wh-in .wh-row:nth-child(2) { animation-delay: .15s; }
.wh.wh-in .wh-row:nth-child(3) { animation-delay: .26s; }
.wh.wh-in .wh-row:nth-child(4) { animation-delay: .37s; }

/* contact */
.contacts { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 12.5px; margin-bottom: 12px; }
.contacts a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 33%, transparent);
  padding-bottom: 2px;
}
.contacts a:hover { border-bottom-color: var(--accent); }

/* trailing prompt cursor */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  transform: translateY(2px);
  background: var(--cursor);
  animation: blink 1.1s steps(1) infinite;
}

/* ---- responsive ---- */

@media (max-width: 640px) {
  .desk { padding: 20px 10px 40px; }
  .session { padding: 18px 14px 22px; }
  .tb-title { display: none; }
  .ls { grid-template-columns: max-content 1fr; }
  .perm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .wh-row, .wh.wh-in .wh-row { animation: none; opacity: 1; }
  .wh-row[open] .wh-body { animation: none; }
  .wh-caret { transition: none; }
}
