:root {
  --color-bg-base: #050505;
  --color-bg-surface: #111111;
  --color-bg-soft: #0a0a0a;
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-border: #1e293b;
  --color-primary: #2563eb;
  --color-primary-strong: #60a5fa;
  --color-secondary: #3b82f6;
  --color-accent: #60a5fa;
  --color-focus: rgba(37, 99, 235, 0.34);
  --color-glow: rgba(37, 99, 235, 0.5);
  --shadow-card: 0 22px 60px rgba(0, 0, 0, 0.46), 0 0 34px rgba(37, 99, 235, 0.16);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.32);
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --container: 1120px;
  --section-space: 5.5rem;
  --transition: 220ms ease;
}

[data-theme="light"] {
  --color-bg-base: #f8fafc;
  --color-bg-surface: #ffffff;
  --color-bg-soft: #f1f5f9;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-border: #cbd5e1;
  --color-primary: #1d4ed8;
  --color-primary-strong: #2563eb;
  --color-secondary: #2563eb;
  --color-accent: #3b82f6;
  --color-focus: rgba(29, 78, 216, 0.25);
  --color-glow: rgba(29, 78, 216, 0.4);
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12), 0 0 28px rgba(29, 78, 216, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 78% 10%, rgba(37, 99, 235, 0.24), transparent 68%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(5, 5, 5, 0.94) 46%, transparent 760px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(96, 165, 250, 0.045) 1px, transparent 1px),
    var(--color-bg-base);
  background-size: auto, auto, 72px 72px, 72px 72px, auto;
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

[data-theme="light"] body {
  background:
    radial-gradient(900px 520px at 78% 10%, rgba(29, 78, 216, 0.13), transparent 68%),
    linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(248, 250, 252, 0.82) 42%, transparent 640px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(29, 78, 216, 0.035) 1px, transparent 1px),
    var(--color-bg-base);
  background-size: auto, auto, 72px 72px, 72px 72px, auto;
}

body.menu-open {
  overflow: hidden;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: var(--scroll-progress, 0%);
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), #ffffff);
  box-shadow: 0 0 18px var(--color-glow);
  transform-origin: left;
  transition: width 120ms linear;
}

.site-motion {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  max-width: 100vw;
  contain: paint;
  pointer-events: none;
}

.site-motion span {
  position: absolute;
  left: -20%;
  width: 140%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.18), transparent);
  transform: rotate(-16deg);
  animation: railTravel 14s linear infinite;
}

.site-motion span:nth-child(1) {
  top: 18%;
}

.site-motion span:nth-child(2) {
  top: 48%;
  animation-delay: -5s;
  opacity: 0.7;
}

.site-motion span:nth-child(3) {
  top: 78%;
  animation-delay: -9s;
  opacity: 0.55;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.88;
  mix-blend-mode: screen;
}

[data-theme="light"] #particle-canvas {
  opacity: 0.36;
  mix-blend-mode: multiply;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, width var(--transition), height var(--transition), border-color var(--transition), background-color var(--transition);
}

.cursor-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 16px var(--color-accent), 0 0 34px var(--color-primary);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(96, 165, 250, 0.75);
  border-radius: 999px;
  box-shadow: 0 0 28px rgba(37, 99, 235, 0.28);
}

.has-custom-cursor * {
  cursor: none !important;
}

.has-custom-cursor .cursor-dot,
.has-custom-cursor .cursor-ring {
  opacity: 1;
}

.has-custom-cursor.cursor-active .cursor-ring {
  width: 62px;
  height: 62px;
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(37, 99, 235, 0.08);
}

.has-custom-cursor.cursor-active .cursor-dot {
  background: var(--color-accent);
}

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

a {
  color: inherit;
}

.icon-sprite {
  display: none;
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

::selection {
  background: var(--color-focus);
  color: var(--color-text-main);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 5, 5, 0.82);
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: navDrop 560ms ease both;
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.92);
  border-bottom-color: rgba(203, 213, 225, 0.75);
}

.nav-container {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.logo {
  color: var(--color-text-main);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition), transform var(--transition), text-shadow var(--transition);
  animation: logoWake 4s ease-in-out infinite;
}

.logo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 28%;
  bottom: -6px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0.45);
  transform-origin: left;
  transition: transform var(--transition);
}

.logo:hover::after {
  transform: scaleX(1);
}

.logo:hover {
  color: #ffffff;
  transform: translateY(-1px);
  text-shadow: 0 0 18px var(--color-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a,
#theme-toggle {
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background-color var(--transition), color var(--transition), transform var(--transition), translate var(--transition), box-shadow var(--transition);
  translate: var(--tx, 0) var(--ty, 0);
}

.nav-links a::after,
#theme-toggle::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  bottom: 0.4rem;
  left: 0.65rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity var(--transition), transform var(--transition);
}

#theme-toggle.icon-only {
  width: 42px;
  padding: 0;
}

#theme-toggle .icon {
  font-size: 1.05rem;
}

.nav-links a:hover,
#theme-toggle:hover,
.nav-links a.active {
  background: var(--color-bg-soft);
  color: var(--color-primary-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
}

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

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-surface);
  color: var(--color-text-main);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  overflow: hidden;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.mobile-menu-btn:hover,
.mobile-menu-btn[aria-expanded="true"] {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  box-shadow: 0 0 22px rgba(37, 99, 235, 0.22);
}

.mobile-menu-btn[aria-expanded="true"] {
  transform: rotate(90deg);
}

