/* Shared dark theme for every page */
:root {
  --bg: #0b0b10;
  --surface: #14141c;
  --surface-2: #1b1b26;
  --border: #262634;
  --text: #e8e8f0;
  --muted: #9a9ab0;
  --accent: #c43cf0;
  --accent-2: #6a6cff;
  --pink: #f0468f;
  --gradient: linear-gradient(135deg, #6a6cff 0%, #c43cf0 50%, #f0468f 100%);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* soft glow behind the page */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -20vw auto auto;
  width: 70vw;
  height: 70vh;
  background: radial-gradient(closest-side, rgba(196, 60, 240, 0.14), transparent);
  pointer-events: none;
  z-index: -1;
}
body::after {
  content: "";
  position: fixed;
  inset: auto auto -25vh -20vw;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(closest-side, rgba(106, 108, 255, 0.12), transparent);
  pointer-events: none;
  z-index: -1;
}

main { flex: 1; }

a { color: var(--accent); }
a:hover { color: #e07bff; }

.container { max-width: 1240px; }

::selection { background: rgba(196, 60, 240, 0.4); }

::-webkit-scrollbar { width: 0.45rem; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #33334a; border-radius: 4px; }

.text-muted { color: var(--muted) !important; }
.mono { font-family: var(--mono); }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Navbar ---------- */
.site-nav {
  background: rgba(11, 11, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav .nav-logo { width: 4.5rem; }
.site-nav .nav-link {
  color: var(--muted);
  font-weight: 600;
  padding: 0.4rem 0.9rem !important;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.site-nav .nav-link:hover { color: var(--text); }
.site-nav .nav-link.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.page { padding-top: 7.5rem; padding-bottom: 4rem; }

/* one-page layout: the top padding also keeps headings clear of the fixed navbar when jumping to a section */
.section { padding-top: 7rem; }
#home { scroll-margin-top: 7.5rem; } /* matches .page padding, so "Home" scrolls back to the very top */

/* ---------- Buttons ---------- */
.btn-glow {
  background: var(--gradient);
  color: #fff;
  border: 0;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.8rem 2rem;
  box-shadow: 0 8px 30px -8px rgba(196, 60, 240, 0.6);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-glow:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -8px rgba(196, 60, 240, 0.8);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.8rem 2rem;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); background: var(--surface); }

/* ---------- Surfaces ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.section-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- Editor panels ---------- */
.terminal {
  background: #0f0f16;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  overflow: hidden;
}
/* VS Code-style tab bar: one active editor tab on a darker strip */
.terminal-bar {
  display: flex;
  align-items: stretch;
  background: #0a0a0f;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.terminal-bar .tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem 0.55rem 0.9rem;
  background: #0f0f16; /* same as the editor body, so the tab looks attached */
  color: var(--text);
  border-top: 2px solid var(--accent);
  border-right: 1px solid var(--border);
  margin-bottom: -1px; /* covers the strip's bottom border under the active tab */
}
.terminal-bar .tab .bi-markdown { color: #519aba; }
.terminal-bar .tab .bi-terminal { color: #89e051; }
.terminal-bar .tab .bi-filetype-py { color: #f0c674; }
.terminal-bar .tab-close {
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  margin-left: 0.25rem;
  border-radius: 4px;
  color: var(--muted);
  font-size: 1rem;
}
.terminal-bar .tab-close:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Forms ---------- */
.form-control,
.input-group-text {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.form-control::placeholder { color: #6c6c84; }
.form-control:focus {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(196, 60, 240, 0.2);
}
.input-group-text { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--text); }
.site-footer .socials a { font-size: 1.35rem; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); animation: reveal 0.8s ease forwards; }
.reveal.d1 { animation-delay: 0.1s; }
.reveal.d2 { animation-delay: 0.2s; }
.reveal.d3 { animation-delay: 0.3s; }
.reveal.d4 { animation-delay: 0.4s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
