:root {
  color-scheme: dark;
  --bg: #080b12;
  --bg-2: #0c111d;
  --card: rgba(255, 255, 255, 0.075);
  --card-strong: rgba(255, 255, 255, 0.115);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.21);
  --text: #f8fbff;
  --muted: #a8b3c7;
  --soft: #d9e3f8;
  --blue: #66a6ff;
  --cyan: #89f7fe;
  --violet: #c084fc;
  --green: #81fbb8;
  --amber: #ffd166;
  --danger: #ff7a90;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --wrap: 1180px;
  --pad: clamp(20px, 4vw, 56px);
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  line-height: 1.55;
}

body::selection {
  background: rgba(102, 166, 255, .35);
}

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

button {
  font: inherit;
}

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

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

.wrap {
  width: min(var(--wrap), calc(100% - 32px));
  margin-inline: auto;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(137, 247, 254, 0.18), transparent 30%),
    radial-gradient(circle at 84% 8%, rgba(192, 132, 252, 0.16), transparent 30%),
    linear-gradient(140deg, #070912 0%, #0a0f1b 46%, #090d16 100%);
}

.mesh {
  position: absolute;
  inset: 0;
  opacity: .48;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 24%, black, transparent 70%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: .045;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

.blob {
  position: absolute;
  width: min(54vw, 660px);
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(45px);
  opacity: .2;
  animation: drift 18s ease-in-out infinite;
}

.blob-one {
  left: -20%;
  top: 8%;
  background: var(--blue);
}

.blob-two {
  right: -18%;
  top: 36%;
  background: var(--violet);
  animation-delay: -6s;
}

.blob-three {
  width: min(44vw, 520px);
  left: 28%;
  bottom: -26%;
  background: var(--green);
  animation-delay: -11s;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4%, -3%, 0) scale(1.1); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(8, 11, 18, .84), rgba(8, 11, 18, .58));
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #f9fcff;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.04)),
    rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 18px 40px rgba(102, 166, 255, .18);
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -35%;
  background: conic-gradient(from 0deg, transparent, rgba(137,247,254,.38), transparent, rgba(192,132,252,.45), transparent);
  animation: spin 7s linear infinite;
}

.brand-mark svg {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
}

.mark-orbit {
  transform-origin: center;
  animation: spin 9s linear infinite;
}

.mark-dot {
  filter: drop-shadow(0 0 8px currentColor);
}

.dot-a {
  animation: pulseDot 2.6s ease-in-out infinite;
}

.dot-b {
  animation: pulseDot 2.6s ease-in-out infinite .75s;
}

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

@keyframes pulseDot {
  0%, 100% { opacity: .55; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.16); }
}

.brand strong {
  display: block;
  letter-spacing: -.03em;
  font-size: 1rem;
  line-height: 1.05;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-links a {
  color: var(--soft);
  font-size: .92rem;
  padding: 10px 13px;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.09);
  transform: translateY(-1px);
  outline: none;
}

.nav-contact {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, .76fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  padding: clamp(54px, 8vw, 110px) 0 clamp(42px, 6vw, 84px);
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  margin-bottom: 16px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: clamp(.72rem, 1vw, .82rem);
}

.eyebrow::before,
.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.hero h1 {
  max-width: 850px;
  font-size: clamp(2.7rem, 7.4vw, 6.7rem);
  line-height: .91;
  letter-spacing: clamp(-.075em, -0.4vw, -.035em);
  margin-bottom: 24px;
  text-wrap: balance;
}

.lead {
  max-width: 760px;
  font-size: clamp(1.05rem, 1.45vw, 1.32rem);
  color: #c9d4e9;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 740;
  letter-spacing: -.01em;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

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

.button.primary {
  color: #07101c;
  background: linear-gradient(135deg, var(--cyan), var(--blue) 58%, var(--violet));
  box-shadow: 0 20px 45px rgba(102, 166, 255, .24);
}

.button.ghost {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--soft);
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-row span,
.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: #dce7fa;
  font-size: .86rem;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.15);
  background:
    linear-gradient(160deg, rgba(255,255,255,.13), rgba(255,255,255,.045)),
    rgba(8, 11, 18, .7);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-style: preserve-3d;
  animation: cardFloat 7s ease-in-out infinite;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(circle at 25% 10%, rgba(137,247,254,.22), transparent 28%),
    radial-gradient(circle at 88% 36%, rgba(192,132,252,.20), transparent 30%);
  pointer-events: none;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50% { transform: translateY(-10px) rotateX(1.5deg); }
}

.terminal-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: var(--muted);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
}

.terminal-top span:first-child {
  background: var(--danger);
}
.terminal-top span:nth-child(2) {
  background: var(--amber);
}
.terminal-top span:nth-child(3) {
  background: var(--green);
}