.hero {
  display: flex;
  align-items: center;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3.5rem, 7vw, 5rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 14% 0 auto auto;
  width: min(48vw, 560px);
  height: 72%;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(96, 165, 250, 0.08)),
    repeating-linear-gradient(135deg, transparent 0 16px, rgba(255, 255, 255, 0.18) 16px 17px);
  transform: skewX(-10deg);
  transform-origin: top right;
  z-index: -1;
  opacity: 0.8;
  animation: heroBand 9s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(96, 165, 250, 0.1) 42%, transparent 62%);
  transform: translateX(-70%);
  animation: heroSweep 8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.eyebrow,
.status-label,
.doc-tag {
  margin: 0;
  color: var(--color-primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(17, 17, 17, 0.76);
  color: var(--color-primary-strong);
  box-shadow: var(--shadow-soft);
  font-size: 0.86rem;
  font-weight: 800;
  animation: badgePulse 3.8s ease-in-out infinite;
}

[data-theme="light"] .hero-badge {
  background: rgba(255, 255, 255, 0.78);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  margin-top: 0.7rem;
  color: var(--color-text-main);
  font-size: clamp(2.4rem, 7vw, 5rem);
  max-width: 10ch;
  background: linear-gradient(90deg, var(--color-text-main), var(--color-accent), var(--color-text-main));
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleShimmer 7s ease-in-out infinite;
}

.hero-summary {
  max-width: 650px;
  margin: 1.5rem 0 0;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  animation: textFloat 6s ease-in-out infinite;
}

.hero-cta,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.15rem;
  color: var(--color-text-main);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  gap: 0.45rem;
  overflow: hidden;
  position: relative;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), translate var(--transition), box-shadow var(--transition);
  translate: var(--tx, 0) var(--ty, 0);
  will-change: transform;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, 0.28), transparent 32%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.btn .ripple,
.mobile-menu-btn .ripple,
#theme-toggle .ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: buttonRipple 650ms ease-out forwards;
}

.btn::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 55%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: left 520ms ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover::after {
  left: 115%;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 10px 24px var(--color-glow);
  animation: buttonBreath 4.5s ease-in-out infinite;
}

.btn-primary:hover {
  background: var(--color-primary-strong);
  box-shadow: 0 16px 34px var(--color-glow), 0 0 0 1px rgba(96, 165, 250, 0.28);
}

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

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  box-shadow: var(--shadow-soft);
}

.btn:hover .icon {
  animation: iconNudge 420ms ease;
}

.hero-image {
  justify-self: end;
  width: min(100%, 390px);
}

.portrait-wrap {
  position: relative;
  isolation: isolate;
  animation: softFloat 7s ease-in-out infinite;
  will-change: transform;
}

.portrait-wrap::before,
.portrait-wrap::after {
  content: "";
  position: absolute;
  border-radius: var(--radius-md);
  z-index: -1;
}

.portrait-wrap::before {
  inset: -14px 18px 18px -14px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  background: rgba(17, 17, 17, 0.44);
}

.portrait-wrap::after {
  inset: 22px -18px -18px 22px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  opacity: 0.24;
  animation: pulsePanel 5s ease-in-out infinite;
}

.hero-image img {
  aspect-ratio: 4 / 5;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.55), 0 0 45px rgba(37, 99, 235, 0.2);
  object-fit: cover;
}

.profile-note {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(17, 17, 17, 0.86);
  color: var(--color-primary-strong);
  box-shadow: var(--shadow-soft);
  font-size: 0.86rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .profile-note {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(29, 78, 216, 0.18);
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2rem;
  max-width: 720px;
}

.hero-highlights div {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(17, 17, 17, 0.72);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: highlightFloat 6.5s ease-in-out infinite;
}

.hero-highlights div:nth-child(2) {
  animation-delay: -1.6s;
}

.hero-highlights div:nth-child(3) {
  animation-delay: -3.2s;
}

[data-theme="light"] .hero-highlights div {
  background: rgba(255, 255, 255, 0.72);
}

.hero-highlights div:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.48);
  box-shadow: var(--shadow-card);
}

.hero-highlights .icon {
  color: var(--color-accent);
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

.hero-highlights span,
.hero-highlights small {
  display: block;
}

.hero-highlights span {
  color: var(--color-text-main);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-highlights small {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

section {
  padding: var(--section-space) 0;
}

.section-title {
  margin-bottom: 2rem;
  color: var(--color-text-main);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  position: relative;
  width: fit-content;
  text-shadow: 0 0 18px rgba(37, 99, 235, 0.15);
}

.section-title::after {
  content: "";
  display: block;
  width: 64%;
  height: 4px;
  margin-top: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  animation: titleBar 3.8s ease-in-out infinite;
}

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

.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.25rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  transform-style: preserve-3d;
  animation: cardPulse 8s ease-in-out infinite;
  will-change: transform;
}

.card:nth-child(2n) {
  animation-delay: -1.5s;
}

.card:nth-child(3n) {
  animation-delay: -3s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 12%;
  height: 140px;
  background: linear-gradient(90deg, transparent, var(--color-glow), transparent);
  opacity: 0;
  transform: translateY(24px) rotate(-4deg);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.card .card-heading,
.card .inline-title,
.card .doc-top,
.card p,
.card ul,
.card dl,
.card .btn,
.project-card > .icon-badge {
  position: relative;
  z-index: 1;
}

.card .light-follow {
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(96, 165, 250, 0.16), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.44);
  box-shadow: var(--shadow-card);
}

.card:hover .light-follow {
  opacity: 1;
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  opacity: 0.16;
  transform: translateY(0) rotate(-4deg);
}

.card h3 {
  margin-bottom: 0.8rem;
  color: var(--color-text-main);
  font-size: 1.22rem;
}

.card-heading,
.inline-title,
.doc-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.card-heading {
  margin-bottom: 0.85rem;
}

.card-heading h3,
.inline-title h3 {
  margin-bottom: 0;
}

.icon-badge {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(96, 165, 250, 0.12));
  color: var(--color-primary-strong);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.12), 0 0 18px rgba(37, 99, 235, 0.1);
  transition: transform var(--transition), box-shadow var(--transition), color var(--transition);
}

