:root {
  --background: #ffffff;
  --foreground: #171717;
  --dark-background: #0a0a0f;
  --dark-foreground: #ffffff;
  --dark-secondary: #c0c0c0;
  --glow-color: #ffffff;
  --particle-color: #ffffff;
  --particle-count: 50;
  --particle-size-max: 4px;
  --animation-duration: 6s;
  --sparkle-frequency: 20%;
  --glow-blur: 15px;
  --glow-spread: 3px;
  --glow-intensity: 0.8;
  --nav-height: 4rem;
  --container-wide: 72rem;
  --container-regular: 64rem;
  --container-narrow: 56rem;
  --shadow-soft: 0 10px 40px rgba(15, 23, 42, 0.12);
  --border-dark: rgba(75, 85, 99, 0.65);
  --card-dark: rgba(31, 41, 55, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--foreground);
  background: var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.dark-theme {
  --background: var(--dark-background);
  --foreground: var(--dark-foreground);
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  overflow: hidden;
}

.content-layer {
  position: relative;
  z-index: 10;
}

.background-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
  z-index: 50;
}

.site-nav__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--nav-height);
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav__link:hover {
  color: #111827;
  background: #f9fafb;
}

.site-nav__link:focus-visible,
.contact-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(255, 255, 255, 0.9);
}

.site-nav__link.is-active {
  color: #2563eb;
  font-weight: 600;
  background: #eff6ff;
}

.home-main,
.blog-main {
  padding-top: var(--nav-height);
}

.professional-header {
  padding: 3rem 0 1.5rem;
}

