:root {
  --bg: #020202;
  --surface: rgba(10, 10, 10, 0.78);
  --surface-strong: rgba(16, 16, 16, 0.95);
  --border: rgba(255, 255, 255, 0.16);
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --accent: #ffffff;
  --cursor: #f0f0f0;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
}

:root[data-theme="light"] {
  --bg: #f5f5f5;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(242, 242, 242, 0.93);
  --border: rgba(0, 0, 0, 0.14);
  --text: #101010;
  --muted: #535353;
  --accent: #111111;
  --cursor: #0a0a0a;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
  cursor: none;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.08), transparent 40%),
    radial-gradient(circle at 85% 6%, rgba(255, 255, 255, 0.05), transparent 35%),
    var(--bg);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  transition: background-color 0.35s ease, color 0.35s ease;
}

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

#particle-canvas,
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#particle-canvas {
  z-index: 0;
}

.grain {
  z-index: 1;
  opacity: 0.22;
  background-image: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.16) 0.5px, transparent 0.5px);
  background-size: 2px 2px;
  mix-blend-mode: soft-light;
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  border: 1.5px solid var(--cursor);
  background-color: var(--cursor);
  box-shadow: 0 0 7px var(--cursor);
  width: 7px;
  height: 7px;
  border-radius: 50px;
  z-index: 100;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.08s ease-out;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 60px);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  animation: nav-drop 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes nav-drop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: clamp(10px, 2vw, 22px);
  flex-wrap: wrap;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--text);
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

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

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
}

.layout {
  position: relative;
  z-index: 2;
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 78px) 0 90px;
  display: grid;
  gap: 24px;
}

.hero,
.card {
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, color-mix(in srgb, var(--surface) 90%, transparent), transparent);
  box-shadow: var(--shadow);
}

.hero {
  padding: clamp(22px, 4vw, 54px);
}

.hero-grid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  grid-template-columns: 1.5fr 1fr;
  align-items: stretch;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--muted);
}

.hero h1 {
  margin: 14px 0 12px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.95rem, 4.7vw, 4.3rem);
  font-weight: 700;
  line-height: 1.08;
  max-width: 17ch;
}

.hero h1 span {
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
}

.hero-summary {
  max-width: 63ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.14rem);
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 11px 17px;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: color-mix(in srgb, var(--bg) 94%, transparent);
  background: var(--text);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.15);
}

:root[data-theme="light"] .btn.primary {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.btn.secondary {
  border: 1px solid var(--border);
  background: var(--surface);
}

.hero-metrics {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-metrics article {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
  transform: translateY(0);
  transition: transform 0.2s ease;
}

.hero-metrics article:hover {
  transform: translateY(-4px);
}

.hero-metrics h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-family: "Sora", sans-serif;
}

.hero-metrics p {
  margin: 2px 0 0;
  font-size: 0.82rem;
}

.hero-panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
  overflow: hidden;
  animation: panel-float 4s ease-in-out infinite;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: -120% auto auto -20%;
  width: 140%;
  height: 260%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: rotate(16deg);
  animation: panel-scan 5.2s linear infinite;
  pointer-events: none;
}

@keyframes panel-float {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes panel-scan {
  0% {
    transform: translateX(-40%) rotate(16deg);
  }

  100% {
    transform: translateX(65%) rotate(16deg);
  }
}

.panel-label {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-panel ul {
  margin: 14px 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.panel-location {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card {
  padding: clamp(22px, 3.2vw, 36px);
  transition: transform 0.3s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--border) 70%, var(--text));
}

h2 {
  margin: 0 0 12px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.42rem, 2.5vw, 2.15rem);
}

h3 {
  margin: 0;
  font-size: clamp(1.02rem, 1.8vw, 1.26rem);
}

p,
li {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 16px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
}

.timeline-meta {
  margin-bottom: 10px;
}

.timeline-meta p {
  margin: 4px 0;
}

.education-item + .education-item {
  margin-top: 18px;
}

.timeline-item ul,
.education-item ul {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.skills-showcase {
  overflow: hidden;
}

.skills-intro {
  margin: 0 0 14px;
  max-width: 72ch;
}

.skills-marquee {
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  overflow: hidden;
  margin-bottom: 14px;
}

.skills-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 10px;
  padding: 9px;
  animation: skill-marquee 34s linear infinite;
}

@keyframes skill-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.skills-marquee-pill {
  --pill-color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.skills-marquee-pill i {
  color: var(--muted);
  transition: color 0.25s ease;
}

.skills-marquee-pill:hover {
  color: var(--pill-color);
  border-color: color-mix(in srgb, var(--pill-color) 70%, var(--border));
}

.skills-marquee-pill:hover i {
  color: var(--pill-color);
}

.skills-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.skill-icon-card {
  --hover-color: #ffffff;
  --skill-stagger: 0;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
  border-radius: 14px;
  padding: 13px 10px;
  min-height: 108px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  opacity: 1;
  transform: translateY(0) scale(1);
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
  transition:
    transform 0.24s ease,
    border-color 0.26s ease,
    box-shadow 0.26s ease,
    background 0.26s ease;
}

.skills-showcase.skills-pending .skill-icon-card {
  opacity: 0;
  transform: translateY(18px) scale(0.97);
}

.skills-showcase.skills-animated .skill-icon-card {
  animation: skill-card-enter 0.88s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--skill-stagger) * 72ms);
}