.icon-badge .icon {
  animation: iconPulse 4s ease-in-out infinite;
}

.card:hover .icon-badge,
.hero-highlights div:hover .icon {
  transform: translateY(-2px) scale(1.04);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.2), 0 0 22px rgba(37, 99, 235, 0.22);
}

.icon-badge.small {
  width: 1.9rem;
  height: 1.9rem;
}

.icon-badge .icon {
  font-size: 1.08rem;
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
}

.card p + p {
  margin-top: 1rem;
}

.detail-list {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 0.15rem;
}

.detail-list dt {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  color: var(--color-text-main);
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 1.25rem;
}

.experience-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.experience-card .company,
.experience-card .date {
  margin-top: 0.25rem;
}

.company {
  color: var(--color-text-muted);
  font-weight: 600;
}

.date {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.experience-list,
.compact-list {
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

.experience-list {
  display: grid;
  gap: 0.7rem;
}

.experience-list li,
.compact-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--color-text-muted);
  transition: color var(--transition), transform var(--transition);
}

.experience-list li::before,
.compact-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-glow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.experience-list li:hover,
.compact-list li:hover {
  color: var(--color-text-main);
  transform: translateX(4px);
}

.experience-list li:hover::before,
.compact-list li:hover::before {
  transform: scale(1.5);
  box-shadow: 0 0 18px var(--color-glow);
}

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

.projects-grid,
.docs-grid {
  display: grid;
  gap: 1.25rem;
}

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

.docs-grid {
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}

.project-card .icon-badge {
  margin-bottom: 1rem;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.doc-card h3 {
  margin-bottom: 0;
}

.doc-card .btn {
  margin-top: auto;
  width: 100%;
}

.doc-top {
  justify-content: space-between;
}

.doc-tag {
  align-self: flex-start;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-accent);
  padding: 0.22rem 0.45rem;
  animation: tagPulse 5.5s ease-in-out infinite;
}

footer {
  padding: 5rem 0 2rem;
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.contact-content {
  max-width: 760px;
}

.contact-content h2 {
  margin-top: 0.55rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.contact-content > p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: var(--color-text-muted);
}

.contact-lines {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.75rem;
}

.contact-lines p {
  margin: 0;
  color: var(--color-text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.contact-lines .icon {
  color: var(--color-accent);
}

.contact-lines a {
  color: var(--color-primary-strong);
  text-decoration: none;
}

.contact-lines a:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin: 4rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 1;
  transform: none;
  animation: fadeRise 680ms ease both;
}

.card.reveal {
  animation: fadeRise 680ms ease both, cardPulse 8s ease-in-out 780ms infinite;
}

.hero-image.reveal {
  animation-delay: 120ms;
}

.card.reveal:nth-child(2),
.project-card.reveal:nth-child(2),
.doc-card.reveal:nth-child(2) {
  animation-delay: 70ms;
}

.project-card.reveal:nth-child(3),
.doc-card.reveal:nth-child(3) {
  animation-delay: 140ms;
}

.doc-card.reveal:nth-child(4) {
  animation-delay: 210ms;
}

.doc-card.reveal:nth-child(5) {
  animation-delay: 280ms;
}

.doc-card.reveal:nth-child(6) {
  animation-delay: 350ms;
}

.doc-card.reveal:nth-child(7) {
  animation-delay: 420ms;
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes navDrop {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoWake {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(37, 99, 235, 0);
  }
  50% {
    text-shadow: 0 0 16px rgba(37, 99, 235, 0.26);
  }
}

@keyframes railTravel {
  from {
    transform: translateX(-12%) rotate(-16deg);
  }
  to {
    transform: translateX(12%) rotate(-16deg);
  }
}

@keyframes titleShimmer {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

@keyframes titleBar {
  0%,
  100% {
    width: 44%;
    box-shadow: 0 0 12px var(--color-glow);
  }
  50% {
    width: 84%;
    box-shadow: 0 0 24px var(--color-glow);
  }
}

@keyframes badgePulse {
  0%,
  100% {
    box-shadow: var(--shadow-soft), 0 0 0 rgba(37, 99, 235, 0);
    transform: translateY(0);
  }
  50% {
    box-shadow: var(--shadow-soft), 0 0 30px rgba(37, 99, 235, 0.22);
    transform: translateY(-2px);
  }
}

@keyframes textFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes buttonBreath {
  0%,
  100% {
    box-shadow: 0 10px 24px var(--color-glow);
  }
  50% {
    box-shadow: 0 12px 32px var(--color-glow), 0 0 0 3px rgba(96, 165, 250, 0.08);
  }
}

@keyframes highlightFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes cardPulse {
  0%,
  100% {
    box-shadow: var(--shadow-soft);
  }
  50% {
    box-shadow: var(--shadow-soft), 0 0 24px rgba(37, 99, 235, 0.08);
  }
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0));
  }
  50% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 7px rgba(96, 165, 250, 0.42));
  }
}

@keyframes buttonRipple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

@keyframes iconNudge {
  0%,
  100% {
    transform: translateX(0);
  }
  45% {
    transform: translateX(3px);
  }
}

@keyframes tagPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(37, 99, 235, 0);
  }
  50% {
    box-shadow: 0 0 18px rgba(37, 99, 235, 0.16);
  }
}

