/* ============================================================
   shellac - macOS-inspired interactive terminal resume
   ============================================================ */

:root {
  --term-bg: #1d1f21;
  --term-bg-2: #25282b;
  --term-titlebar: #34373b;
  --term-titlebar-2: #2b2e31;
  --term-text: #e6e6e6;
  --term-dim: #8a8f93;
  --term-green: #2fd158;
  --term-green-deep: #27a544;
  --term-cyan: #57c7ff;
  --term-amber: #f5bd5c;
  --term-white: #ffffff;
  --term-red: #ff6b6b;
  --term-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--term-mono);
  color: var(--term-text);
  background:
    radial-gradient(1200px 700px at 20% 0%, #3a2f5c 0%, transparent 55%),
    radial-gradient(1000px 800px at 100% 100%, #14463f 0%, transparent 55%),
    linear-gradient(160deg, #1a1530, #0c1117 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 3vw, 2.4rem);
}

/* The window frame */
.term-window {
  width: min(100%, 980px);
  height: min(92vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--term-bg);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.4);
}

.term-titlebar {
  position: relative;
  flex: 0 0 auto;
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: linear-gradient(180deg, var(--term-titlebar), var(--term-titlebar-2));
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  user-select: none;
}
.term-lights { display: flex; gap: 8px; align-items: center; }
.term-lights span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: block;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25);
}
.tl-close { background: #ff5f57; }
.tl-min { background: #febc2e; }
.tl-max { background: #28c840; }
.term-lights a { display: block; line-height: 0; }

.term-title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  color: #cfd2d6;
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
}
.term-title small { color: var(--term-dim); font-weight: 400; }

.term-actions {
  position: relative;
  z-index: 1;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.term-btn {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #d6d9dd;
  font-family: var(--term-mono);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.term-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.term-btn-primary {
  border-color: color-mix(in srgb, var(--term-green) 55%, transparent);
  background: color-mix(in srgb, var(--term-green) 18%, transparent);
  color: var(--term-green);
}
.term-btn-primary:hover {
  border-color: var(--term-green);
  background: color-mix(in srgb, var(--term-green) 28%, transparent);
  color: #ffffff;
}
@media (max-width: 720px) {
  .term-title { display: none; }
  .term-btn { font-size: 0.66rem; padding: 0 8px; }
}
@media (max-width: 460px) {
  .term-actions { gap: 6px; }
  .term-btn { height: 22px; }
}

/* The scrollable screen */
.term-screen {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px 18px;
  font-size: clamp(0.78rem, 1.55vw, 0.92rem);
  line-height: 1.55;
  background: var(--term-bg);
  scroll-behavior: smooth;
  cursor: text;
}
.term-screen::-webkit-scrollbar { width: 10px; }
.term-screen::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 999px; }
.term-screen::-webkit-scrollbar-track { background: transparent; }

.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line + .term-line { margin-top: 1px; }

/* Tokens */
.t-prompt { color: var(--term-green); font-weight: 700; }
.t-path { color: var(--term-cyan); }
.t-cmd { color: var(--term-white); font-weight: 600; }
.t-dim { color: var(--term-dim); }
.t-green { color: var(--term-green); }
.t-cyan { color: var(--term-cyan); }
.t-amber { color: var(--term-amber); }
.t-red { color: var(--term-red); }
.t-white { color: var(--term-white); }
.t-head { color: var(--term-green); font-weight: 700; }
.t-link { color: var(--term-cyan); text-decoration: underline; text-underline-offset: 2px; }
.t-link:hover { color: var(--term-white); }

.term-spacer { height: 0.55rem; }

/* Progress bar rendering for skills */
.bar-track { color: var(--term-dim); }
.bar-fill { color: var(--term-green); }

/* The live input line */
.term-inputline { display: flex; flex-wrap: wrap; align-items: baseline; }
.term-cursor {
  display: inline-block;
  width: 0.62ch;
  height: 1.05em;
  margin-left: 1px;
  transform: translateY(0.18em);
  background: var(--term-green);
  animation: blink 1s steps(1) infinite;
}
.term-cursor.is-solid { animation: none; }
@keyframes blink { 50% { opacity: 0; } }

/* Hidden field that captures mobile keyboard input */
.term-capture {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  left: -9999px;
}

@media (max-width: 620px) {
  body { padding: 0; }
  .term-window { height: 100vh; width: 100vw; border-radius: 0; border: 0; }
}