.terminal-top strong {
  margin-left: auto;
  font-size: .82rem;
  color: #d8e4f7;
  font-weight: 650;
}

pre {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  font-size: clamp(.79rem, 1vw, .9rem);
  color: #e7f2ff;
  line-height: 1.7;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.card-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,.1);
}

.card-metrics div {
  padding: 17px;
  border-right: 1px solid rgba(255,255,255,.1);
}

.card-metrics div:last-child {
  border-right: 0;
}

.card-metrics strong {
  display: block;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  letter-spacing: -.04em;
}

.card-metrics span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
}

.section {
  padding: clamp(56px, 8vw, 110px) 0;
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head.wide {
  max-width: 980px;
}

.section-head h2,
.contact-card h2,
.resume-main h2 {
  font-size: clamp(2rem, 4.5vw, 4.65rem);
  line-height: .98;
  letter-spacing: clamp(-.055em, -0.25vw, -.025em);
  margin-bottom: 16px;
  text-wrap: balance;
}

.section-head p:not(.kicker) {
  max-width: 780px;
  font-size: clamp(1rem, 1.25vw, 1.16rem);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.profile-card,
.stack-card,
.project-card,
.resume-shell,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255,255,255,.095), rgba(255,255,255,.045));
  box-shadow: 0 20px 70px rgba(0,0,0,.22);
}

.profile-card {
  padding: clamp(22px, 3vw, 32px);
}

.profile-card h3,
.stack-card h3,
.project-card h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.65rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  margin-bottom: 12px;
}

.profile-card p,
.stack-card p,
.project-card p {
  margin-bottom: 0;
}

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

.project-card {
  position: relative;
  min-height: 100%;
  padding: clamp(24px, 3.6vw, 42px);
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% 20%;
  height: 220px;
  background: radial-gradient(circle, rgba(102,166,255,.18), transparent 60%);
  pointer-events: none;
}

.project-card.spotlight {
  border-color: rgba(137, 247, 254, .28);
  background:
    linear-gradient(155deg, rgba(137,247,254,.12), rgba(192,132,252,.06)),
    rgba(255,255,255,.045);
}

.project-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.project-tag,
.project-date {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 780;
  color: #0a101b;
}

.project-tag {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.project-date {
  color: var(--soft);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.project-card h3 {
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  max-width: 720px;
}

.project-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.project-list span {
  position: relative;
  padding-left: 26px;
  color: #dce6f7;
}

.project-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 18px rgba(137,247,254,.45);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stack-card {
  padding: clamp(20px, 2.7vw, 30px);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.stack-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--card-strong);
}

.stack-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 15px;
  color: #07101c;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 850;
  letter-spacing: -.04em;
}

.resume-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-xl);
}

.resume-title {
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  color: #d6e2f5;
  margin-bottom: 32px;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}

.timeline-item span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--cyan);
  font-weight: 850;
}

.timeline-item h3 {
  margin-bottom: 5px;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  letter-spacing: -.02em;
}

.timeline-item p {
  margin-bottom: 0;
}

.resume-side {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(255,255,255,.1);
  align-self: start;
}

.resume-side h3 {
  margin-bottom: 18px;
  letter-spacing: -.02em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: clamp(24px, 4vw, 46px);
  border-radius: var(--radius-xl);
}

.mail-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  color: #07101c;
  background: linear-gradient(135deg, var(--cyan), var(--blue) 58%, var(--violet));
  font-weight: 850;
  box-shadow: 0 22px 45px rgba(102,166,255,.22);
  white-space: nowrap;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 0 42px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.footer p {
  margin-bottom: 0;
}

.footer a {
  color: #d8e4f7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(16px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

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

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

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

@media (max-width: 980px) {
  .hero,
  .projects,
  .profile-grid,
  .stack-grid,
  .resume-shell,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .hero-card {
    max-width: 640px;
  }

  .resume-side {
    align-self: stretch;
  }

  .contact-card {
    gap: 20px;
  }

  .mail-link {
    width: fit-content;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(100% - 24px, var(--wrap));
  }

  .site-header {
    background: rgba(8, 11, 18, .88);
  }

  .nav {
    min-height: 68px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 22px;
    background: rgba(9, 13, 22, .96);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }

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

  .nav-links a {
    padding: 12px 14px;
  }

  .brand small {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 15vw, 4.45rem);
    line-height: .93;
  }

  .lead {
    font-size: 1rem;
  }

  .button,
  .mail-link {
    width: 100%;
  }

  .hero-actions {
    display: grid;
  }

  pre {
    font-size: .74rem;
    padding: 18px;
  }

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

  .card-metrics div {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }

  .card-metrics div:last-child {
    border-bottom: 0;
  }

  .project-top {
    align-items: flex-start;
  }

  .section {
    padding: 54px 0;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
