/* ============================================
   BUNYOD MUSAYEV — CV SITE
   Fixed sidebar + single-page scroll layout
   ============================================ */

:root {
  --bg: #0A0E12;
  --surface: #10161D;
  --surface-2: #151C24;
  --border: #212932;
  --text: #E6EDF3;
  --text-muted: #8B98A5;
  --text-dim: #57626D;
  --accent: #5EEAD4;
  --accent-dim: #2E7B6F;
  --accent-glow: rgba(94, 234, 212, 0.12);

  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  --font-body: 'IBM Plex Sans', 'Inter', -apple-system, sans-serif;

  --sidebar-w: 380px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-glow); color: var(--accent); }

/* background texture */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 70% 50% at 20% 0%, black 20%, transparent 80%);
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    650px circle at var(--mx, 50%) var(--my, 50%),
    rgba(94, 234, 212, 0.07),
    rgba(94, 234, 212, 0.02) 35%,
    transparent 60%
  );
}
@media (hover: none) {
  .spotlight { display: none; }
}

.bg-pulse {
  position: fixed;
  top: 12%;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}
.bg-pulse svg { width: 100%; height: 100%; }
.pulse-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 2400;
  animation: pulse-travel 8s linear infinite;
  filter: drop-shadow(0 0 6px rgba(94, 234, 212, 0.4));
}
@keyframes pulse-travel {
  0% { stroke-dashoffset: 2400; opacity: 0; }
  4% { opacity: 1; }
  92% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-line { animation: none; opacity: 0.25; }
}

/* ---------- layout shell ---------- */

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ---------- sidebar ---------- */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px 40px 0;
}

.status-line {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:.3;} }

.sidebar h1 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(30px, 3vw, 40px);
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 10px;
}

.sidebar h2 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.sidebar p.blurb {
  font-size: 14.5px;
  color: var(--text-dim);
  max-width: 320px;
  margin-bottom: 40px;
  line-height: 1.7;
}

nav.side-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

nav.side-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

nav.side-nav a .bar {
  height: 1px;
  width: 24px;
  background: var(--text-dim);
  transition: width 0.2s ease, background 0.2s ease;
}

nav.side-nav a:hover,
nav.side-nav a.active {
  color: var(--text);
}
nav.side-nav a:hover .bar,
nav.side-nav a.active .bar {
  width: 44px;
  background: var(--accent);
}
nav.side-nav a.active { color: var(--accent); }

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 10px 16px;
  border: 1px solid var(--accent-dim);
  border-radius: 5px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-decoration: none;
  width: fit-content;
  transition: background 0.2s ease, transform 0.2s ease;
}
.download-btn svg { width: 15px; height: 15px; }
.download-btn:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.social-row {
  display: flex;
  gap: 20px;
  margin-top: 48px;
}
.social-row a {
  color: var(--text-dim);
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
}
.social-row a:hover { color: var(--accent); transform: translateY(-2px); }
.social-row svg { width: 20px; height: 20px; }

/* ---------- content ---------- */

.content {
  flex: 1;
  min-width: 0;
  padding: 140px 0 120px;
  max-width: 640px;
}

section.panel {
  padding-bottom: 100px;
  scroll-margin-top: 60px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 12px 0;
  margin-left: -4px;
  padding-left: 4px;
}

.panel-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
}

.panel-head h3 {
  font-size: 22px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.panel-head .rule {
  height: 1px;
  background: var(--border);
  flex: 1;
}

.lede {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.lede strong { color: var(--text); font-weight: 500; }

/* experience entries */

.exp-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.exp-entry:last-child { border-bottom: none; }

.exp-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 3px;
}

.exp-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.exp-sub {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
}
.exp-entry ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}
.exp-entry li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}
.exp-entry li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 3px;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tag-list span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 4px;
}

/* project cards */

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.proj-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.proj-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.proj-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.proj-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.proj-sub {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
}
.proj-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.proj-card li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}
.proj-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 3px;
}

/* contact */

.contact-cta {
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.8;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14.5px;
  padding: 4px 0;
  width: fit-content;
}
.contact-row svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.contact-row:hover { color: var(--accent); }

footer.site-footer {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

/* ---------- project links ---------- */

.proj-link {
  color: var(--accent-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.proj-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .layout { flex-direction: column; padding: 0 24px; }
  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    padding: 56px 0 32px;
  }
  nav.side-nav { display: none; }
  .content { padding: 32px 0 80px; max-width: 100%; }
  .exp-entry { grid-template-columns: 1fr; gap: 6px; }
  .panel-head { position: static; }
}
