:root {
  --bg: #f8f7ff;
  --bg-soft: #fafaff;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #6d4aff;
  --accent-2: #7c3aed;
  --soft: #eee9ff;
  --border: #e8e5f2;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(109, 74, 255, 0.08);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 16px 40px rgba(109, 74, 255, 0.12);
  --ok: #16a34a;
  --ok-bg: #ecfdf3;
  --radius: 18px;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 12% -8%, #ebe4ff 0%, transparent 55%),
    radial-gradient(700px 360px at 92% 8%, #e8f0ff 0%, transparent 50%),
    var(--bg);
  line-height: 1.5;
}

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

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.brand-text {
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  margin-right: 12px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.is-active {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}

.header-cta {
  flex-shrink: 0;
}

.header-cta.header-profile {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
}

.header-profile-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(109, 74, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px rgba(109, 74, 255, 0.36);
}

.btn-secondary,
.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover,
.btn-outline:hover {
  box-shadow: var(--shadow);
}

.hero {
  padding: 72px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 11ch;
}

.accent-gradient {
  background: linear-gradient(120deg, #6d4aff, #4f7cff 55%, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 18px 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
}

.hero-carousel {
  position: relative;
  min-height: 320px;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero-slide:not(.is-active) {
  position: absolute;
  inset: 0;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #c7c2dc;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot.is-active {
  background: var(--accent-2);
  transform: scale(1.15);
}

.hero-dot:hover {
  background: var(--accent);
}

.preview-card {
  position: relative;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #1f2937;
  background: #111827;
}

.preview-dots {
  width: 42px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 5px 5px, #ff5f57 4px, transparent 5px),
    radial-gradient(circle at 21px 5px, #febc2e 4px, transparent 5px),
    radial-gradient(circle at 37px 5px, #28c840 4px, transparent 5px);
}

.preview-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.preview-code {
  margin: 0;
  padding: 14px 16px 42px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e2e8f0;
  overflow-x: auto;
  background: #0f172a;
}

.preview-code .line-num {
  display: inline-block;
  width: 1.6em;
  color: #64748b;
  user-select: none;
}

.tok-kw {
  color: #c4b5fd;
}
.tok-fn {
  color: #93c5fd;
}
.tok-type {
  color: #5eead4;
}
.tok-num {
  color: #fdba74;
}
.tok-bool {
  color: #f9a8d4;
}

.tok-str {
  color: #86efac;
}

.diff-add {
  display: inline;
  background: rgba(22, 101, 52, 0.35);
  color: #86efac;
  box-decoration-break: clone;
}

.preview-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: #14532d;
  color: #86efac;
  border: 1px solid #166534;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.preview-caption {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 56px 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.section-icon {
  color: var(--accent);
  font-size: 1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: #ddd6fe;
}

.project-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.project-icon-code {
  background: var(--soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.project-icon-cube {
  background: #eef2ff;
  color: #4f46e5;
}

.project-card-content {
  min-width: 0;
  flex: 1;
}

.project-card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  font-weight: 700;
}

.project-card-kicker {
  margin: 6px 0 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
}

.project-card-description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.project-card-preview {
  margin-top: 18px;
  min-width: 0;
}

.mini-diff,
.mini-dash {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfaff;
  padding: 12px;
}

.mini-diff {
  display: grid;
  gap: 6px;
}

.mini-diff-line {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-diff-line.add {
  background: #ecfdf3;
  color: #166534;
  border-radius: 4px;
  padding: 2px 6px;
}

.mini-dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 56px;
  margin-bottom: 12px;
}

.mini-dash-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #c4b5fd, #6d4aff);
  opacity: 0.75;
}

.mini-dash-rows span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #e9e5f8;
  margin-bottom: 7px;
}

.mini-dash-rows span:nth-child(2) {
  width: 78%;
}

.mini-dash-rows span:nth-child(3) {
  width: 62%;
  margin-bottom: 0;
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

.project-card-link:hover {
  text-decoration: underline;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.text-link:hover {
  text-decoration: underline;
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.build-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.build-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.build-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.build-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.build-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  font-size: 0.9rem;
  font-weight: 600;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.chip-dot.py { background: #3776ab; }
.chip-dot.fa { background: #009688; }
.chip-dot.dk { background: #2496ed; }
.chip-dot.re { background: #61dafb; }
.chip-dot.ts { background: #3178c6; }
.chip-dot.pg { background: #336791; }
.chip-dot.lc { background: #7c3aed; }
.chip-dot.cu { background: #76b900; }
.chip-dot.rq { background: #ff6600; }

.contact-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 180px;
  background: radial-gradient(ellipse at center, rgba(109, 74, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.contact-card h2 {
  position: relative;
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.contact-card p {
  position: relative;
  margin: 12px auto 0;
  max-width: 34rem;
  color: var(--muted);
}

.contact-actions {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .project-grid,
  .build-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 20px 16px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid #f1f0f7;
  }

  .header-cta {
    display: none;
  }

  .header-cta.header-profile {
    display: inline-flex;
    order: 2;
    margin-left: 8px;
  }

  .nav-toggle {
    order: 3;
  }

  .header-inner {
    position: relative;
  }

  .hero {
    padding-top: 40px;
  }

  .contact-card {
    padding: 28px 20px;
  }
}