.professional-content,
.content-width,
.blog-wrap {
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-width--wide {
  max-width: var(--container-wide);
}

.content-width--narrow {
  max-width: var(--container-narrow);
}

.professional-content {
  max-width: var(--container-regular);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stack--center {
  align-items: center;
  text-align: center;
}

.stack--tight {
  gap: 0.5rem;
}

.stack--section {
  gap: 2rem;
}

.professional-heading-xl {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
}

.professional-heading-md {
  margin: 0;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
}

.professional-subheading {
  color: #d1d5db;
}

.professional-tagline {
  margin: 0;
  color: #9ca3af;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-link:hover {
  transform: scale(1.05);
}

.contact-link--primary {
  background: #2563eb;
}

.contact-link--primary:hover {
  background: #1d4ed8;
}

.contact-link--secondary {
  background: #374151;
}

.contact-link--secondary:hover {
  background: #4b5563;
}

.content-section {
  padding: 1.5rem 0;
}

.content-section--last {
  padding-bottom: 3rem;
}

.section-title {
  margin: 0 0 3rem;
  text-align: center;
  color: #ffffff;
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}

.section-copy {
  margin: 0 auto;
  max-width: 48rem;
  color: #d1d5db;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.section-copy--center {
  text-align: center;
}

.summary-stat {
  text-align: center;
}

.summary-stat__label {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
}

.summary-stat__value {
  margin: 0;
  color: #60a5fa;
  font-size: 1.5rem;
  font-weight: 700;
}

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

.skill-card,
.experience-card,
.education-card {
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: 0.75rem;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.skill-card {
  padding: 1.5rem;
  transition: background-color 0.2s ease;
}

.skill-card:hover,
.experience-card:hover {
  background: rgba(31, 41, 55, 0.6);
}

.skill-card__title {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(107, 114, 128, 0.8);
}

.bullet-list,
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bullet-list--spacious {
  gap: 0.9rem;
}

.bullet-list__item {
  position: relative;
  padding-left: 1.25rem;
  color: #d1d5db;
}

.bullet-list__item::before {
  content: "";
  position: absolute;
  top: 0.7rem;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  background: #60a5fa;
  border-radius: 999px;
}

.bullet-list__item--top::before {
  top: 0.5rem;
}

.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience-card {
  padding: 1.5rem;
  transition: background-color 0.2s ease;
}

.experience-card__header {
  margin-bottom: 1rem;
}

.experience-card__title {
  margin: 0 0 0.25rem;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
}

.experience-card__date {
  color: #9ca3af;
  font-size: 0.875rem;
}

.experience-card__block {
  margin-bottom: 1rem;
}

.experience-card__subtitle {
  margin: 0 0 0.75rem;
  color: #d1d5db;
  font-size: 1.125rem;
  font-weight: 500;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.project-list__name {
  color: #ffffff;
  font-weight: 500;
}

.project-list__description {
  margin-top: 0.2rem;
  color: #9ca3af;
  font-size: 0.95rem;
}

.project-list__impact {
  margin-top: 0.2rem;
  color: #60a5fa;
  font-size: 0.95rem;
}

.experience-card__footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(107, 114, 128, 0.8);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  color: #d1d5db;
  background: #374151;
  font-size: 0.875rem;
}

.education-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.education-card {
  padding: 1.5rem;
  text-align: center;
}

.education-card__title {
  margin: 0 0 0.5rem;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
}

.education-card__institution {
  margin: 0 0 0.5rem;
  color: #d1d5db;
}

.education-card__date {
  margin: 0;
  color: #9ca3af;
  font-size: 0.875rem;
}

.blog-page {
  min-height: 100vh;
  background: #f9fafb;
  color: #111827;
}

.blog-wrap {
  max-width: var(--container-narrow);
  padding-top: 3rem;
  padding-bottom: 5rem;
  text-align: center;
}

.blog-title {
  margin: 0 0 2rem;
  color: #111827;
  font-size: clamp(2.25rem, 5vw, 2.5rem);
  font-weight: 700;
}

.blog-copy {
  color: #4b5563;
  font-size: 1.125rem;
}

.blog-copy p {
  margin: 0;
}

.blog-copy__lead {
  margin-bottom: 1rem;
}

.glow-effect {
  position: relative;
  transition: text-shadow 0.3s ease, box-shadow 0.3s ease;
}

.glow-text {
  text-shadow:
    0 0 var(--glow-blur) rgba(255, 255, 255, var(--glow-intensity)),
    0 0 calc(var(--glow-blur) * 2) rgba(255, 255, 255, calc(var(--glow-intensity) * 0.5));
}

.glow-intensity-subtle {
  --glow-blur: 10px;
  --glow-spread: 2px;
  --glow-intensity: 0.5;
}

.glow-effect:hover {
  --glow-intensity: calc(var(--glow-intensity) * 1.5);
}

.particle-background {
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 999px;
  background: var(--particle-color);
  will-change: transform, opacity;
  animation: particle-float var(--animation-duration) ease-in-out infinite;
}

.particle.sparkle {
  animation: particle-sparkle calc(var(--animation-duration) * 0.67) ease-in-out infinite;
}

.particle-density-low {
  --particle-count: 20;
  --particle-size-max: 3px;
}

.particle-density-medium {
  --particle-count: 50;
  --particle-size-max: 4px;
}

.particle-density-high {
  --particle-count: 80;
  --particle-size-max: 5px;
}

.animation-slow {
  --animation-duration: 8s;
}

.animation-medium {
  --animation-duration: 6s;
}

.animation-fast {
  --animation-duration: 4s;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.reduced-motion .particle {
  animation: none !important;
  opacity: 0.3 !important;
}

@media (prefers-reduced-motion: reduce) {
  .particle-background,
  .glow-effect {
    animation: none !important;
  }

  .particle {
    animation: none !important;
    opacity: 0.3 !important;
  }

  html {
    scroll-behavior: auto;
  }
}

@keyframes particle-float {
  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.3;
  }

  25% {
    transform: translateY(-15px) translateX(5px) scale(1.05);
    opacity: 0.4;
  }

  50% {
    transform: translateY(-10px) translateX(-3px) scale(1.1);
    opacity: 0.6;
  }

  75% {
    transform: translateY(-5px) translateX(8px) scale(1.05);
    opacity: 0.4;
  }
}

@keyframes particle-sparkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
    box-shadow: 0 0 2px var(--particle-color);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 0 8px var(--particle-color), 0 0 15px var(--particle-color);
  }
}

@media (min-width: 640px) {
  .site-nav__inner {
    padding: 0 1.5rem;
  }

  .professional-header {
    padding: 4rem 0 1.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .site-nav__inner {
    padding: 0 2rem;
  }

  .professional-content {
    max-width: 72rem;
  }

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

@media (min-width: 1920px) {
  .professional-content {
    max-width: 80rem;
  }

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

@media (max-width: 768px) {
  .professional-content,
  .content-width,
  .blog-wrap {
    padding: 0 1rem;
  }

  .contact-methods {
    flex-direction: column;
  }

  .contact-link {
    width: 100%;
  }

  .experience-card__header {
    display: block;
  }
}

@media (max-width: 320px) {
  .professional-header {
    padding-top: 2.5rem;
  }

  .site-nav__links {
    gap: 0.25rem;
  }

  .site-nav__link {
    padding: 0.45rem 0.5rem;
  }
}
