:root {
  --bg: #060814;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e7ecff;
  --muted: #b3b9d4;
  --accent: #63f5c1;
  --accent-2: #7aa7ff;
  --accent-3: #ffb86c;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --blur: blur(18px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

a {
  color: inherit;
  text-decoration: none;
}

.anchor-target {
  scroll-margin-top: 120px;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(100% 100% at 50% 0%, rgba(99, 245, 193, 0.04), transparent 60%),
    radial-gradient(80% 80% at 90% 20%, rgba(122, 167, 255, 0.05), transparent 60%);
}

.glow {
  position: absolute;
  width: 40vw;
  height: 40vw;
  filter: blur(120px);
  transform: translate3d(0, 0, 0);
  opacity: 0.75;
}

.glow-a {
  background: radial-gradient(circle at 30% 30%, rgba(122, 167, 255, 0.35), transparent 65%);
  top: 0;
  left: -10vw;
}

.glow-b {
  background: radial-gradient(circle at 70% 40%, rgba(99, 245, 193, 0.3), transparent 65%);
  top: 10vh;
  right: -12vw;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(transparent 95%, rgba(255, 255, 255, 0.03) 96%),
    linear-gradient(90deg, transparent 95%, rgba(255, 255, 255, 0.03) 96%);
  background-size: 90px 90px;
  opacity: 0.25;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 12px;
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(6, 8, 20, 0.8), rgba(6, 8, 20, 0.5));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand .dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(99, 245, 193, 0.8);
}

.name {
  font-weight: 700;
  letter-spacing: 0.4px;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}

.nav a {
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 12px;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.pill {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding: 50px 0 38px;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin: 10px 0 14px;
  letter-spacing: -0.2px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tags span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
  box-shadow: 0 10px 30px rgba(99, 245, 193, 0.25), 0 10px 30px rgba(122, 167, 255, 0.2);
}

.btn.ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn.text {
  color: var(--accent);
  padding-left: 0;
  padding-right: 0;
}

.btn:hover {
  transform: translateY(-1px);
}

.signal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.glass-card .label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.4px;
}

.glass-card .value {
  font-weight: 600;
}

.glass-card .title {
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portrait {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, rgba(9, 16, 33, 0.9), rgba(10, 26, 40, 0.75));
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.portrait img {
  width: 100%;
  height: auto;
  display: block;
}

.portrait.missing {
  min-height: 320px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(99, 245, 193, 0.1), rgba(122, 167, 255, 0.08));
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.portrait.missing img {
  display: none;
}

.portrait.missing::after {
  content: "Add your photo at assets/mihails-gordijenko.jpg";
  font-weight: 600;
}

.portrait .badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 8px 12px;
  background: rgba(6, 8, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.info-stack {
  display: grid;
  gap: 12px;
}

.panel {
  margin: 44px 0;
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: -60% 50% 10% -35%;
  background: radial-gradient(circle, rgba(99, 245, 193, 0.08), transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}

.panel h2 {
  margin: 6px 0 10px;
  letter-spacing: -0.2px;
}

.panel-body {
  color: var(--muted);
}

.panel-body.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.cv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 10px 0 12px;
}

.cv-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.chip-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-list li {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.list-card .title {
  margin-bottom: 10px;
}

.line-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.line-list .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.line-list .role {
  font-weight: 700;
}

.line-list .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.line-list p {
  margin: 6px 0 0;
  color: var(--muted);
}

.positive {
  border: 1px solid rgba(99, 245, 193, 0.4);
  color: var(--text);
  box-shadow: 0 0 20px rgba(99, 245, 193, 0.2);
}

.timeline {
  display: grid;
  gap: 16px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  position: relative;
}

.timeline-item .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(99, 245, 193, 0.6);
  border: 3px solid rgba(6, 8, 20, 0.9);
  position: relative;
  top: 6px;
}

.timeline-item .content {
  padding: 16px;
}

.timeline-item .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

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

.panel.wide {
  padding: 32px 28px;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .btn {
    width: 100%;
    justify-content: center;
  }

  .panel {
    padding: 18px 16px;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-item {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }

  .portrait .badge {
    font-size: 0.85rem;
  }
}
