/* ============================================================
   jescoto.com — developer-themed CV
   palette: deep space + terminal green / electric blue / ai purple
   ============================================================ */

:root {
  --bg: #0a0e14;
  --bg-elev: #0d131d;
  --panel: #101724;
  --panel-2: #131c2b;
  --border: #1d2839;
  --border-bright: #2d3f58;
  --text: #d7e1f0;
  --muted: #7e90aa;
  --faint: #4d5d75;

  --green: #4ee88a;
  --blue: #5ea7ff;
  --purple: #c792ea;
  --cyan: #56d4dd;
  --yellow: #e6c07b;
  --orange: #ff9e64;
  --red: #f7768e;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius: 10px;
  --nav-h: 58px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(ellipse 70% 45% at 15% -5%, rgba(78, 232, 138, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(94, 167, 255, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 60% 100%, rgba(199, 146, 234, 0.05), transparent),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* subtle grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 145, 175, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 145, 175, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

::selection { background: rgba(78, 232, 138, 0.28); color: #eafff2; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--cyan); }

.mono { font-family: var(--mono); }
.prompt { color: var(--green); font-weight: 600; }

.hl-green  { color: var(--green); }
.hl-blue   { color: var(--blue); }
.hl-purple { color: var(--purple); }
.hl-orange { color: var(--orange); }
.hl-muted  { color: var(--muted); }

/* ============ scroll progress ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  background: transparent;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--blue), var(--purple));
}

/* ============ nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: var(--nav-h);
  padding: 0 28px;
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
}
.nav-brand:hover { color: var(--text); }
.nav-at { color: var(--green); }
.nav-path { color: var(--muted); font-weight: 400; }
.nav-cursor {
  display: inline-block;
  width: 8px; height: 15px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--green);
  animation: blink 1.1s steps(1) infinite;
}

.nav-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(125, 145, 175, 0.08); }
.nav-links a.active { color: var(--green); }
.nav-num { color: var(--green); opacity: 0.75; margin-right: 3px; font-size: 0.72rem; }
.nav-links a.active .nav-num { opacity: 1; }

.nav-contact {
  border: 1px solid var(--border-bright);
}
.nav-contact:hover { border-color: var(--green); }

/* ============ hero / terminal ============ */
.hero {
  position: relative;
  z-index: 1;
  padding: 72px 24px 88px;
}

.hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.terminal {
  background: rgba(13, 19, 29, 0.92);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 18px 60px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(78, 232, 138, 0.05);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.terminal-body {
  padding: 24px 26px 28px;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.9;
}

.term-line.cmd { color: var(--text); font-weight: 500; }
.term-line.out { color: var(--muted); padding-left: 18px; }
.term-line .k { color: var(--faint); }

.hero-name {
  display: inline;
  font-family: var(--mono);
  font-size: clamp(1.25rem, 4vw, 1.9rem);
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.5px;
  text-shadow: 0 0 30px rgba(78, 232, 138, 0.25);
}

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

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

/* typing animation: JS adds .js-typing to terminal, lines revealed one by one */
.js-typing .term-line { visibility: hidden; }
.js-typing .term-line.shown { visibility: visible; }

/* ============ interactive terminal ============ */
.terminal-body {
  max-height: 430px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.term-input-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: inherit;
  font-weight: 500;
  caret-color: var(--green);
}
.term-input:focus { outline: none; box-shadow: none; }
.term-input::placeholder { color: var(--faint); }

.term-out-block { color: var(--muted); padding-left: 18px; white-space: pre-wrap; }
.term-out-block a { color: var(--blue); }
.term-err { color: var(--red); padding-left: 18px; }

.term-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.term-suggest-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
}

.term-suggest {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--green);
  background: rgba(78, 232, 138, 0.06);
  border: 1px solid rgba(78, 232, 138, 0.3);
  border-radius: 6px;
  padding: 4px 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.term-suggest:hover {
  background: rgba(78, 232, 138, 0.14);
  border-color: var(--green);
  transform: translateY(-1px);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.chip-link:hover {
  color: var(--text);
  border-color: var(--green);
  transform: translateY(-1px);
}
.chip-icon { color: var(--green); font-weight: 700; font-size: 0.72rem; }

/* ============ sections ============ */
.section {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 72px 24px;
}

.sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  margin: 0 0 28px;
  color: var(--text);
}
.sec-num { color: var(--green); font-size: 0.85em; }
.sec-comment { color: var(--faint); font-weight: 400; }
.sec-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-bright), transparent);
  margin-left: 8px;
}

.sec-cmd {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--muted);
  margin: -10px 0 26px;
}

