/* Shatadru — terminal/IDE aesthetic shared stylesheet */

:root {
  --bg: #050a05;
  --bg-2: #0a110a;
  --bg-3: #0f1a0f;
  --fg: #d4f0d4;
  --fg-muted: #7ab87a;
  --fg-dim: #3d6b3d;
  --border: #1a2e1a;
  --border-bright: #254025;
  --accent: #39ff6e;        /* vivid matrix green */
  --accent-dim: #22d44e;
  --amber: #fbbf24;
  --magenta: #f472b6;
  --cyan: #67e8f9;
  --red: #f87171;
  --selection: rgba(57, 255, 110, 0.2);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}

[data-theme="light"] {
  --bg: #f6fbf6;
  --bg-2: #ebf5eb;
  --bg-3: #ddecdd;
  --fg: #0a1a0a;
  --fg-muted: #235023;
  --fg-dim: #5a8a5a;
  --border: #b8d6b8;
  --border-bright: #7aae7a;
  --accent: #0a6a22;
  --accent-dim: #084d18;
  --selection: rgba(10, 106, 34, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: common-ligatures;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(57,255,110,0.07), transparent 50%),
    radial-gradient(ellipse 50% 30% at 100% 100%, rgba(57,255,110,0.05), transparent 50%);
}

::selection { background: var(--selection); color: var(--fg); }

/* ===== mode switcher (shared across all modes) ===== */
.mode-switcher {
  display: flex;
  gap: 3px;
  align-items: center;
  background: rgba(0,0,0,0.18);
  border-radius: 8px;
  padding: 3px;
  margin-left: 8px;
}
.ms-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  background: transparent;
  border: none;
  color: var(--fg-muted);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 140ms, color 140ms;
  white-space: nowrap;
}
.ms-btn:hover { color: var(--fg); background: rgba(255,255,255,0.07); }
.ms-btn.active { background: var(--border-bright); color: var(--accent); }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--fg-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 140ms;
  margin-left: 6px;
  white-space: nowrap;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* old mode-toggle (deprecated, kept for compat) */
.mode-toggle { display: none; }

/* light-theme overrides for shared components */
[data-theme="light"] .mode-switcher {
  background: rgba(0,0,0,0.06);
}
[data-theme="light"] .ms-btn.active {
  background: var(--border-bright);
  color: var(--accent);
}
[data-theme="light"] .ms-btn:hover { background: rgba(0,0,0,0.08); color: var(--fg); }

/* mobile topbar wrapping */
@media (max-width: 680px) {
  .topbar { gap: 8px; }
  .topbar .path { flex: 1; }
  .mode-switcher { order: 3; width: 100%; justify-content: center; }
  .theme-toggle { order: 2; }
  .ms-btn { padding: 5px 9px; font-size: 10px; }
}

  font-weight: 700;
  letter-spacing: -0.02em;
}

a,
a:link,
a:visited {
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
  transition: color 120ms ease;
}
a:hover { color: var(--accent-dim); }
a:visited { color: var(--accent); }

/* nav and structural links use foreground color, not accent */
nav.sitenav a, .pillar-card, a.btn-primary,
.post-list .title a, .topbar a {
  color: var(--fg);
}

button { font-family: inherit; font-size: inherit; cursor: pointer; }

