:root {
  --section-width: 1200px;
  --shadow: 0 0 10px rgba(159, 91, 255, 0.35), 0 0 30px rgba(159, 91, 255, 0.22), 0 0 60px rgba(159, 91, 255, 0.15);
}

body[data-theme="dark"] {
  --bg: #05030b;
  --bg-soft: #0d0917;
  --card: #0a0712;
  --card-2: #110c1e;
  --text: #f5f2ff;
  --muted: #b5a9cf;
  --line: rgba(170, 118, 255, 0.22);
  --primary: #9f5bff;
  --primary-2: #c38cff;
  --glow: rgba(159, 91, 255, 0.75);
  --body-bg:
    radial-gradient(circle at 20% 20%, rgba(159, 91, 255, 0.12), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(195, 140, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #030208 0%, #05030b 38%, #07040f 100%);
}

body[data-theme="light"] {
  --bg: #f7f2ea;
  --bg-soft: #efe5d7;
  --card: #fffaf2;
  --card-2: #f3eadf;
  --text: #16121f;
  --muted: #5d536f;
  --line: rgba(148, 102, 214, 0.22);
  --primary: #9358f7;
  --primary-2: #b684ff;
  --glow: rgba(147, 88, 247, 0.45);
  --body-bg:
    radial-gradient(circle at 20% 20%, rgba(147, 88, 247, 0.08), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(182, 132, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #fffdf9 0%, #f7f2ea 40%, #efe5d7 100%);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--body-bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: var(--bg-soft);
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--primary-2));
  border-radius: 999px;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--section-width), calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 90px 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 50px;
}

.section-title span,
.logo span,
.hero-title span:last-child {
  color: var(--primary-2);
  text-shadow: 0 0 14px rgba(195, 140, 255, 0.32);
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
  box-shadow: var(--shadow);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-2);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

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

.toggle-btn,
.menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: 0.25s ease;
}

.toggle-btn:hover,
.menu-btn:hover {
  color: var(--primary-2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.menu-btn {
  display: none;
}

.hero {
  min-height: calc(100vh - 82px);
  display: flex;
  align-items: center;
  padding: 60px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.hero-text {
  max-width: 650px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.98rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: '';
  width: 42px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow);
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 800;
  line-height: 1.06;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  min-height: 66px;
  color: var(--text);
  margin-bottom: 22px;
}

.typed-text {
  color: var(--primary-2);
  text-shadow: 0 0 14px rgba(195, 140, 255, 0.28);
  margin-left: 8px;
}

.cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.1em;
  background: var(--primary-2);
  box-shadow: var(--shadow);
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.socials,
.footer-socials {
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.socials a,
.footer-socials a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-2);
  font-size: 1.1rem;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.socials a:hover,
.footer-socials a:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow);
}

.cv-icon {
  font-size: 0.95rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  outline: 0;
  cursor: pointer;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, color 0.28s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 15px rgba(159, 91, 255, 0.4), 0 0 40px rgba(159, 91, 255, 0.2);
}

.btn-secondary {
  color: var(--text);
  border: 2px solid var(--primary);
  background: transparent;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.hero-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.image-ring {
  width: min(510px, 82vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--primary-2) 22%, transparent), transparent 58%),
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--primary) 15%, transparent), transparent 65%);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.image-ring::before {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--primary-2) 55%, transparent);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--primary-2) 30%, transparent),
    0 0 45px color-mix(in srgb, var(--primary) 22%, transparent),
    0 0 90px color-mix(in srgb, var(--primary) 15%, transparent);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.image-ring::after {
  content: '';
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary-2) 32%, transparent) 0%, color-mix(in srgb, var(--primary) 12%, transparent) 35%, transparent 68%);
  filter: blur(18px);
  z-index: -1;
  opacity: 0.85;
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}

.image-ring:hover {
  transform: scale(1.03);
  filter: brightness(1.04);
}

.image-ring:hover::before {
  transform: scale(1.01);
  box-shadow:
    0 0 28px color-mix(in srgb, var(--primary-2) 45%, transparent),
    0 0 65px color-mix(in srgb, var(--primary) 35%, transparent),
    0 0 120px color-mix(in srgb, var(--primary) 28%, transparent);
}

.image-ring:hover::after {
  transform: scale(1.05);
  opacity: 1;
  filter: blur(22px);
}

.profile-image {
  width: 78%;
  height: 78%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  position: relative;
  z-index: 1;
  border: 2px solid color-mix(in srgb, var(--primary-2) 30%, transparent);
  background: var(--card-2);
}

.about-grid,
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.glass-card,
.experience-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card-2) 86%, transparent), color-mix(in srgb, var(--card) 95%, transparent));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.glass-card:hover,
.experience-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--primary-2) 35%, transparent);
}

