:root {
  --bg: #050816;
  --bg-elevated: #0b1020;
  --bg-soft: #101629;
  --accent: #7b5cff;
  --accent-soft: rgba(123, 92, 255, 0.12);
  --accent-strong: #ff7bd8;
  --text: #f5f5ff;
  --muted: #9aa0c2;
  --border-subtle: rgba(154, 160, 194, 0.25);
  --chip-bg: rgba(16, 22, 41, 0.9);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top left, #1a1f3b 0, #050816 45%, #02010a 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 20px 56px;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 18px;
  margin-bottom: 0;
  background: linear-gradient(120deg, rgba(11, 16, 32, 0.96), rgba(17, 24, 56, 0.96));
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1080px;
  z-index: 100;
  backdrop-filter: blur(22px);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: radial-gradient(circle at 20% 0%, #ff7bd8 0, #7b5cff 40%, #3bc9ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #050816;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.logo-photo {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  object-fit: cover;
  background: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logo-tagline {
  font-size: 12px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.site-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
  border-color: rgba(123, 92, 255, 0.4);
  background: rgba(123, 92, 255, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 56px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 10px;
}

.hero h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 38px;
  line-height: 1.1;
  margin: 0 0 16px;
}

.hero-lead {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 36rem;
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease,
    border-color 0.12s ease, color 0.12s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #ff7bd8, #7b5cff);
  color: #050816;
  box-shadow: 0 16px 34px rgba(123, 92, 255, 0.5);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(123, 92, 255, 0.7);
}

.btn.ghost {
  border-color: rgba(123, 92, 255, 0.4);
  background: rgba(11, 16, 32, 0.9);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(123, 92, 255, 0.12);
}

.btn.full-width {
  width: 100%;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  background: radial-gradient(circle at 0% 0%, rgba(255, 123, 216, 0.22), transparent 65%),
    radial-gradient(circle at 100% 100%, rgba(59, 201, 255, 0.16), transparent 60%),
    linear-gradient(145deg, #050816, #0c1021);
  border-radius: 30px;
  padding: 14px;
  border: 1px solid rgba(123, 92, 255, 0.4);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

#mathCanvas {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: block;
  border-radius: 22px;
  background: radial-gradient(circle at 10% 0%, #050816 0, #050816 50%, #10172f 100%);
}

.hero-visual-overlay {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.stat-card {
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(5, 8, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 8px;
}

.stat-card:last-child {
  align-self: flex-end;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 600;
}

.section {
  margin-bottom: 52px;
}

.section-header h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 22px;
  margin: 0 0 6px;
}

.section-header p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 40rem;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 28px;
}

.about-text p {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--muted);
}

.about-photo-card {
  background: radial-gradient(circle at 0 0, rgba(59, 201, 255, 0.2), transparent 55%),
    linear-gradient(145deg, #050816, #0f172a);
  border-radius: 24px;
  padding: 18px;
  border: 1px solid rgba(123, 92, 255, 0.6);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-photo-placeholder {
  border-radius: 18px;
  background: radial-gradient(circle at 20% 0, rgba(255, 123, 216, 0.5), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(59, 201, 255, 0.6), transparent 55%),
    #050816;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 0;
}

.avatar-circle {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.photo-name {
  margin: 0 0 2px;
  font-weight: 600;
}

.photo-role {
  margin: 0 0 2px;
  font-size: 13px;
  color: var(--muted);
}

.photo-extra {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.timeline {
  border-left: 1px solid rgba(154, 160, 194, 0.35);
  margin-left: 8px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #ff7bd8, #7b5cff);
  box-shadow: 0 0 0 4px rgba(123, 92, 255, 0.25);
}

.timeline-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.timeline-card {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  border: 1px solid rgba(154, 160, 194, 0.3);
}

.timeline-card h3 {
  margin: 0 0 2px;
  font-size: 15px;
}

.timeline-org {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.timeline-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  background: radial-gradient(circle at 0 0, rgba(255, 123, 216, 0.22), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(59, 201, 255, 0.18), transparent 60%),
    #050816;
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  border: 1px solid rgba(123, 92, 255, 0.6);
  box-shadow: var(--shadow-soft);
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
}

.product-tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 8, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.product-card p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.product-highlights {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}

.skills-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.skills-column h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid rgba(154, 160, 194, 0.35);
  font-size: 12px;
  color: var(--muted);
  backdrop-filter: blur(12px);
}

.skills-visual {
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: radial-gradient(circle at 0 0, rgba(123, 92, 255, 0.35), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(59, 201, 255, 0.2), transparent 50%),
    #050816;
  border: 1px solid rgba(123, 92, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.skills-visual-title {
  margin: 0 0 10px;
  font-size: 14px;
}

.skills-orbit {
  position: relative;
  height: 180px;
  margin-bottom: 10px;
}

.orbit-node {
  position: absolute;
  min-width: 60px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(5, 8, 22, 0.92);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transform-origin: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.orbit-node:hover,
.orbit-node.active {
  transform: scale(1.06);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.7);
  background: linear-gradient(135deg, rgba(255, 123, 216, 0.9), rgba(123, 92, 255, 0.9));
}

.skills-orbit-description {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

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

.edu-card {
  padding: 14px 14px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
}

.edu-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.edu-meta {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.edu-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.personal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 22px;
}

.personal-layout p {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--muted);
}

.personal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.contact-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.contact-details li {
  margin-bottom: 8px;
}

.contact-form {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  border: 1px solid var(--border-subtle);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-field label {
  font-size: 13px;
}

.form-field input,
.form-field select,
.form-field textarea {
  border-radius: 10px;
  border: 1px solid rgba(154, 160, 194, 0.5);
  background: rgba(5, 8, 22, 0.8);
  color: var(--text);
  padding: 7px 9px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(123, 92, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(123, 92, 255, 0.9);
}

.form-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.site-footer {
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid rgba(154, 160, 194, 0.3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 880px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 24px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
  }

  .about-layout,
  .products-grid,
  .skills-layout,
  .education-grid,
  .personal-layout,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page {
    padding: 18px 16px 40px;
  }
}

@media (max-width: 600px) {
  .site-header {
    position: fixed;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .skills-orbit {
    height: 160px;
  }
}