.skills-showcase.skills-animated .skill-icon-card::before {
  animation: skill-card-aura 0.88s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--skill-stagger) * 72ms);
}

.skill-icon-card::before {
  content: "";
  position: absolute;
  inset: 10% 16%;
  border-radius: 14px;
  background: radial-gradient(circle, color-mix(in srgb, var(--hover-color) 20%, transparent) 0%, transparent 75%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.skill-icon-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: color-mix(in srgb, var(--hover-color) 65%, var(--border));
  box-shadow: 0 14px 26px color-mix(in srgb, var(--hover-color) 16%, rgba(0, 0, 0, 0.35));
}

.skill-icon-card:hover::before {
  opacity: 1;
}

.skill-icon {
  position: relative;
  z-index: 1;
  font-size: 1.72rem;
  color: var(--muted);
  transition: transform 0.26s ease, color 0.26s ease, filter 0.26s ease;
}

.skill-icon-card:hover .skill-icon {
  color: var(--hover-color);
  transform: translateY(-5px) scale(1.08) rotate(-5deg);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--hover-color) 55%, transparent));
}

.skill-name {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}

.skill-icon-card:hover .skill-name {
  color: color-mix(in srgb, var(--text) 88%, var(--hover-color));
}

@keyframes skill-card-enter {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    border-color: color-mix(in srgb, var(--hover-color) 38%, var(--border));
    box-shadow: 0 0 0 color-mix(in srgb, var(--hover-color) 0%, transparent);
  }

  44% {
    opacity: 1;
    border-color: color-mix(in srgb, var(--hover-color) 74%, var(--border));
    box-shadow: 0 14px 28px color-mix(in srgb, var(--hover-color) 24%, rgba(0, 0, 0, 0.35));
  }

  84% {
    border-color: color-mix(in srgb, var(--hover-color) 54%, var(--border));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--hover-color) 14%, rgba(0, 0, 0, 0.28));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: color-mix(in srgb, var(--border) 84%, transparent);
    box-shadow: 0 0 0 color-mix(in srgb, var(--hover-color) 0%, transparent);
  }
}

@keyframes skill-card-aura {
  0% {
    opacity: 0;
  }

  46% {
    opacity: 0.92;
  }

  82% {
    opacity: 0.34;
  }

  100% {
    opacity: 0;
  }
}

.contact-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.contact-links a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  color: var(--text);
  transition: transform 0.2s ease;
}

.contact-links a:hover {
  transform: translateY(-2px);
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.995);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .skills-marquee-track,
  .skill-icon-card,
  .hero-panel,
  .hero-panel::before {
    animation: none;
  }

  .skills-showcase.skills-pending .skill-icon-card {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .skills-showcase.skills-animated .skill-icon-card::before {
    animation: none;
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

@media (max-width: 780px) {
  * {
    cursor: auto;
  }

  .custom-cursor {
    display: none;
  }

  .nav-links {
    gap: 11px;
    font-size: 0.8rem;
  }

  .hero h1 {
    max-width: 100%;
  }

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

/* Glowing career timeline line */
.timeline {
  --timeline-progress: 0;
  --timeline-start: 22px;
  --timeline-travel: 0px;
  position: relative;
  margin-left: 8px;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--timeline-start);
  width: 2px;
  height: calc(2px + var(--timeline-travel));
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--text) 7%, transparent),
    color-mix(in srgb, var(--text) 18%, transparent),
    color-mix(in srgb, var(--text) 7%, transparent)
  );
  opacity: 0.86;
}