@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSweep {
  0%,
  44% {
    transform: translateX(-78%);
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  100% {
    transform: translateX(78%);
    opacity: 0;
  }
}

@keyframes heroBand {
  0%,
  100% {
    opacity: 0.62;
    transform: skewX(-10deg) translateY(0);
  }
  50% {
    opacity: 0.95;
    transform: skewX(-10deg) translateY(-10px);
  }
}

@keyframes pulsePanel {
  0%,
  100% {
    opacity: 0.18;
  }
  50% {
    opacity: 0.32;
  }
}

@keyframes softFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .portrait-wrap,
  .portrait-wrap::after,
  .hero::before,
  .hero::after,
  .navbar,
  .btn-primary,
  .btn:hover .icon,
  .site-motion span,
  h1,
  .section-title::after,
  .doc-tag,
  .logo,
  .hero-badge,
  .hero-summary,
  .hero-highlights div,
  .card,
  .icon-badge .icon,
  .nav-links.active li {
    animation: none !important;
  }

  .has-custom-cursor * {
    cursor: auto !important;
  }

  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}

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

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-image {
    justify-self: start;
    width: min(100%, 340px);
  }

  .two-column,
  .projects-grid,
  .docs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 780px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .nav-container {
    min-height: 66px;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 66px;
    right: 0.625rem;
    left: 0.625rem;
    display: grid;
    gap: 0.15rem;
    max-height: calc(100svh - 82px);
    padding: 0.7rem;
    overflow-y: auto;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top;
    transition: opacity 240ms ease, transform 240ms ease;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(-8px);
  }

  .nav-links.active li {
    animation: menuItemIn 260ms ease both;
  }

  .nav-links.active li:nth-child(2) { animation-delay: 35ms; }
  .nav-links.active li:nth-child(3) { animation-delay: 70ms; }
  .nav-links.active li:nth-child(4) { animation-delay: 105ms; }
  .nav-links.active li:nth-child(5) { animation-delay: 140ms; }
  .nav-links.active li:nth-child(6) { animation-delay: 175ms; }
  .nav-links.active li:nth-child(7) { animation-delay: 210ms; }

  .nav-links a,
  #theme-toggle {
    justify-content: flex-start;
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 0.85rem;
  }

  #theme-toggle.icon-only {
    justify-content: center;
    width: 46px;
    padding: 0;
    justify-self: start;
  }

  .hero { padding: 2.5rem 0 3.5rem; }

  .hero-content {
    gap: 2rem;
  }

  .hero::before {
    inset: 38% 0 auto;
    width: 100%;
    height: 38%;
    transform: skewY(-4deg);
  }

  h1 {
    max-width: 12ch;
  }

  .hero-cta,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .two-column,
  .projects-grid,
  .docs-grid,
  .compact-list,
  .hero-highlights {
    grid-template-columns: 1fr;
  }

  .experience-header {
    display: grid;
  }

  .date {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 15px;
  }

  .container {
    width: min(100% - 1rem, var(--container));
  }

  .card {
    padding: 1rem;
  }

  .hero-image {
    width: 100%;
  }

  .hero-image img {
    max-height: 420px;
  }
}

/* Lively restoration pass: brings back the original animated portfolio character. */
:root {
  --color-bg-elevated: #111111;
  --color-bg-glass: rgba(17, 17, 17, 0.72);
  --color-card-hover-bg: rgba(255, 255, 255, 0.055);
  --color-primary-glow: rgba(37, 99, 235, 0.5);
  --font-heading: "Outfit", var(--font-body);
  --radius-full: 9999px;
  --transition-live: 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
  --color-bg-elevated: #ffffff;
  --color-bg-glass: rgba(255, 255, 255, 0.76);
  --color-card-hover-bg: rgba(29, 78, 216, 0.045);
  --color-primary-glow: rgba(29, 78, 216, 0.36);
}

body {
  background:
    radial-gradient(820px 820px at 48% 16%, var(--color-primary-glow), transparent 62%),
    radial-gradient(620px 420px at 82% 8%, rgba(96, 165, 250, 0.28), transparent 67%),
    radial-gradient(520px 420px at 12% 74%, rgba(37, 99, 235, 0.22), transparent 68%),
    linear-gradient(90deg, rgba(96, 165, 250, 0.075) 1px, transparent 1px),
    linear-gradient(180deg, rgba(96, 165, 250, 0.055) 1px, transparent 1px),
    var(--color-bg-base);
  background-size: auto, auto, auto, 56px 56px, 56px 56px, auto;
  transition: background-color 800ms ease, color 800ms ease;
}

[data-theme="light"] body {
  background:
    radial-gradient(820px 820px at 48% 16%, rgba(29, 78, 216, 0.16), transparent 62%),
    radial-gradient(620px 420px at 82% 8%, rgba(59, 130, 246, 0.18), transparent 67%),
    radial-gradient(520px 420px at 12% 74%, rgba(29, 78, 216, 0.1), transparent 68%),
    linear-gradient(90deg, rgba(29, 78, 216, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(29, 78, 216, 0.045) 1px, transparent 1px),
    var(--color-bg-base);
  background-size: auto, auto, auto, 56px 56px, 56px 56px, auto;
}

.scroll-progress {
  height: 5px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), #ffffff, var(--color-primary));
  background-size: 220% 100%;
  box-shadow: 0 0 18px var(--color-primary), 0 0 42px var(--color-accent);
  animation: progressGlow 2.4s linear infinite;
}

.site-motion {
  z-index: -4;
}

.site-motion::before,
.site-motion::after {
  content: "";
  position: absolute;
  width: min(66vw, 820px);
  aspect-ratio: 1;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 50%;
  filter: blur(0.2px);
  opacity: 0.7;
  animation: orbitalSpin 24s linear infinite;
}

.site-motion::before {
  top: -22%;
  right: -18%;
}

