:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-soft: #0f0f12;
  --surface: #121216;
  --surface-raised: #18181d;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #ffffff;
  --violet: #7c3aed;
  --cyan: #06b6d4;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --radius: 14px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #f4f4f5;
  --surface-raised: #ffffff;
  --text: #09090b;
  --muted: #52525b;
  --subtle: #71717a;
  --border: rgba(9, 9, 11, 0.1);
  --border-strong: rgba(9, 9, 11, 0.16);
  --accent: #09090b;
}

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

* {
  -webkit-user-select: none;
  user-select: none;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: geometricPrecision;
  transition: background-color 420ms ease, color 420ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% -10%, rgba(124, 58, 237, 0.22), transparent 28rem),
    radial-gradient(circle at 85% 10%, rgba(6, 182, 212, 0.12), transparent 24rem),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  transition: background 420ms ease;
}

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

button {
  font: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.animated-grid {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 80%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 80%, transparent) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.62) 42%, transparent 84%);
  animation: gridDrift 26s linear infinite;
}

.mouse-spotlight {
  position: fixed;
  left: 0;
  top: 0;
  z-index: -4;
  width: 760px;
  height: 760px;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  background:
    radial-gradient(circle at 40% 40%, rgba(124, 58, 237, 0.16), transparent 34%),
    radial-gradient(circle at 60% 45%, rgba(6, 182, 212, 0.1), transparent 38%),
    radial-gradient(circle at 50% 60%, rgba(244, 63, 94, 0.08), transparent 42%);
  filter: blur(6px);
  transition: opacity 280ms ease;
}

.gradient-blob {
  position: fixed;
  z-index: -6;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.13;
  filter: blur(90px);
  animation: blobFloat 18s var(--ease) infinite alternate;
}

.blob-violet {
  left: -120px;
  top: 18vh;
  background: var(--violet);
}

.blob-cyan {
  right: -140px;
  top: 34vh;
  background: var(--cyan);
  animation-duration: 22s;
}

.blob-rose {
  left: 46vw;
  bottom: -190px;
  background: var(--rose);
  animation-duration: 24s;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2000;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--text);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--text) 52%, transparent);
  transition: width 180ms ease, height 180ms ease, border-color 180ms ease, background 180ms ease;
}

body.cursor-active .cursor-dot,
body.cursor-active .cursor-ring,
body.cursor-active .mouse-spotlight {
  opacity: 1;
}

body.cursor-hover .cursor-ring {
  width: 58px;
  height: 58px;
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(124, 58, 237, 0.06);
}

.container {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 1000;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--rose));
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.32);
  transition: width 120ms linear;
}

.site-header {
  position: fixed;
  inset: 14px 0 auto;
  z-index: 999;
  pointer-events: none;
  transition: transform 220ms ease;
}

.site-header.scrolled,
.site-header.menu-open {
  transform: translateY(-2px);
}

.nav {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  padding: 0 14px 0 18px;
  transition: border-color 260ms ease, background 420ms ease, box-shadow 260ms ease;
}

.site-header.scrolled .nav,
.site-header.menu-open .nav {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  font-family: var(--mono);
  font-weight: 600;
}

.brand-name {
  color: var(--muted);
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
}

.nav-links {
  position: relative;
  gap: 2px;
  margin-left: auto;
}

.nav-links a,
.mobile-menu a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 11px;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-menu a:hover {
  color: var(--text);
}

.nav-indicator {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--rose));
  transition: transform 360ms var(--ease), width 360ms var(--ease), opacity 180ms ease;
}

.nav-actions {
  gap: 10px;
}

.theme-toggle,
.menu-toggle,
.back-to-top {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.theme-toggle {
  width: 38px;
  height: 28px;
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
}

.theme-dot {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 300ms var(--ease), background 420ms ease;
}

[data-theme="light"] .theme-dot {
  transform: translateX(10px);
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: currentColor;
  transition: transform 180ms ease;
}

.menu-toggle span + span {
  margin-top: 5px;
}

.menu-toggle.is-open span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle.is-open span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 92vh;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 18% -10% auto auto;
  width: min(52vw, 640px);
  height: min(52vw, 640px);
  border: 1px solid var(--border);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 45%),
    radial-gradient(circle at 60% 30%, rgba(124, 58, 237, 0.2), transparent 42%);
  filter: blur(1px);
  animation: heroOrb 18s var(--ease) infinite alternate;
}

.hero::after {
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  padding: 148px 0 110px;
}