.timeline::after {
  content: "";
  position: absolute;
  left: -4px;
  top: var(--timeline-start);
  width: 10px;
  height: calc(4px + var(--timeline-progress) * var(--timeline-travel));
  border-radius: 999px;
  background: linear-gradient(
    to right,
    transparent 0%,
    color-mix(in srgb, var(--text) 24%, transparent) 20%,
    color-mix(in srgb, var(--text) 70%, transparent) 50%,
    color-mix(in srgb, var(--text) 24%, transparent) 80%,
    transparent 100%
  );
  filter: blur(1.8px);
  box-shadow:
    0 0 26px color-mix(in srgb, var(--text) 42%, transparent),
    0 0 52px color-mix(in srgb, var(--text) 24%, transparent);
}

.timeline-asteroid {
  --impact: 0;
  position: absolute;
  left: 1px;
  top: var(--timeline-start);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0 30%, #f8f8f8 31%, #cfcfcf 64%, #8f8f8f 100%);
  transform: translate(-50%, -50%) scale(0.9);
  box-shadow:
    0 0 16px rgba(255, 255, 255, 0.5),
    0 0 36px rgba(255, 255, 255, 0.28),
    0 0 74px rgba(255, 255, 255, 0.12);
  z-index: 3;
  pointer-events: none;
  transition:
    transform 0.08s linear,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.timeline-asteroid::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, transparent 70%);
  opacity: calc(0.28 + var(--impact) * 1.12);
}

.timeline-asteroid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -42px;
  transform: translateX(-50%);
  width: 6px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0.25),
    transparent
  );
  filter: blur(1.8px);
  opacity: calc(0.22 + var(--impact) * 1.05);
}

.timeline-item {
  position: relative;
}

@media (max-width: 780px) {
  .timeline {
    margin-left: 0;
    padding-left: 14px;
  }

  .timeline-asteroid {
    width: 13px;
    height: 13px;
  }

  .timeline::after {
    width: 8px;
    left: -3px;
  }
}

:root[data-theme="light"] .timeline-asteroid {
  background: radial-gradient(circle at 34% 28%, #4a4a4a 0 24%, #2b2b2b 40%, #141414 72%, #080808 100%);
}

:root[data-theme="light"] .timeline-asteroid::before {
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.07) 44%, transparent 74%);
}

:root[data-theme="light"] .timeline-asteroid::after {
  background: linear-gradient(
    to top,
    rgba(14, 14, 14, 0.66),
    rgba(14, 14, 14, 0.24),
    transparent
  );
}

.resume-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  color: var(--text);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.4),
    0 0 0 0 color-mix(in srgb, var(--text) 0%, transparent);
  letter-spacing: 0.04em;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
  animation:
    resume-fab-enter 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both,
    resume-fab-float 2.6s ease-in-out 0.52s infinite,
    resume-fab-pulse 2.6s ease-in-out 0.52s infinite;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.26s ease,
    background 0.26s ease;
}

.resume-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent 12%,
    color-mix(in srgb, var(--text) 16%, transparent) 50%,
    transparent 88%
  );
  transform: translateX(-130%);
  animation: resume-fab-sheen 4s linear 0.8s infinite;
  pointer-events: none;
}

.resume-fab i,
.resume-fab span {
  position: relative;
  z-index: 1;
}

.resume-fab i {
  font-size: 0.98rem;
}

.resume-fab:hover,
.resume-fab:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--text) 34%, var(--border));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.45),
    0 0 20px color-mix(in srgb, var(--text) 20%, transparent);
}

@keyframes resume-fab-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resume-fab-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes resume-fab-pulse {
  0%,
  100% {
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.4),
      0 0 0 0 color-mix(in srgb, var(--text) 0%, transparent);
  }

  50% {
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.46),
      0 0 0 6px color-mix(in srgb, var(--text) 11%, transparent);
  }
}

@keyframes resume-fab-sheen {
  0% {
    transform: translateX(-130%);
  }

  24%,
  100% {
    transform: translateX(130%);
  }
}

@media (max-width: 780px) {
  .resume-fab {
    right: 12px;
    bottom: 12px;
    padding: 10px 12px;
    gap: 8px;
    font-size: 0.7rem;
  }

  .resume-fab i {
    font-size: 0.9rem;
  }
}

:root[data-theme="light"] .resume-fab {
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.2),
    0 0 0 0 color-mix(in srgb, var(--text) 0%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .resume-fab,
  .resume-fab::before {
    animation: none;
  }
}
