@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #06071a;
  --surface: #090b1f;
  --panel: #0c0e28;
  --border: #161938;
  --border-bright: #202550;
  --phosphor: #6b8fff;
  --phosphor-dim: #3040a8;
  --phosphor-bright: #9eb4ff;
  --fg: #c5cce8;
  --fg-dim: #6872a8;
  --green: #4edb9a;
  --red: #ff4f6e;
  --yellow: #ffd060;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 56px;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 140% 55% at 50% -5%, rgba(70, 100, 255, 0.07), transparent 55%);
}

/* subtle scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.025) 3px,
    rgba(0, 0, 0, 0.025) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Terminal window ── */
.term-window {
  width: 100%;
  max-width: 860px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(107, 143, 255, 0.06),
    0 30px 90px rgba(0, 0, 30, 0.8),
    0 0 80px rgba(50, 80, 255, 0.04) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Title bar ── */
.term-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.term-logo {
  height: 20px;
  margin-left: 10px;
  mix-blend-mode: screen;
  filter: brightness(1.4) saturate(1.1);
}

.term-hostname {
  margin-left: 6px;
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
}

/* ── Nav tabs ── */
.term-tabs {
  display: flex;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.term-tabs::-webkit-scrollbar { display: none; }

.tab {
  display: inline-block;
  padding: 7px 16px;
  font-size: 12px;
  font-family: inherit;
  color: var(--fg-dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--phosphor-bright); }
.tab.active {
  color: var(--phosphor-bright);
  border-bottom-color: var(--phosphor);
}

/* ── Content ── */
.term-body {
  padding: 32px 30px 36px;
  flex: 1;
}

/* ── Terminal text ── */
.line {
  display: block;
  font-size: 13px;
  line-height: 1.85;
  white-space: pre-wrap;
}
.prompt { color: var(--phosphor-dim); }
.cmd { color: var(--phosphor-bright); }
.ok { color: var(--fg-dim); }
.hi { color: var(--phosphor); font-weight: 600; }
.dim { color: var(--fg-dim); }

.cursor {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--phosphor);
  margin-left: 4px;
  transform: translateY(2px);
  border-radius: 1px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ── Divider ── */
.rule {
  border: none;
  border-top: 1px dashed var(--border-bright);
  margin: 24px 0;
}

/* ── Logo hero (home page) ── */
.hero-logo {
  display: block;
  width: 200px;
  margin: 0 auto 4px;
  mix-blend-mode: screen;
  filter: brightness(1.3) saturate(1.1) drop-shadow(0 0 18px rgba(80, 120, 255, 0.5));
}

/* ── Headings ── */
h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--fg);
  text-align: center;
  margin-bottom: 4px;
}

.tagline {
  text-align: center;
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
  margin-bottom: 28px;
}

h2 {
  font-size: 11px;
  font-weight: 600;
  color: var(--phosphor);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 28px 0 14px;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}

p {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.8;
  margin-bottom: 12px;
}

p strong {
  color: var(--fg);
  font-weight: 500;
}

a { color: var(--phosphor); text-decoration: none; }
a:hover { color: var(--phosphor-bright); text-decoration: underline; }

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
  margin-top: 4px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 22px;
  background: var(--panel);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--phosphor-dim);
  box-shadow: 0 4px 24px rgba(107, 143, 255, 0.07);
}

.card-badge {
  font-size: 10px;
  color: var(--phosphor-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card p { margin-bottom: 16px; }

.card-link {
  font-size: 12px;
  color: var(--phosphor);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.card-link::before { content: '→ '; }
.card-link:hover { color: var(--phosphor-bright); }

/* ── Stat rows (about page) ── */
.stat-block { margin-bottom: 4px; }

.stat-row {
  display: flex;
  gap: 16px;
  font-size: 13px;
  padding: 3px 0;
}
.stat-key {
  color: var(--phosphor-dim);
  min-width: 110px;
  flex-shrink: 0;
}
.stat-val { color: var(--fg); }
.stat-val.active { color: var(--phosphor); }

/* ── Service sections ── */
.service-block {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px 24px;
  background: var(--panel);
  margin-bottom: 16px;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.status-badge {
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.status-active {
  background: rgba(78, 219, 154, 0.12);
  color: var(--green);
  border: 1px solid rgba(78, 219, 154, 0.25);
}

.service-list {
  list-style: none;
  margin: 12px 0 16px;
}
.service-list li {
  font-size: 13px;
  color: var(--fg-dim);
  padding: 3px 0;
}
.service-list li::before {
  content: '  ✓  ';
  color: var(--phosphor-dim);
}

/* ── Contact form ── */
.contact-email-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--panel);
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--fg-dim);
}
.contact-email-bar a { color: var(--phosphor); }
.contact-email-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  margin-right: 4px;
}

.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 11px;
  color: var(--phosphor-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

input, textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
input:focus, textarea:focus {
  border-color: var(--phosphor-dim);
  box-shadow: 0 0 0 3px rgba(107, 143, 255, 0.08);
}
input::placeholder, textarea::placeholder { color: var(--fg-dim); opacity: 0.5; }
textarea { min-height: 130px; resize: vertical; }

.submit-btn {
  background: var(--phosphor-dim);
  color: #e8eeff;
  border: 1px solid var(--phosphor-dim);
  border-radius: 4px;
  padding: 10px 26px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.submit-btn:hover {
  background: var(--phosphor);
  border-color: var(--phosphor);
  color: var(--bg);
}
.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-msg {
  margin-top: 14px;
  font-size: 13px;
  display: none;
  padding: 10px 14px;
  border-radius: 4px;
  border-left: 3px solid;
}
.form-msg.success {
  display: block;
  color: var(--green);
  border-color: var(--green);
  background: rgba(78, 219, 154, 0.06);
}
.form-msg.error {
  display: block;
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 79, 110, 0.06);
}

/* ── Footer bar ── */
.term-footer {
  padding: 11px 30px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--fg-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0.55;
  flex-shrink: 0;
}

/* ── Boot sequence animation (index.html, CSS-only) ── */
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

#b1 { animation: fadein 0.25s ease 0.10s both; }
#b2 { animation: fadein 0.25s ease 0.30s both; }
#b3 { animation: fadein 0.25s ease 0.50s both; }
#b4 { animation: fadein 0.25s ease 0.70s both; }
#b5 { animation: fadein 0.25s ease 0.90s both; }
#r1 { animation: fadein 0.30s ease 1.20s both; }
#hero { animation: fadein 0.40s ease 1.25s both; }

@media (prefers-reduced-motion: reduce) {
  #b1, #b2, #b3, #b4, #b5, #r1, #hero { animation: none; }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  body { padding: 0; }
  .term-window { border-radius: 0; border-left: none; border-right: none; min-height: 100vh; }
  .term-body { padding: 20px 16px 28px; }
  .term-footer { padding: 11px 16px; }
}