.site-motion::after {
  bottom: -28%;
  left: -16%;
  animation-duration: 32s;
  animation-direction: reverse;
}

.site-motion span {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.46), rgba(255, 255, 255, 0.5), transparent);
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.35);
  animation-duration: 8.5s;
}

#particle-canvas {
  opacity: 1;
  filter: saturate(1.25);
}

[data-theme="light"] #particle-canvas {
  opacity: 0.58;
}

.cursor-dot {
  width: 18px;
  height: 18px;
  background: var(--color-primary);
  mix-blend-mode: difference;
  box-shadow: 0 0 22px var(--color-primary), 0 0 50px var(--color-accent);
}

.cursor-ring {
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--color-accent);
  opacity: 0.55;
  box-shadow: 0 0 18px var(--color-accent);
}

.has-custom-cursor.cursor-active .cursor-ring {
  width: 54px;
  height: 54px;
  border: 2px solid var(--color-accent);
  background: rgba(37, 99, 235, 0.18);
  box-shadow: 0 0 24px var(--color-primary);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
}

.navbar {
  position: fixed;
  right: 0;
  left: 0;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: padding 420ms ease, background 420ms ease, box-shadow 420ms ease, border-color 420ms ease;
  animation: slideDownHeavy 900ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.navbar.scrolled,
[data-theme="light"] .navbar.scrolled {
  background: var(--color-bg-glass);
  border-bottom-color: var(--color-border);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.44), 0 0 28px var(--color-primary-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-container {
  min-height: 82px;
}

.logo {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  animation: pulseColor 4s ease-in-out infinite;
}

.logo::after {
  height: 4px;
  right: 42%;
  bottom: -9px;
  box-shadow: 0 0 16px var(--color-primary);
}

.logo:hover {
  transform: scale(1.08) rotate(-2deg);
  letter-spacing: 0.07em;
  color: var(--color-text-main);
  text-shadow: 0 0 24px var(--color-primary), 0 0 44px var(--color-accent);
}

.nav-links {
  gap: clamp(0.25rem, 1.7vw, 1.45rem);
}

.nav-links li {
  opacity: 0;
  animation: fadeUpHeavy 720ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.nav-links li:nth-child(2) { animation-delay: 80ms; }
.nav-links li:nth-child(3) { animation-delay: 160ms; }
.nav-links li:nth-child(4) { animation-delay: 240ms; }
.nav-links li:nth-child(5) { animation-delay: 320ms; }
.nav-links li:nth-child(6) { animation-delay: 400ms; }
.nav-links li:nth-child(7) { animation-delay: 480ms; }

.nav-links a,
#theme-toggle {
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition-live);
}

.nav-links a::before,
#theme-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--color-primary-glow);
  opacity: 0;
  transform: scale(0.15);
  transition: var(--transition-live);
}

.nav-links a:hover,
#theme-toggle:hover,
.nav-links a.active {
  color: var(--color-text-main);
  background: transparent;
  transform: translateY(-5px) scale(1.12);
  text-shadow: 0 0 16px var(--color-primary);
  box-shadow: none;
}

.nav-links a:hover::before,
#theme-toggle:hover::before,
.nav-links a.active::before {
  opacity: 1;
  transform: scale(1);
  animation: borderDance 1.6s linear infinite;
}

#theme-toggle.icon-only {
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
}

#theme-toggle:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px var(--color-primary);
}

.mobile-menu-btn {
  border-width: 2px;
  border-radius: 50%;
  background: var(--color-bg-glass);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.14);
  position: relative;
  z-index: 3;
  touch-action: manipulation;
}

.mobile-menu-btn:hover,
.mobile-menu-btn[aria-expanded="true"] {
  transform: scale(1.08) rotate(180deg);
  box-shadow: 0 0 24px var(--color-primary-glow);
}

.hero {
  min-height: 100svh;
  padding: clamp(8.5rem, 13vw, 10rem) 0 clamp(4.5rem, 8vw, 7rem);
  perspective: 1200px;
}

.hero::before {
  inset: 50% auto auto 50%;
  width: min(86vw, 820px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, rgba(96, 165, 250, 0.16) 28%, transparent 63%);
  filter: blur(76px);
  opacity: 0.95;
  transform: translate(-50%, -50%);
  animation: crazyPulse 5s ease-in-out infinite alternate;
}

.hero::after {
  background:
    linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.12) 42%, rgba(96, 165, 250, 0.22) 48%, transparent 66%),
    repeating-linear-gradient(135deg, transparent 0 24px, rgba(96, 165, 250, 0.09) 24px 25px);
  animation: heroSweep 5.2s ease-in-out infinite;
}

.hero-content {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 450px);
  gap: clamp(3rem, 7vw, 5.5rem);
  transform-style: preserve-3d;
}

.hero-text {
  transform: translateZ(48px);
}

.hero-badge {
  border-radius: var(--radius-full);
  border-color: rgba(96, 165, 250, 0.44);
  background: var(--color-bg-glass);
  letter-spacing: 0.05em;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.36), 0 0 24px var(--color-primary-glow);
  animation: badgePulse 2.5s ease-in-out infinite;
}

h1 {
  margin-top: 0.8rem;
  max-width: 11ch;
  font-size: clamp(3.1rem, 8.2vw, 5.8rem);
  line-height: 1.02;
  font-weight: 800;
  color: var(--color-text-main);
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.72), 0 0 24px var(--color-primary-glow);
  animation: headlineGlow 2.8s ease-in-out infinite, popInHeavy 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hero-summary {
  font-size: clamp(1.1rem, 2.3vw, 1.38rem);
  font-weight: 600;
  animation: textFloat 3.8s ease-in-out infinite;
}

.hero-cta,
.contact-actions {
  gap: 1rem;
  margin-top: 2.4rem;
}