/* ============ about ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 36px;
  align-items: start;
}

.about-text p { margin: 0 0 16px; color: var(--text); }
.about-text strong { color: var(--green); font-weight: 600; }

.docstring-open, .docstring-close {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 1.1rem;
  margin: 0 0 6px !important;
}
.docstring-close { margin: 0 !important; }

.about-stats {
  display: grid;
  gap: 12px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.stat-value {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ============ experience (git log) ============ */
.commits {
  position: relative;
  padding-left: 26px;
}
/* the git graph line */
.commits::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--green), var(--blue) 45%, var(--purple));
  opacity: 0.45;
}

.commit {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px 20px 46px;
  margin-bottom: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.commit:hover {
  border-color: var(--border-bright);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
/* commit node on the graph */
.commit::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 27px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--green);
  box-shadow: 0 0 10px rgba(78, 232, 138, 0.5);
}
.commit:nth-child(3n+2)::before { border-color: var(--blue); box-shadow: 0 0 10px rgba(94, 167, 255, 0.5); }
.commit:nth-child(3n)::before { border-color: var(--purple); box-shadow: 0 0 10px rgba(199, 146, 234, 0.5); }

.commit-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.commit-hash {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--orange);
  background: rgba(255, 158, 100, 0.08);
  border: 1px solid rgba(255, 158, 100, 0.25);
  border-radius: 5px;
  padding: 1px 7px;
}

.commit-role {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.commit-date {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}

.commit-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 6px 0 12px;
}

/* industry shown as a vertical spine on the left edge of the card */
.commit-industry {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(86, 212, 221, 0.06);
  border-right: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  white-space: nowrap;
  overflow: hidden;
}

.commit ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.commit li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 7px;
  font-size: 0.93rem;
  color: var(--text);
}
.commit li::before {
  content: "▸";
  position: absolute;
  left: 2px;
  color: var(--green);
  font-size: 0.8rem;
}

/* tag chips */
.chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid;
  text-transform: lowercase;
}
.chip-ai   { color: var(--purple); border-color: rgba(199, 146, 234, 0.4); background: rgba(199, 146, 234, 0.08); }
.chip-data { color: var(--blue);   border-color: rgba(94, 167, 255, 0.4);  background: rgba(94, 167, 255, 0.08); }
.chip-dev  { color: var(--green);  border-color: rgba(78, 232, 138, 0.4);  background: rgba(78, 232, 138, 0.08); }
.chip-lead { color: var(--orange); border-color: rgba(255, 158, 100, 0.4); background: rgba(255, 158, 100, 0.08); }
.chip-edu  { color: var(--yellow); border-color: rgba(230, 192, 123, 0.4); background: rgba(230, 192, 123, 0.08); }
.chip-tool { color: var(--yellow); border-color: rgba(230, 192, 123, 0.4); background: rgba(230, 192, 123, 0.08); }
.chip-sec  { color: var(--red);    border-color: rgba(247, 118, 142, 0.4); background: rgba(247, 118, 142, 0.08); }

.commit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 12px;
}

/* ============ education (sql) ============ */
.sql-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  font-family: var(--mono);
}

.sql-query {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.8;
}
.sql-kw { color: var(--purple); font-weight: 600; }

.sql-table-wrap { overflow-x: auto; }

.sql-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.sql-table th {
  text-align: left;
  color: var(--green);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-bright);
  white-space: nowrap;
}
.sql-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.sql-table tbody tr { transition: background 0.15s; }
.sql-table tbody tr:hover { background: rgba(94, 167, 255, 0.05); }
.sql-table td.mono { color: var(--yellow); white-space: nowrap; }