/* ------- layout ------- */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 28px 96px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  flex-wrap: wrap;
}
.topbar .dots { display: flex; gap: 6px; flex-shrink: 0; }
.topbar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-bright);
}
.topbar .dots span:nth-child(1) { background: #ff5f56; }
.topbar .dots span:nth-child(2) { background: #ffbd2e; }
.topbar .dots span:nth-child(3) { background: #27c93f; }
.topbar .path { color: var(--fg-muted); flex: 1; text-align: center; }
.topbar .path b { color: var(--fg); font-weight: 500; }
.topbar .theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.topbar .theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ------- navigation ------- */
nav.sitenav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 0 4px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  font-size: 13px;
}
nav.sitenav a {
  border-bottom: none;
  color: var(--fg-muted);
  padding: 4px 0;
  position: relative;
}
nav.sitenav a::before { content: "./"; color: var(--fg-dim); margin-right: 2px; }
nav.sitenav a:hover { color: var(--accent); }
nav.sitenav a[aria-current="page"] { color: var(--fg); }
nav.sitenav a[aria-current="page"]::before { color: var(--accent); content: "▸ "; margin-right: 0; }

/* ------- headings / prose ------- */
h1, h2, h3, h4 {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}
h1 { font-size: 32px; margin: 0 0 8px; }
h2 {
  font-size: 18px;
  margin: 48px 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
  color: var(--accent);
}
h2::before { content: "## "; color: var(--fg-dim); }
h3 { font-size: 15px; margin: 24px 0 8px; }
h3::before { content: "### "; color: var(--fg-dim); }

p { color: var(--fg); max-width: 72ch; font-size: 15px; line-height: 1.75; }
.muted { color: var(--fg-muted); }
.dim { color: var(--fg-dim); }
code, kbd {
  font-family: var(--mono);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.9em;
}

/* ------- prompt line ------- */
.prompt {
  color: var(--fg-muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.prompt .user { color: var(--accent); }
.prompt .sep { color: var(--fg-dim); }
.prompt .cmd { color: var(--fg); }

/* ------- cards / panels ------- */
.panel {
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: 6px;
  padding: 20px 22px;
}
.panel:hover { border-color: var(--border-bright); }

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pillar-card {
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: 6px;
  padding: 22px 22px 20px;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
  display: block;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
}
.pillar-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--bg-3);
  color: var(--fg);
}
.pillar-card .tag {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pillar-card .arrow { color: var(--fg-muted); transition: color 160ms, transform 160ms; }
.pillar-card:hover .arrow { color: var(--accent); transform: translateX(4px); }
.pillar-card h3 { margin: 8px 0 6px; font-size: 17px; color: var(--fg); }
.pillar-card h3::before { content: none; }
.pillar-card p { font-size: 14px; color: var(--fg-muted); margin: 0; line-height: 1.65; }

/* timeline (experience) */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  padding: 18px 0 18px 22px;
  border-left: 1px solid var(--border);
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px; top: 26px;
  width: 9px; height: 9px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.timeline li:hover::before { background: var(--accent); }
.timeline .role { font-weight: 500; }
.timeline .company { color: var(--accent); }
.timeline .dates { font-size: 12px; color: var(--fg-muted); margin-bottom: 6px; }
.timeline ul { color: var(--fg-muted); font-size: 13px; margin: 6px 0 0; padding-left: 18px; }
.timeline ul li { border: none; padding: 2px 0; }
.timeline ul li::before { content: none; }

/* tag chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg-muted);
  background: var(--bg);
}
.chip.ok { color: var(--accent); border-color: var(--accent); }

/* footer */
footer.sitefoot {
  margin-top: 80px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* terminal overlay */
#terminal {
  position: fixed;
  bottom: 16px; right: 16px;
  width: 520px; max-width: calc(100vw - 32px);
  height: 340px;
  background: rgba(8,8,8,0.96);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  z-index: 100;
  font-family: var(--mono);
  backdrop-filter: blur(6px);
}
[data-theme="light"] #terminal { background: rgba(250,250,247,0.98); }
#terminal.open { display: flex; }
#terminal header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--fg-muted);
}
#terminal header .dots { display: flex; gap: 6px; }
#terminal header .dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-bright); }
#terminal header .dots span:nth-child(1) { background: #ff5f56; }
#terminal header .dots span:nth-child(2) { background: #ffbd2e; }
#terminal header .dots span:nth-child(3) { background: #27c93f; }
#terminal header .title { flex: 1; text-align: center; }
#terminal header .close {
  background: none; border: none; color: var(--fg-muted); cursor: pointer;
  font-size: 14px;
}
#terminal .body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}
#terminal .line { white-space: pre-wrap; word-break: break-word; }
#terminal .line .user { color: var(--accent); }
#terminal .line .host { color: var(--cyan); }
#terminal .line .path { color: var(--amber); }
#terminal .line.err { color: var(--red); }
#terminal .line.ok { color: var(--accent); }
#terminal .inputline {
  display: flex; gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
#terminal .inputline .ps { color: var(--accent); white-space: nowrap; }
#terminal .inputline input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
}

