:root {
    --cyan: #06d6a0;
  --electric: #4361ee;
  --violet: #7b2ff7;
  --magenta: #f72585;
  --amber: #ffbe0b;

    --bg-deep: #13172e;
  --bg-base: #181d3a;
  --bg-card: rgba(28, 35, 65, 0.7);
  --bg-card-hover: rgba(38, 48, 85, 0.75);
  --bg-glass: rgba(22, 28, 55, 0.65);

    --text-bright: #ffffff;
  --text-primary: #edf2f7;
  --text-secondary: #a8b6c8;
  --text-muted: #7a8ba3;

    --gradient-hero: linear-gradient(135deg, var(--electric), var(--violet), var(--magenta));
  --gradient-card-border: linear-gradient(135deg, var(--electric), var(--violet), var(--magenta), var(--cyan));
  --gradient-btn: linear-gradient(135deg, var(--electric), var(--violet));

    --border-subtle: rgba(255, 255, 255, 0.07);
  --glow-blue: 0 0 30px rgba(67, 97, 238, 0.3);
  --glow-violet: 0 0 30px rgba(123, 47, 247, 0.3);
  --glow-magenta: 0 0 30px rgba(247, 37, 133, 0.2);

    --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

    --section-gap: 7rem;
  --container-max: 1100px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-hero);
  z-index: 200;
  width: 0%;
  transition: width 0.1s linear;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.nav {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-inner { display: flex; align-items: center; gap: 0.2rem; }

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
}

.nav-link:hover { color: var(--text-bright); }

.nav-link.active {
  color: var(--text-bright);
  background: rgba(67, 97, 238, 0.2);
  box-shadow: inset 0 0 12px rgba(67, 97, 238, 0.15);
}

.nav-link--game {
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.25), rgba(124, 58, 237, 0.25));
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: var(--text-bright);
  animation: gameGlow 3s ease-in-out infinite;
}

@keyframes gameGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(124, 58, 237, 0.2); }
  50% { box-shadow: 0 0 18px rgba(124, 58, 237, 0.4); }
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  z-index: 2;
}

.hero-content { max-width: 750px; }

.hero-name {
  font-size: clamp(3.2rem, 9vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: var(--gradient-hero);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-flow 5s ease-in-out infinite;
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-primary);
  margin-top: 1rem;
}

.hero-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--electric);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

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

.hero-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-link:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(67, 97, 238, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero-link svg { width: 16px; height: 16px; }

.hero-link--primary {
  background: var(--gradient-btn);
  color: white;
  border: none;
  font-weight: 600;
}

.hero-link--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(67, 97, 238, 0.4);
  border-color: transparent;
  color: white;
}

.section { padding: var(--section-gap) 0; position: relative; z-index: 2; }

.section-header { text-align: center; margin-bottom: 4rem; }