.sql-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 16px 0 8px;
  line-height: 1.7;
}
.sql-comment { color: var(--faint); }

.sql-footer {
  font-size: 0.78rem;
  color: var(--green);
  margin: 4px 0 0;
}

/* ============ skills (json) ============ */
.code-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  overflow-x: auto;
}
.code-block pre {
  margin: 0;
  padding: 16px;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.85;
}
.j-key  { color: var(--blue); }
.j-str  { color: var(--green); }
.j-bool { color: var(--orange); font-weight: 600; }
.j-p    { color: var(--muted); }
.j-com  { color: var(--faint); font-style: italic; }

/* ============ analytics dashboard ============ */
.dash-intro {
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 24px;
}

.dashboard { position: relative; }

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dash-kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.dash-kpi-value {
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.dash-kpi-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.dash-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.dash-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.dash-filter:hover { border-color: var(--border-bright); color: var(--text); }
.dash-filter.active { color: var(--text); border-color: var(--green); }

.swatch {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--c);
  display: inline-block;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 14px;
}

.dash-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.dash-panel-title {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
}

.chart-host { width: 100%; position: relative; }
.chart-host svg { display: block; width: 100%; height: auto; }
#chart-donut svg { max-width: 250px; margin: 0 auto; }

/* svg text */
.chart-host text {
  font-family: var(--mono);
  fill: var(--muted);
}

.stream-layer { cursor: pointer; transition: opacity 0.25s; }
.stream-layer.dim { opacity: 0.1; }
.stream-connector { stroke: rgba(125, 145, 175, 0.45); stroke-width: 1; }
.stream-dot { stroke: var(--panel); stroke-width: 1.5; }

/* numbered marker badges (HTML overlay → always legible, even on mobile) */
.stream-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.stream-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: #0a0e14;
  border: 2px solid var(--panel);
  pointer-events: auto;
  cursor: default;
  transition: opacity 0.25s;
}
.stream-badge.dim { opacity: 0.16; }

/* legend list under the streamgraph */
.stream-legend {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 22px;
}
.stream-legend li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  transition: opacity 0.25s;
}
.stream-legend li.dim { opacity: 0.32; }
.stream-legend .lg-num {
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #0a0e14;
}
.stream-legend .lg-role { color: var(--text); font-weight: 500; }
.stream-legend .lg-period {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-left: auto;
  white-space: nowrap;
}

.donut-seg { cursor: pointer; transition: opacity 0.25s; }
.donut-seg.dim { opacity: 0.16; }

@media (max-width: 620px) {
  .stream-legend { grid-template-columns: 1fr; }
}

.dash-tooltip {
  position: fixed;
  z-index: 300;
  pointer-events: none;
  background: var(--bg-elev);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  max-width: 260px;
}
.dash-tooltip .tt-title { color: var(--text); font-weight: 600; }
.dash-tooltip .tt-sub { color: var(--muted); }

.dash-foot {
  font-family: var(--mono);
  font-size: 0.74rem;
  margin: 14px 0 0;
}

/* ============ portfolio ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  color: var(--text);
  border-color: var(--green);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.project-cmd {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}
.project-card p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
}
.project-go {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--green);
}

.project-featured {
  border-color: rgba(78, 232, 138, 0.45);
  background: linear-gradient(160deg, rgba(78, 232, 138, 0.05), var(--panel) 45%);
}
.project-featured h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============ contact ============ */
.contact-intro {
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 28px;
}

.contact-form { max-width: 540px; }

.form-row {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-flag {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--purple);
}

