/* performeR — terminal aesthetic. Black bg, white text, monospace, center-anchored. */

:root {
  --bg: #000;
  --fg: #fff;
  --dim: #888;
  --line: #333;
  --worked: #fff;   /* worked bar */
  --prod: #4ade80;  /* productive bar (green accent) */
  --up: #4ade80;
  --down: #f87171;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; } /* keeps hover border-width changes from shifting layout */

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ---------- top nav ---------- */
.topbar {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}
.navbar { display: flex; gap: 24px; }
.nav-link {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
}
.nav-link:hover { color: var(--fg); }
.nav-link.is-active { color: var(--fg); border-bottom-color: var(--fg); }
.nav-auth {
  position: absolute;
  top: 0;
  right: 0;
  padding: 6px 14px;
  font-size: 12px;
}

/* ---------- login modal ---------- */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.login-modal {
  width: 260px;
  background: var(--bg);
  border: 1px solid var(--fg);
  padding: 18px;
}
.login-modal input { margin-bottom: 12px; }
.login-actions { display: flex; gap: 10px; }
.login-error { color: var(--down); font-size: 12px; margin-top: 10px; min-height: 1em; }

/* ---------- contact ---------- */
.contact-card { text-align: left; }
.contact-line { margin: 6px 0; }
.contact-line a { color: var(--fg); }
.contact-line a:hover { color: var(--prod); }

/* ---------- portfolio ---------- */
.portfolio-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 560px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}
.portfolio-card {
  display: block;
  border: 1px solid var(--line);
  padding: 16px 18px;
  transition: border-color 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.portfolio-card:hover { border-width: 2px; border-color: var(--fg); }
.portfolio-title { font-weight: 700; margin-bottom: 10px; }
.portfolio-delivered-label {
  color: var(--dim);
  text-transform: lowercase;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.portfolio-delivered { margin: 0 0 12px; padding-left: 18px; }
.portfolio-delivered li { margin-bottom: 4px; }
.portfolio-prose { color: var(--dim); margin: 0; }
.portfolio-more { color: var(--fg); margin-left: 4px; }

/* ---------- portfolio detail pages ---------- */
.detail-back { color: var(--dim); text-decoration: none; font-size: 13px; align-self: flex-start; }
.detail-back:hover { color: var(--fg); }
.detail-badge {
  color: var(--dim);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.detail-tagline { color: var(--dim); margin: 0 0 20px; }
.detail-image { width: 100%; border: 1px solid var(--line); border-radius: 6px; display: block; margin: 0 0 20px; }
.detail-meta { width: 100%; border-collapse: collapse; margin-bottom: 8px; font-size: 13px; }
.detail-meta td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.detail-meta td:first-child { color: var(--dim); width: 140px; }
.detail-section-title {
  color: var(--dim);
  text-transform: lowercase;
  font-size: 12px;
  letter-spacing: 1px;
  margin: 20px 0 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.detail-quote { color: var(--dim); font-style: italic; margin: 6px 0; }
.detail-title { font-size: 24px; font-weight: 700; margin: 0 0 6px; text-align: left; }

/* ---------- hero ---------- */
.hero { text-align: center; width: 100%; }
.hero-title {
  font-size: 34px;
  letter-spacing: 2px;
  margin: 0 0 6px;
  font-weight: 700;
}
.hero-sub { margin: 0; color: var(--dim); }
.status-line { margin: 8px 0 0; color: var(--dim); font-size: 12px; min-height: 1em; }
.status-line.ok { color: var(--prod); }
.status-line.err { color: var(--down); }

/* ---------- groups ---------- */
.group { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.group-title { color: var(--dim); font-size: 13px; margin: 8px 0 0; text-align: center; letter-spacing: 1px; }

/* ---------- cards ---------- */
.card {
  width: 100%;
  border: 1px solid var(--line);
  padding: 16px 18px;
}
.card-title {
  color: var(--dim);
  text-transform: lowercase;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

/* ---------- fields ---------- */
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  color: var(--dim);
  font-size: 12px;
  margin-bottom: 4px;
}
input, textarea {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  padding: 8px 10px;
  resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: var(--fg); }

/* ---------- buttons ---------- */
.btn {
  background: #000;
  border: 1px solid var(--fg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--fg); color: #000; }
.btn:disabled { border-color: var(--line); color: var(--line); cursor: not-allowed; }
.btn.nav { padding: 4px 12px; }

/* ---------- evil twin chatbot ---------- */
.evil-twin-card { text-align: left; }
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.chat-thread[hidden] { display: none; }
.chat-msg {
  max-width: 80%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg.user { align-self: flex-end; background: #0a0a0a; }
.chat-msg.agent { align-self: flex-start; color: var(--dim); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; margin-bottom: 0; }
.chat-send-btn {
  background: #000;
  border: 1px solid var(--fg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  width: 38px;
  cursor: pointer;
}
.chat-send-btn:hover:not(:disabled) { background: var(--fg); color: #000; }
.chat-send-btn:disabled { border-color: var(--line); color: var(--line); cursor: not-allowed; }
.chat-mic-btn {
  background: #000;
  border: 1px solid var(--fg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  width: 38px;
  cursor: pointer;
}
.chat-mic-btn:hover:not(:disabled) { background: var(--fg); color: #000; }
.chat-mic-btn:disabled { border-color: var(--line); color: var(--line); cursor: not-allowed; }
.chat-mic-btn.recording {
  border-color: #e03131;
  color: #e03131;
  animation: chat-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes chat-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 49, 49, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(224, 49, 49, 0); }
}

/* ---------- clock ---------- */
.clock-body { text-align: center; }
.clock-timer { font-size: 40px; letter-spacing: 3px; font-weight: 700; }
.clock-timer.running { color: var(--prod); }
.clock-meta { color: var(--dim); font-size: 12px; margin: 4px 0 12px; }
.clock-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- focus (pomodoro) ---------- */
.focus-min-wrap { color: var(--dim); font-size: 12px; margin-left: 10px; }
.focus-min-wrap input {
  width: 56px;
  display: inline-block;
  padding: 2px 6px;
  margin-left: 4px;
  text-align: center;
}

/* ---------- day nav (log/health/notes) ---------- */
.day-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---------- week nav ---------- */
.week-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.week-label { color: var(--fg); font-size: 13px; }

/* ---------- chart ---------- */
.chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 180px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  width: 100%;
  justify-content: center;
}
.bar { width: 12px; min-height: 1px; }
.bar-worked { background: var(--worked); }
.bar-prod { background: var(--prod); }
.day-label { color: var(--dim); font-size: 11px; margin-top: 6px; }
.day-label.is-today { color: var(--prod); }
.chart-legend {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 10px;
  font-size: 12px;
}
.lg-worked { color: var(--worked); }
.lg-prod { color: var(--prod); }

/* ---------- tsv blocks ---------- */
.tsv {
  font-family: var(--mono);
  font-size: 13px;
  white-space: pre;
  tab-size: 4;
  -moz-tab-size: 4;
  margin: 0;
  overflow-x: auto;
}
.tsv .up { color: var(--up); }
.tsv .down { color: var(--down); }
.tsv .dim { color: var(--dim); }