.btn {
  min-height: 54px;
  border-radius: var(--radius-full);
  padding: 0.95rem 1.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  transition: var(--transition-live);
}

.btn::before {
  inset: -50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72) 0%, transparent 58%);
  transform: scale(0.5);
}

.btn:hover {
  transform: translateY(-8px) scale(1.08);
  letter-spacing: 0.15em;
}

.btn:hover::before {
  opacity: 0.28;
  transform: scale(1);
  animation: spinSlow 4s linear infinite;
}

.btn-primary {
  background: linear-gradient(45deg, var(--color-primary), var(--color-accent), var(--color-primary));
  background-size: 240% 240%;
  box-shadow: 0 14px 34px var(--color-primary-glow);
  animation: gradientShift 3s ease infinite, buttonBreath 2.4s ease-in-out infinite;
}

.btn-primary:hover {
  background: linear-gradient(45deg, var(--color-accent), var(--color-primary), var(--color-accent));
  box-shadow: 0 22px 56px rgba(59, 130, 246, 0.74), 0 0 24px rgba(255, 255, 255, 0.52);
}

.btn-outline {
  border: 3px solid var(--color-primary);
  background: rgba(17, 17, 17, 0.36);
  box-shadow: inset 0 0 0 0 var(--color-primary);
}

[data-theme="light"] .btn-outline {
  background: rgba(255, 255, 255, 0.62);
}

.btn-outline:hover {
  color: #ffffff;
  border-color: var(--color-accent);
  box-shadow: inset 0 0 26px 24px var(--color-primary), 0 16px 44px var(--color-primary-glow);
}

.hero-image {
  justify-self: center;
  width: min(100%, 450px);
  transform: translateZ(92px);
}

.portrait-wrap {
  animation: floatHeavy 4s ease-in-out infinite;
}

.portrait-wrap::before,
.portrait-wrap::after {
  border-radius: 8px;
  background: transparent;
  opacity: 1;
}

.portrait-wrap::before {
  inset: -38px;
  border: 3px dotted var(--color-accent);
  animation: spinCrazyReverse 15s linear infinite;
}

.portrait-wrap::after {
  inset: -20px;
  border: 3px dashed var(--color-primary);
  animation: spinCrazy 10s linear infinite;
}

.hero-image img {
  border: 4px solid transparent;
  border-radius: 8px;
  box-shadow: 0 30px 68px rgba(0, 0, 0, 0.82), 0 0 46px var(--color-primary-glow);
  transition: var(--transition-live);
  animation: borderRgb 3s linear infinite;
}

.hero-image:hover img {
  transform: scale(1.1) translateY(-16px) rotateY(12deg);
  box-shadow: -18px 38px 82px var(--color-primary-glow);
}

.profile-note {
  border-radius: var(--radius-full);
  background: var(--color-bg-glass);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38), 0 0 18px var(--color-primary-glow);
}

.hero-highlights {
  gap: 1rem;
}

.hero-highlights div {
  border-radius: 8px;
  background: var(--color-bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35), 0 0 18px rgba(37, 99, 235, 0.1);
  animation: floatHeavy 5s ease-in-out infinite;
}

.hero-highlights div:hover {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.55), 0 0 28px var(--color-primary-glow);
}

section {
  position: relative;
}

.section-title {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-right: auto;
  margin-bottom: 4rem;
  margin-left: auto;
  font-size: clamp(2.35rem, 5vw, 3.4rem);
  text-align: center;
  overflow-wrap: break-word;
  text-shadow: 0 0 22px var(--color-primary-glow);
  animation: floatTitle 4s ease-in-out infinite;
}

.section-title::after {
  height: 6px;
  width: 0;
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), transparent);
  box-shadow: 0 0 18px var(--color-primary);
  animation: none;
  transition: width 900ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-title.visible::after,
.section-title.reveal.visible::after {
  width: 118%;
  animation: pulseGlowHeavy 2.4s ease-in-out infinite alternate;
}

.two-column {
  gap: clamp(1.25rem, 3vw, 3rem);
  perspective: 1000px;
}

.card {
  background: var(--color-bg-glass);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: clamp(1.7rem, 3.4vw, 3rem);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 300ms ease, box-shadow 300ms ease, transform 300ms ease;
}

.card::before {
  inset: 0;
  height: auto;
  background: linear-gradient(135deg, var(--color-card-hover-bg) 0%, transparent 100%);
  opacity: 1;
}

.card::after {
  inset: -50%;
  height: auto;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 52%);
  opacity: 0;
  transform: none;
  transition: opacity 500ms ease;
}

.card:hover {
  z-index: 4;
  border-color: var(--color-accent);
  box-shadow: 0 30px 64px rgba(0, 0, 0, 0.78), 0 0 34px var(--color-primary-glow);
}

.card:hover::after {
  opacity: 0.48;
  animation: rotateGradient 3s linear infinite;
}

.card .light-follow {
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(96, 165, 250, 0.28), transparent 58%);
}

.card h3 {
  font-size: clamp(1.24rem, 2vw, 1.48rem);
}

.icon-badge {
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 0 22px var(--color-primary-glow);
}

.icon-badge .icon {
  animation: iconPulse 2.4s ease-in-out infinite;
}

.experience-list li::before,
.compact-list li::before {
  width: 8px;
  height: 8px;
}

.docs-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.doc-tag {
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.18);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.12);
}

footer {
  background:
    radial-gradient(760px 360px at 25% 0%, rgba(37, 99, 235, 0.2), transparent 68%),
    var(--color-bg-surface);
}

html.js .reveal {
  opacity: 0;
  transform: translateY(44px) scale(0.96);
  animation: none;
}

html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: popInHeavy 780ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