.availability,
.section-label,
.stack {
  font-family: var(--mono);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.availability {
  margin: 0 0 22px;
  color: var(--subtle);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.045em;
  line-height: 1.05;
}

h1 {
  max-width: 940px;
  font-size: clamp(4.6rem, 8.2vw, 6.9rem);
  font-weight: 700;
}

h2 {
  max-width: 760px;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 650;
}

h3 {
  font-size: 1.08rem;
  font-weight: 600;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
}

.hero-copy {
  max-width: 520px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1.24rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
  padding: 9px 16px;
  will-change: transform;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateY(-1px);
  box-shadow: 0 0 34px rgba(124, 58, 237, 0.12);
}

.button-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.section {
  border-bottom: 1px solid var(--border);
  position: relative;
  padding: 96px 0;
}

.section.compact {
  padding: 44px 0;
}

.split {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 64px;
}

.section-label {
  color: var(--subtle);
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
}

.section-content p {
  max-width: 700px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.14rem;
}

.wave-separator {
  height: 46px;
  margin-top: -1px;
  color: var(--surface);
  opacity: 0.18;
  overflow: hidden;
  pointer-events: none;
}

.wave-separator svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.wave-flip {
  transform: rotate(180deg);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.skill-group {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  padding: 24px;
  transition: background 220ms ease, transform 220ms ease;
}

.skill-group::before,
.project-card::after,
.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(124, 58, 237, 0.16), rgba(6, 182, 212, 0.07), transparent 44%);
  transition: opacity 220ms ease;
}

.skill-group:hover {
  background: var(--surface-raised);
}

.skill-group:hover::before,
.project-card:hover::after,
.profile-card:hover::after {
  opacity: 1;
}

.skill-group h3 {
  margin-bottom: 18px;
}

.skill-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-group li {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 6px 10px;
}

.projects-list {
  display: grid;
  gap: 16px;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  isolation: isolate;
  transition: background 220ms ease, transform 220ms var(--ease), box-shadow 220ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--beam-angle, 0deg), transparent, rgba(124, 58, 237, 0.52), rgba(6, 182, 212, 0.42), rgba(244, 63, 94, 0.38), transparent 38%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: borderBeam 9s linear infinite;
}

.project-card:hover {
  background: var(--surface-raised);
  transform: translateY(-3px) scale(1.006);
  box-shadow: 0 22px 80px rgba(124, 58, 237, 0.12);
}

.project-banner {
  min-height: 245px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 48%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 18rem),
    #0f0f12;
  background-size: 130% 130%;
  transition: transform 420ms var(--ease), filter 420ms ease, background-position 700ms ease;
  animation: bannerShift 12s var(--ease) infinite alternate;
}

.project-card:hover .project-banner {
  transform: scale(1.025);
  filter: saturate(1.1);
}

.banner-one { background-color: #101014; background-image: linear-gradient(135deg, rgba(124, 58, 237, 0.35), transparent 55%), radial-gradient(circle at 75% 30%, rgba(6, 182, 212, 0.2), transparent 14rem); }
.banner-two { background-color: #101014; background-image: linear-gradient(135deg, rgba(244, 63, 94, 0.28), transparent 55%), radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.2), transparent 14rem); }
.banner-three { background-color: #101014; background-image: linear-gradient(135deg, rgba(6, 182, 212, 0.25), transparent 55%), linear-gradient(90deg, transparent 49%, rgba(255,255,255,0.08) 50%, transparent 51%); }
.banner-four { background-color: #101014; background-image: radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.32), transparent 12rem), radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.16), transparent 12rem); }
.banner-five { background-color: #101014; background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 42px), linear-gradient(135deg, rgba(245, 158, 11, 0.22), transparent); }
.banner-six { background-color: #101014; background-image: linear-gradient(145deg, transparent 36%, rgba(124, 58, 237, 0.25) 36% 40%, transparent 40%), radial-gradient(circle at 70% 40%, rgba(244, 63, 94, 0.2), transparent 13rem); }

.project-body {
  display: grid;
  align-content: center;
  gap: 16px;
  min-width: 0;
  padding: 34px;
}

.project-body p {
  max-width: 620px;
  color: var(--muted);
}

.stack {
  color: var(--subtle);
}

.project-links,
.contact-list,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.project-links a,
.contact-list a,
.profile-row a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 500;
  transition: color 160ms ease;
}

.project-links a:hover,
.contact-list a:hover,
.profile-row a:hover,
.footer-links a:hover {
  color: var(--text);
}

.timeline-list {
  position: relative;
  display: grid;
  border-top: 0;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 78px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--violet), var(--cyan), var(--rose), transparent);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.32);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 32px;
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 72px;
  top: 30px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 0 6px rgba(6, 182, 212, 0.06), 0 0 22px rgba(6, 182, 212, 0.28);
  animation: nodePulse 3s ease-in-out infinite;
}

.timeline-item span {
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.timeline-item p {
  margin-top: 6px;
  color: var(--muted);
}

.profile-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
}

.profile-card {
  position: relative;
  overflow: hidden;
  min-height: 82px;
  justify-content: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  padding: 18px;
  transition: transform 220ms var(--ease), border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.profile-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  transform: translateY(-3px);
  box-shadow: 0 18px 52px rgba(6, 182, 212, 0.08);
}

.link-icon {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1;
}

.contact-list {
  margin-top: 28px;
}

.footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface) 58%, transparent));
  padding: 64px 0;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.footer h2 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.footer p {
  color: var(--muted);
}

.copyright {
  font-family: var(--mono);
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 998;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

body.protected-flash::after {
  content: "Protected";
  position: fixed;
  right: 22px;
  bottom: 76px;
  z-index: 2500;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 7px 10px;
  backdrop-filter: blur(14px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--surface);
}