/* floating terminal trigger */
.term-trigger {
  position: fixed;
  bottom: 16px; right: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  z-index: 99;
  transition: transform 160ms ease, border-color 160ms ease;
}
.term-trigger:hover { transform: translateY(-2px); border-color: var(--accent); }
.term-trigger .blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* marquee status */
.statusbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg-muted);
  flex-wrap: wrap;
}
.statusbar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
  display: inline-block;
  margin-right: 6px;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.statusbar b { color: var(--fg); font-weight: 500; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 24px 0 40px;
}
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .page { padding: 16px 18px 80px; }
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  margin: 12px 0 10px;
  letter-spacing: -0.02em;
}
.hero h1 .cursor {
  display: inline-block;
  width: 0.55em; height: 1em;
  background: var(--accent);
  vertical-align: -0.12em;
  margin-left: 4px;
  animation: blink 1.05s step-end infinite;
}
.hero .tagline {
  color: var(--fg-muted);
  font-size: 15px;
  max-width: 52ch;
}
.hero .meta {
  margin-top: 18px;
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.hero .meta b { color: var(--accent); font-weight: 500; }

/* dl */
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; font-size: 14px; }
dl.kv dt { color: var(--fg-muted); }
dl.kv dd { margin: 0; color: var(--fg); }

/* forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row input, .form-row select, textarea, input[type="text"], input[type="email"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 10px 12px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
}
textarea { min-height: 120px; resize: vertical; }
label.field { display: block; margin-bottom: 12px; font-size: 12px; color: var(--fg-muted); }
label.field span { display: block; margin-bottom: 4px; }
button.primary {
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--mono);
  cursor: pointer;
}
button.primary:hover { background: var(--accent-dim); }

a.btn-primary,
a.btn-primary:link,
a.btn-primary:visited {
  display: inline-block;
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--mono);
  text-decoration: none;
  border-bottom: none;
  transition: background 180ms, transform 180ms;
  cursor: pointer;
}
a.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); color: #0a0a0a; }
a.btn-primary:active { transform: translateY(0); }
html[data-mode="showcase"] a.btn-primary,
html[data-mode="showcase"] a.btn-primary:link,
html[data-mode="showcase"] a.btn-primary:visited { color: #fff; background: var(--accent); }
html[data-mode="showcase"] a.btn-primary:hover { color: #fff; background: var(--accent-dim); }

/* blog list */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: baseline;
}
.post-list .date { color: var(--fg-dim); font-size: 12px; }
.post-list .title { font-weight: 500; }
.post-list .title a { border: none; }
.post-list .cat {
  font-size: 11px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.post-list .cat.tech { color: var(--accent); border-color: var(--accent); }
.post-list .cat.travel { color: var(--amber); border-color: var(--amber); }
.post-list li:hover .title { color: var(--accent); }

/* training catalog */
.course-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.course {
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: 6px;
  padding: 18px 20px;
  transition: border-color 160ms;
}
.course:hover { border-color: var(--accent); }
.course .code {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.course h3 { margin: 4px 0 8px; font-size: 16px; }
.course h3::before { content: none; }
.course p { font-size: 14px; color: var(--fg-muted); margin: 0 0 10px; line-height: 1.65; }
.course .meta { font-size: 11px; color: var(--fg-dim); display: flex; gap: 14px; }
.course .meta b { color: var(--fg); font-weight: 500; }

/* inline accent */
.green { color: var(--accent); }
.amber { color: var(--amber); }
.cyan { color: var(--cyan); }
.magenta { color: var(--magenta); }
.red { color: var(--red); }

/* utility */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spacer-sm { height: 12px; }
.spacer { height: 24px; }
.spacer-lg { height: 48px; }
.lead { font-size: 17px; color: var(--fg); max-width: 68ch; line-height: 1.75; }
.section-intro { color: var(--fg-muted); max-width: 68ch; font-size: 15px; line-height: 1.7; }

/* ascii header */
.ascii {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 10px;
  line-height: 1.05;
  white-space: pre;
  opacity: 0.85;
  overflow: hidden;
}

/* service lists */
ul.bullets { list-style: none; padding: 0; margin: 8px 0; }
ul.bullets li {
  padding: 5px 0 5px 22px;
  position: relative;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.65;
}
ul.bullets li::before {
  content: "▸";
  color: var(--accent);
  position: absolute;
  left: 4px;
}

/* pricing / CTA box */
.cta-box {
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, rgba(74,222,128,0.06), transparent);
  border-radius: 8px;
  padding: 24px 26px;
  margin: 32px 0;
}
.cta-box h3 { margin-top: 0; color: var(--accent); }
.cta-box h3::before { content: "$ "; }