html.js .section-title.reveal.visible {
  animation: popInHeavy 700ms cubic-bezier(0.34, 1.56, 0.64, 1) both, floatTitle 4s ease-in-out 800ms infinite;
}

html.js .card.reveal.visible {
  animation: popInHeavy 780ms cubic-bezier(0.34, 1.56, 0.64, 1) both, cardPulse 5.8s ease-in-out 900ms infinite;
}

html.js .hero-image.reveal.visible {
  animation: popInHeavy 900ms cubic-bezier(0.34, 1.56, 0.64, 1) 120ms both;
}

@keyframes progressGlow {
  to { background-position: 220% 0; }
}

@keyframes slideDownHeavy {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeUpHeavy {
  from { transform: translateY(44px) scale(0.72); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

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

@keyframes headlineGlow {
  0%, 100% {
    color: var(--color-text-main);
    text-shadow: 0 14px 34px rgba(0, 0, 0, 0.72), 0 0 18px rgba(37, 99, 235, 0.28);
  }
  50% {
    color: #ffffff;
    text-shadow: 0 14px 34px rgba(0, 0, 0, 0.72), 0 0 28px var(--color-accent), 0 0 54px var(--color-primary);
  }
}

@keyframes popInHeavy {
  0% { opacity: 0; transform: translateY(34px) scale(0.86) rotate(-1deg); }
  62% { opacity: 1; transform: translateY(-6px) scale(1.025) rotate(0.5deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

@keyframes floatHeavy {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  25% { transform: translateY(-15px) rotateX(2deg) rotateY(3deg); }
  75% { transform: translateY(12px) rotateX(-2deg) rotateY(-3deg); }
}

@keyframes floatTitle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes spinCrazy {
  from { transform: rotate(0deg) scale(1); border-color: var(--color-primary); }
  50% { transform: rotate(180deg) scale(1.08); border-color: var(--color-accent); }
  to { transform: rotate(360deg) scale(1); border-color: var(--color-primary); }
}

@keyframes spinCrazyReverse {
  from { transform: rotate(360deg) scale(1.06); }
  50% { transform: rotate(180deg) scale(0.96); }
  to { transform: rotate(0deg) scale(1.06); }
}

@keyframes borderRgb {
  0% { border-color: var(--color-primary); }
  50% { border-color: var(--color-accent); }
  100% { border-color: var(--color-primary); }
}

@keyframes crazyPulse {
  from { opacity: 0.34; transform: translate(-50%, -50%) scale(0.88); }
  to { opacity: 0.72; transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes hueDrift {
  to { filter: hue-rotate(360deg); }
}

@keyframes pulseGlowHeavy {
  from { box-shadow: 0 0 10px var(--color-primary), 0 0 24px var(--color-primary), 0 0 34px var(--color-primary); }
  to { box-shadow: 0 0 18px var(--color-accent), 0 0 42px var(--color-accent), 0 0 64px var(--color-accent); }
}

@keyframes rotateGradient {
  to { transform: rotate(360deg); }
}

@keyframes spinSlow {
  to { transform: rotate(360deg) scale(1); }
}

@keyframes orbitalSpin {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.08); }
}

@keyframes borderDance {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.26), 0 0 0 rgba(37, 99, 235, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.68), 0 0 20px var(--color-primary-glow); }
}

@keyframes pulseColor {
  0%, 100% { color: var(--color-text-main); }
  50% { color: var(--color-accent); }
}

@media (max-width: 980px) {
  .navbar {
    background: var(--color-bg-glass);
    border-bottom-color: var(--color-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .hero {
    min-height: auto;
  }

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

  .hero-text {
    width: 100%;
    transform: none;
  }

  .hero-image {
    justify-self: start;
  }
}

@media (max-width: 780px) {
  html,
  body {
    overflow-x: hidden;
  }

  .container {
    width: min(calc(100dvw - 1.25rem), var(--container));
    max-width: calc(100dvw - 1.25rem);
  }

  .navbar {
    width: 100dvw;
    max-width: 100dvw;
  }

  .nav-container {
    min-height: 68px;
  }

  .logo {
    max-width: calc(100vw - 92px);
    overflow: hidden;
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-overflow: ellipsis;
  }

  .nav-links {
    top: 76px;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-width: calc(100dvw - 1.5rem);
    gap: 0.2rem;
    max-height: calc(100svh - 92px);
    background: var(--color-bg-glass);
    border-radius: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .nav-links a:hover,
  #theme-toggle:hover,
  .nav-links a.active {
    transform: none;
  }

  .hero {
    padding: 6.4rem 0 3.75rem;
  }

  .hero::before {
    width: 118vw;
    opacity: 0.62;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(2.65rem, 13vw, 4rem);
  }

  .btn {
    min-height: 52px;
    letter-spacing: 0.08em;
  }

  .btn:hover {
    transform: translateY(-3px) scale(1.02);
    letter-spacing: 0.08em;
  }

  .portrait-wrap::before {
    inset: -22px;
  }

  .portrait-wrap::after {
    inset: -12px;
  }

  .hero-highlights div {
    animation-duration: 6.5s;
  }

  .card:hover {
    transform: translateY(-4px);
  }

  .section-title {
    margin-bottom: 2.7rem;
    max-width: calc(100dvw - 2rem);
  }
}

@media (max-width: 420px) {
  .site-motion span {
    left: 0;
    width: 100%;
  }

  .site-motion::before,
  .site-motion::after {
    opacity: 0.32;
  }

  .hero-badge {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .profile-note {
    font-size: 0.78rem;
  }

  .card {
    padding: 1.15rem;
  }
}

.scroll-progress {
  height: 4px;
  box-shadow: 0 0 10px var(--color-primary);
  animation: none;
}

#particle-canvas {
  opacity: 0.58;
  filter: none;
}

[data-theme="light"] #particle-canvas {
  opacity: 0.34;
}

body {
  background:
    radial-gradient(680px 560px at 50% 18%, rgba(37, 99, 235, 0.28), transparent 64%),
    radial-gradient(460px 340px at 16% 70%, rgba(37, 99, 235, 0.16), transparent 68%),
    linear-gradient(90deg, rgba(96, 165, 250, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(96, 165, 250, 0.04) 1px, transparent 1px),
    var(--color-bg-base);
  background-size: auto, auto, 72px 72px, 72px 72px, auto;
}

.site-motion::before,
.site-motion::after {
  display: none;
}

.site-motion span {
  opacity: 0.24;
  box-shadow: none;
  animation: none;
}

.navbar,
.navbar.scrolled,
.nav-links,
.hero-highlights div,
.card,
.profile-note {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.navbar {
  background: rgba(5, 5, 5, 0.92);
  border-bottom-color: var(--color-border);
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.94);
}

.navbar.scrolled,
[data-theme="light"] .navbar.scrolled {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.nav-links li {
  opacity: 1;
  transform: none;
  animation: none;
}

.nav-links a:hover,
#theme-toggle:hover,
.nav-links a.active {
  transform: none;
  text-shadow: none;
}

.nav-links a:hover::before,
#theme-toggle:hover::before,
.nav-links a.active::before {
  animation: none;
}

.hero::before {
  filter: none;
  opacity: 0.22;
  animation: none;
}

.hero::after {
  opacity: 0.36;
  animation: none;
}

h1 {
  animation: popInHeavy 640ms ease both;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.68), 0 0 18px rgba(37, 99, 235, 0.24);
}

.logo,
.hero-badge,
.hero-summary,
.btn-primary,
.portrait-wrap,
.portrait-wrap::before,
.portrait-wrap::after,
.hero-image img,
.hero-highlights div,
.section-title,
.section-title::after,
.card,
.card:hover::after,
.icon-badge .icon,
.doc-tag {
  animation: none !important;
}

.btn:hover {
  transform: translateY(-2px);
  letter-spacing: 0.1em;
}

.btn:hover::before {
  animation: none;
}

.card {
  box-shadow: var(--shadow-soft);
}

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

.card:hover::after {
  opacity: 0.12;
}

.card .light-follow {
  display: none;
}

.hero-highlights div:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.hero-image {
  width: min(100%, 420px);
}

.portrait-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
}

.portrait-wrap::before,
.portrait-wrap::after {
  border-radius: 50%;
}

.portrait-wrap::before {
  inset: -18px;
  border: 2px dotted var(--color-accent);
  box-shadow: 0 0 26px rgba(37, 99, 235, 0.22);
}

.portrait-wrap::after {
  inset: -34px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14), transparent 62%);
}

.hero-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
}

.profile-note {
  left: 50%;
  right: auto;
  bottom: 6%;
  z-index: 2;
  max-width: min(82%, 15rem);
  justify-content: center;
  white-space: nowrap;
  transform: translateX(-50%);
}

.avatar-hi {
  position: absolute;
  top: 8%;
  right: -4%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.3rem;
  height: 4.3rem;
  padding: 0;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.88);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36), 0 0 18px rgba(37, 99, 235, 0.28);
  font-weight: 800;
  letter-spacing: 0.02em;
  animation: avatarHello 3.8s ease-in-out infinite;
}

.avatar-hi span {
  display: inline-block;
  line-height: 1;
}

.avatar-hi .wave-hand {
  transform-origin: 70% 70%;
  animation: waveHello 1.8s ease-in-out infinite;
}

.avatar-hi .wave-hand .icon {
  width: 2.25rem;
  height: 2.25rem;
  overflow: visible;
  stroke-width: 2.1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.34));
}