input, textarea {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--mono);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(78, 232, 138, 0.12);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.field-error {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.78rem;
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 600;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 11px 24px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.btn:hover {
  background: rgba(78, 232, 138, 0.1);
  box-shadow: 0 0 24px rgba(78, 232, 138, 0.25);
  transform: translateY(-1px);
}
.btn-parens { color: var(--muted); }

.btn-secondary { color: var(--muted); border-color: var(--border-bright); }
.btn-secondary:hover { color: var(--text); background: rgba(125, 145, 175, 0.08); box-shadow: none; }

.btn-small { padding: 6px 14px; font-size: 0.78rem; }

.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: rgba(247, 118, 142, 0.1); box-shadow: 0 0 20px rgba(247, 118, 142, 0.2); }

/* ============ flash ============ */
.flash-container {
  position: relative;
  z-index: 150;
  max-width: 960px;
  margin: 16px auto 0;
  padding: 0 24px;
}

.flash {
  font-family: var(--mono);
  font-size: 0.88rem;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.flash-prefix { font-weight: 700; margin-right: 6px; }
.flash-success {
  background: rgba(78, 232, 138, 0.1);
  border: 1px solid rgba(78, 232, 138, 0.4);
  color: var(--green);
}
.flash-error {
  background: rgba(247, 118, 142, 0.1);
  border: 1px solid rgba(247, 118, 142, 0.4);
  color: var(--red);
}

/* ============ footer statusline (vim) ============ */
.statusline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  margin-top: 40px;
}

.sl-mode {
  background: var(--green);
  color: #06180d;
  font-weight: 700;
  padding: 8px 14px;
}
.sl-item {
  padding: 8px 14px;
  color: var(--muted);
  border-right: 1px solid var(--border);
}
.sl-spacer { flex: 1; }
.sl-item.hl-green { color: var(--green); border-right: none; }

/* ============ reveal on scroll ============
   hidden state only applies when JS confirmed itself with html.js,
   so the page is fully visible without JavaScript */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============ admin ============ */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-form {
  background: var(--panel);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.admin-login-form h1 {
  font-family: var(--mono);
  font-size: 1.15rem;
  margin: 0 0 22px;
}
.admin-login-form label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-dashboard {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 44px 24px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.admin-header h1 {
  font-family: var(--mono);
  font-size: 1.35rem;
  margin: 0;
}

.empty-state {
  font-family: var(--mono);
  color: var(--muted);
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.message-card.unread {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(78, 232, 138, 0.08);
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.88rem;
}
.message-date { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }

.badge {
  font-family: var(--mono);
  background: var(--green);
  color: #06180d;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

.message-body {
  white-space: pre-wrap;
  margin: 0 0 12px;
  font-size: 0.93rem;
}

.message-actions { display: flex; gap: 10px; }

.admin-actions { display: flex; gap: 10px; }

/* ============ admin · visitas ============ */
.visits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.visits-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.visits-title {
  font-family: var(--mono);
  font-size: 0.95rem;
  margin: 0 0 12px;
  color: var(--text);
}
.visits-recent {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 18px 10px;
  overflow-x: auto;
}
.visits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.visits-table th {
  text-align: left;
  color: var(--green);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.76rem;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-bright);
  white-space: nowrap;
}
.visits-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.visits-table tbody tr:last-child td { border-bottom: none; }
.visits-num {
  text-align: right;
  font-family: var(--mono);
  color: var(--green);
  font-weight: 600;
}

/* ============ responsive ============ */
@media (max-width: 900px) {
  .nav-num { display: none; }
  .nav { padding: 0 18px; }
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .commit-date { margin-left: 0; width: 100%; }
  .dash-grid { grid-template-columns: 1fr; }
  .visits-grid { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav { padding: 0 14px; }
  .nav-brand { font-size: 0.82rem; }
  .nav-links a { font-size: 0.72rem; padding: 6px 7px; }
  .hero { padding: 44px 14px 60px; }
  .terminal-body { padding: 18px 16px 22px; font-size: 0.8rem; }
  .section { padding: 52px 16px; }
  .commits { padding-left: 20px; }
  .commit { padding: 16px 16px 16px 40px; }
  .commit::before { left: -18px; }
  .commit-industry { width: 27px; font-size: 0.6rem; }
  .hide-sm { display: none; }
}

/* ============ motion preferences ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav-cursor, .typed-cursor { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