.experience-link{
  text-decoration:none;
  color:inherit;
  display:block;
}


.about-text h3,
.skills-block h3,
.certificates-block h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.about-text p,
.experience-desc {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 14px;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.highlight-item,
.skill-chip,
.certificate-item {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary-2) 16%, transparent);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.highlight-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
}

.highlight-item span {
  color: var(--muted);
  font-size: 0.94rem;
}

.skill-list,
.certificate-list,
.experience-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid color-mix(in srgb, var(--primary-2) 12%, transparent);
  min-height: 280px;
  transform: scale(1);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
  transform: scale(1.035);
  border-color: color-mix(in srgb, var(--primary-2) 36%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--primary) 18%, transparent), 0 0 55px color-mix(in srgb, var(--primary) 14%, transparent);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.project-card:hover img {
  transform: scale(1.08);
  filter: brightness(0.78);
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(180deg, rgba(4, 3, 8, 0.02), rgba(4, 3, 8, 0.85));
}

.project-overlay h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.project-overlay p {
  color: #e5ddf7;
  line-height: 1.75;
  font-size: 0.95rem;
  max-width: 90%;
}

body[data-theme="light"] .project-overlay p {
  color: #f7f1ff;
}

.project-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tags span {
  padding: 8px 13px;
  font-size: 0.82rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary-2) 20%, transparent);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: #fff;
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-2) 85%, transparent), color-mix(in srgb, var(--primary) 70%, transparent));
  box-shadow: var(--shadow);
  border-radius: 999px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 18px 36px;
  margin-bottom: 26px;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-2);
  box-shadow: 0 0 16px color-mix(in srgb, var(--primary-2) 80%, transparent), 0 0 30px color-mix(in srgb, var(--primary) 35%, transparent);
  transform: translateY(-50%);
}

.timeline-item.left .timeline-dot {
  right: -9px;
}

.timeline-item.right .timeline-dot {
  left: -9px;
}

.timeline-year {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.timeline-card {
  border: 3px solid var(--primary);
  border-radius: 999px;
  padding: 28px 34px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 18%, transparent);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 26px color-mix(in srgb, var(--primary) 28%, transparent), 0 0 65px color-mix(in srgb, var(--primary) 14%, transparent);
}

.timeline-card h3 {
  font-size: 1.38rem;
  margin-bottom: 10px;
}


.timeline-link-card {
  display: block;
  color: inherit;
}

.experience-list-single {
  max-width: 980px;
  margin: 0 auto;
}

.skills-cert-grid {
  align-items: stretch;
}

.clickable-list .certificate-item,
.cert-link {
  display: block;
}

.cert-link:hover,
.timeline-link-card:hover {
  color: inherit;
}

.timeline-card p,
.experience-location {
  color: var(--muted);
  line-height: 1.85;
  font-size: 0.95rem;
}

.experience-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.experience-top h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.experience-company {
  color: var(--primary-2);
  font-weight: 600;
}

.experience-date {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.skills-grid {
  align-items: start;
}

.skill-bar-group {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.skill-row {
  display: grid;
  gap: 8px;
}

.skill-row-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

.skill-progress {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  overflow: hidden;
  position: relative;
}

.skill-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow);
}

.footer {
  padding: 44px 0 36px;
  border-top: 1px solid color-mix(in srgb, var(--primary-2) 12%, transparent);
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.footer-links a {
  font-weight: 500;
  color: var(--text);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--primary-2);
}

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

@media (max-width: 1000px) {
  .hero-grid,
  .about-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-text {
    order: 2;
  }

  .hero-image-wrap {
    order: 1;
  }

  .timeline::before {
    left: 22px;
    transform: none;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 18px 0 18px 58px;
  }

  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: 13px;
    right: auto;
  }

  .experience-top {
    flex-direction: column;
  }
}

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

  .nav-links {
    position: fixed;
    top: 82px;
    right: -100%;
    width: min(320px, 85vw);
    height: calc(100vh - 82px);
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    border-left: 1px solid color-mix(in srgb, var(--primary-2) 14%, transparent);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 34px 28px;
    transition: right 0.3s ease;
  }

  .nav-links.show {
    right: 0;
  }

  .menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--section-width), calc(100% - 28px));
  }

  .section {
    padding: 74px 0;
  }

  .hero-title {
    font-size: 2.65rem;
  }

  .hero-subtitle {
    min-height: 90px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .timeline-card {
    border-radius: 28px;
  }

  .glass-card,
  .experience-card {
    padding: 22px;
  }

  .footer-links {
    gap: 18px;
  }
}