.section-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.8rem;
  background: rgba(6, 214, 160, 0.06);
  border: 1px solid rgba(6, 214, 160, 0.12);
  border-radius: var(--radius-full);
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.03em;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.skill-category {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skill-category:hover {
  border-color: rgba(67, 97, 238, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--glow-blue);
}

.skill-category:hover::before { opacity: 1; }

.skill-category-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category-title svg { width: 14px; height: 14px; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.skill-tag {
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag:hover {
  color: var(--text-bright);
  background: rgba(67, 97, 238, 0.12);
  border-color: rgba(67, 97, 238, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cert-item:last-child { border-bottom: none; }

.cert-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.15), rgba(123, 47, 247, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-icon svg { width: 16px; height: 16px; color: var(--electric); }

.cert-name { font-size: 0.83rem; font-weight: 500; color: var(--text-primary); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--border-subtle);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  perspective: 800px;
}

.project-card-wrapper:hover {
  background: var(--gradient-card-border);
  background-size: 300% 300%;
  animation: border-flow 3s ease infinite;
}

@keyframes border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.project-card-wrapper--featured {
  grid-column: 1 / -1;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border-radius: calc(var(--radius-lg) - 1px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card .card-spotlight {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  border-radius: calc(var(--radius-lg) - 1px);
}

.project-card-wrapper:hover .card-spotlight {
  opacity: 1;
}

.project-card-wrapper:hover .project-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 2;
}

.project-date {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(6, 214, 160, 0.1);
  border: 1px solid rgba(6, 214, 160, 0.15);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  line-height: 1.35;
  position: relative;
  z-index: 2;
}

.project-description {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.75;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.project-description li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.45rem;
}

.project-description li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--electric);
  font-size: 0.9em;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 2;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.project-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.project-tag:hover {
  color: var(--electric);
  background: rgba(67, 97, 238, 0.1);
}

.project-links { display: flex; gap: 0.4rem; }

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.project-link:hover {
  color: var(--text-bright);
  border-color: var(--electric);
  background: rgba(67, 97, 238, 0.1);
  box-shadow: 0 0 16px rgba(67, 97, 238, 0.15);
  transform: translateY(-2px);
}

.project-link svg { width: 12px; height: 12px; }

.timeline {
  max-width: 750px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--electric), var(--violet), var(--magenta), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--electric);
  box-shadow: 0 0 16px rgba(67, 97, 238, 0.6), 0 0 4px rgba(67, 97, 238, 0.9);
  animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(67, 97, 238, 0.4); }
  50% { box-shadow: 0 0 20px rgba(67, 97, 238, 0.7), 0 0 40px rgba(67, 97, 238, 0.2); }
}

.timeline-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-card:hover {
  border-color: rgba(67, 97, 238, 0.25);
  transform: translateX(6px);
  box-shadow: -4px 0 20px rgba(67, 97, 238, 0.1);
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.15rem;
}

.timeline-subtitle {
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.timeline-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--electric);
}

.timeline-body {
  margin-top: 0.75rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.timeline-body li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
}

.timeline-body li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--electric);
}

.footer {
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--electric), var(--violet), var(--magenta), transparent);
}

.footer-cta-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.footer-cta-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: white;
  background: var(--gradient-btn);
  background-size: 200% 200%;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.4s ease;
  animation: gradient-flow 4s ease-in-out infinite;
}

.footer-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(67, 97, 238, 0.4);
}

.footer-btn svg { width: 16px; height: 16px; }

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-social-link:hover {
  color: var(--text-bright);
  border-color: var(--electric);
  background: rgba(67, 97, 238, 0.12);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.2);
}

.footer-social-link svg { width: 18px; height: 18px; }

.footer-meta {
  margin-top: 2.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.visitor-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  background: rgba(67, 97, 238, 0.15);
  border: 1px solid rgba(67, 97, 238, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  box-shadow: 0 0 20px rgba(67, 97, 238, 0.2);
  letter-spacing: 0.02em;
}

.visitor-count svg { width: 16px; height: 16px; stroke: #4361ee; }

.fade-in {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.25s; }
.fade-in-delay-4 { transition-delay: 0.35s; }

.stagger-children.is-visible > * {
  opacity: 0;
  animation: stagger-up 0.6s ease forwards;
}

.stagger-children.is-visible > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children.is-visible > *:nth-child(2) { animation-delay: 0.12s; }
.stagger-children.is-visible > *:nth-child(3) { animation-delay: 0.19s; }
.stagger-children.is-visible > *:nth-child(4) { animation-delay: 0.26s; }
.stagger-children.is-visible > *:nth-child(5) { animation-delay: 0.33s; }
.stagger-children.is-visible > *:nth-child(6) { animation-delay: 0.40s; }
.stagger-children.is-visible > *:nth-child(7) { animation-delay: 0.47s; }
.stagger-children.is-visible > *:nth-child(8) { animation-delay: 0.54s; }

@keyframes stagger-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card-wrapper--featured { grid-column: 1; }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --section-gap: 4.5rem; }

  .nav {
    top: auto;
    bottom: 1rem;
    max-width: calc(100% - 2rem);
  }

  .nav-inner {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-inner::-webkit-scrollbar { display: none; }

  .nav-link { font-size: 0.7rem; padding: 0.4rem 0.7rem; }

  .hero {
    min-height: 85vh;
    padding: 4rem 1.5rem 6rem;
  }

  .hero-links {
    flex-direction: column;
    align-items: center;
  }

  .project-header { flex-direction: column; }

  .project-footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}
