/* ============================================================
   Omnesoft Interview Prep — Parish Khan
   Aesthetic: Terminal / IDE — matches parish.cv vibe
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,800;1,9..144,400&display=swap');

:root {
  --bg: #0d1117;
  --bg-elev: #161b22;
  --bg-elev-2: #1c232c;
  --border: #30363d;
  --border-soft: #21262d;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --text-muted: #6e7681;

  /* Brand accents — your existing gradient */
  --accent-orange: #FF6B1A;
  --accent-purple: #C77DFF;
  --accent-cyan: #79c0ff;
  --accent-green: #7ee787;
  --accent-yellow: #f2cc60;
  --accent-red: #ff7b72;
  --accent-pink: #ff9ec3;

  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(255, 107, 26, 0.08), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(199, 125, 255, 0.07), transparent 45%);
  background-attachment: fixed;
}

/* ---- Layout ---- */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 28px;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 10px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 2px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 13.5px;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.nav a::before {
  content: '›';
  color: var(--text-muted);
  font-weight: 700;
}

.nav a:hover {
  background: var(--bg-elev-2);
  color: var(--text);
}

.nav a.active {
  background: var(--bg-elev-2);
  color: var(--accent-orange);
  border-left-color: var(--accent-orange);
}

.nav a.active::before {
  color: var(--accent-orange);
}

/* ---- Main ---- */
.main {
  padding: 48px 56px 80px;
  max-width: 1100px;
}

.crumb {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.crumb a { color: var(--text-dim); text-decoration: none; }
.crumb a:hover { color: var(--accent-orange); }

h1.page-title {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text);
}

.page-lede {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 720px;
  margin-bottom: 40px;
  line-height: 1.6;
}

h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

h2 .num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent-orange);
  margin-right: 12px;
  font-weight: 700;
  vertical-align: middle;
}

h3 {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--accent-cyan);
}

h4 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  margin: 18px 0 6px;
  color: var(--accent-yellow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p { margin-bottom: 14px; color: var(--text-dim); }
p strong { color: var(--text); font-weight: 600; }

a { color: var(--accent-cyan); }

ul, ol { padding-left: 22px; margin-bottom: 18px; color: var(--text-dim); }
li { margin-bottom: 6px; }
li::marker { color: var(--accent-orange); }

code {
  font-family: var(--mono);
  background: var(--bg-elev-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent-pink);
  border: 1px solid var(--border-soft);
}

pre {
  background: #0a0e14;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 14px 0 22px;
  font-size: 13px;
  line-height: 1.6;
  position: relative;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 13px;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 22px;
  position: relative;
}

.card.accent-orange { border-left: 3px solid var(--accent-orange); }
.card.accent-purple { border-left: 3px solid var(--accent-purple); }
.card.accent-cyan   { border-left: 3px solid var(--accent-cyan); }
.card.accent-green  { border-left: 3px solid var(--accent-green); }
.card.accent-yellow { border-left: 3px solid var(--accent-yellow); }
.card.accent-red    { border-left: 3px solid var(--accent-red); }

.card h3:first-child, .card h4:first-child { margin-top: 0; }

/* ---- Q&A blocks ---- */
.qa {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--bg-elev);
}

.qa summary {
  cursor: pointer;
  padding: 16px 20px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.15s;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary:hover { background: var(--bg-elev-2); }

.qa summary::before {
  content: 'Q';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  color: white;
  font-weight: 800;
  font-size: 11px;
  border-radius: 4px;
}

.qa[open] summary {
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border-soft);
}

.qa-body {
  padding: 18px 20px 4px;
  border-top: 1px solid var(--border-soft);
}

.qa-body p:first-child::before {
  content: 'A: ';
  color: var(--accent-green);
  font-weight: 700;
}

/* ---- Highlights / quotes ---- */
.callout {
  border-left: 3px solid var(--accent-purple);
  background: rgba(199, 125, 255, 0.06);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 18px 0;
  font-size: 14px;
}

.callout.warn {
  border-left-color: var(--accent-yellow);
  background: rgba(242, 204, 96, 0.06);
}

.callout.danger {
  border-left-color: var(--accent-red);
  background: rgba(255, 123, 114, 0.06);
}

.callout.success {
  border-left-color: var(--accent-green);
  background: rgba(126, 231, 135, 0.06);
}

.callout strong { color: var(--text); }

/* ---- Tag pills ---- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 16px; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.tag.hot   { background: rgba(255, 107, 26, 0.12); border-color: rgba(255, 107, 26, 0.4); color: var(--accent-orange); }
.tag.core  { background: rgba(121, 192, 255, 0.12); border-color: rgba(121, 192, 255, 0.4); color: var(--accent-cyan); }
.tag.bonus { background: rgba(126, 231, 135, 0.12); border-color: rgba(126, 231, 135, 0.4); color: var(--accent-green); }

/* ---- Hero block (used on home) ---- */
.hero {
  position: relative;
  padding: 56px 48px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 107, 26, 0.12), rgba(199, 125, 255, 0.12)),
    var(--bg-elev);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 40px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.02) 39px, rgba(255,255,255,0.02) 40px),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.02) 39px, rgba(255,255,255,0.02) 40px);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-orange);
  font-weight: 700;
  margin-bottom: 14px;
  position: relative;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 18px;
  position: relative;
}

.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 17px;
  max-width: 640px;
  position: relative;
  color: var(--text-dim);
}

/* ---- Grid for cards ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 16px 0 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0 28px;
}

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---- Mini stat blocks ---- */
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-num {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-orange);
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ---- Tables ---- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 13.5px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
th {
  background: var(--bg-elev-2);
  font-weight: 700;
  color: var(--accent-yellow);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}
tr:last-child td { border-bottom: none; }
td code { font-size: 12px; }

/* ---- Steps / numbered list ---- */
.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  font-family: var(--mono);
}

/* ---- Practice section blocks ---- */
.script {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 16px 0 24px;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  position: relative;
  font-style: italic;
}
.script::before {
  content: '"';
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 800;
  position: absolute;
  top: -8px;
  left: 14px;
  color: var(--accent-orange);
  opacity: 0.3;
  line-height: 1;
}
.script p { color: var(--text); margin-bottom: 14px; }
.script p:last-child { margin-bottom: 0; }

/* ---- Page footer nav ---- */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.page-nav a {
  flex: 1;
  padding: 18px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}

.page-nav a:hover {
  border-color: var(--accent-orange);
  background: var(--bg-elev-2);
  transform: translateY(-2px);
}

.page-nav a small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.page-nav .next { text-align: right; }

/* ---- Mobile menu (off-canvas) ---- */
.menu-toggle { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 280px;
    max-width: 85vw;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-right: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open { overflow: hidden; }

  .menu-toggle {
    display: flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 101;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: color 0.15s, border-color 0.15s;
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    outline: none;
  }

  .main { padding: 72px 22px 60px; }
  h1.page-title { font-size: 32px; }
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 36px; }
}

/* ---- Misc ---- */
hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 32px 0;
}

.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--text-dim);
}

::selection { background: rgba(255, 107, 26, 0.35); color: white; }

/* Subtle scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