.section-title.visible::after,
.section-title.reveal.visible::after {
  width: 88%;
  animation: none;
}

html.js .reveal.visible,
html.js .section-title.reveal.visible,
html.js .card.reveal.visible,
html.js .hero-image.reveal.visible {
  animation: fadeRise 420ms ease both;
}

@keyframes avatarHello {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes waveHello {
  0%,
  100% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(16deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  60% {
    transform: rotate(12deg);
  }
  80% {
    transform: rotate(-6deg);
  }
}

@media (max-width: 780px) {
  .hero-image {
    width: min(100%, 340px);
  }

  .avatar-hi {
    top: 2%;
    right: 0;
    width: 3.7rem;
    height: 3.7rem;
  }

  .avatar-hi .wave-hand .icon {
    width: 1.95rem;
    height: 1.95rem;
  }
}

@media (max-width: 420px) {
  .portrait-wrap::after {
    inset: -22px;
  }

  .portrait-wrap::before {
    inset: -12px;
  }

  .avatar-hi {
    right: 0.25rem;
    width: 3.35rem;
    height: 3.35rem;
  }

  .avatar-hi .wave-hand .icon {
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress,
  .site-motion::before,
  .site-motion::after,
  .site-motion span,
  .navbar,
  .logo,
  .nav-links li,
  .hero::before,
  .hero::after,
  h1,
  .hero-badge,
  .hero-summary,
  .btn-primary,
  .portrait-wrap,
  .portrait-wrap::before,
  .portrait-wrap::after,
  .hero-image img,
  .hero-highlights div,
  .section-title,
  .section-title::after,
  .card,
  .card:hover::after,
  .icon-badge .icon,
  html.js .reveal.visible,
  html.js .section-title.reveal.visible,
  html.js .card.reveal.visible,
  html.js .hero-image.reveal.visible {
    animation: none !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}
