:root {
  --bg: #08080E;
  --bg-2: #0B0B13;
  --panel: #10101B;
  --panel-2: #131320;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #EDEFF6;
  --body: #B2B7C9;
  --muted: #9BA1B5;
  --violet: #8B7CFF;
  --violet-deep: #6E5BF7;
  --violet-soft: rgba(124, 108, 255, 0.16);
  --green: #4ADE80;
  --green-soft: rgba(74, 222, 128, 0.14);
  --orange: #FBBF24;
  --orange-soft: rgba(251, 191, 36, 0.14);
  --pink: #F472B6;
  --pink-soft: rgba(244, 114, 182, 0.14);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--body);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

img, svg { vertical-align: middle; }

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

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--violet); color: #fff; }

.wrap {
  max-width: 1150px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 40px);
}

h1, h2, h3 { color: var(--text); letter-spacing: -0.02em; }

section { scroll-margin-top: 84px; }

.section { padding-block: 40px; }

.section-head {
  margin-bottom: 30px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.grid2 h2, .grid2 .skills-block h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

/* ---------- top bar ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 1150px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px clamp(20px, 4.5vw, 40px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.brand em { font-style: normal; color: var(--violet); }

.glyph-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--violet-soft);
  color: var(--violet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.topnav { display: flex; flex-wrap: wrap; gap: 6px 22px; }

.topnav a {
  position: relative;
  font-size: 0.93rem;
  color: var(--body);
  transition: color .15s ease;
}

.topnav a:hover { color: var(--text); }

.topnav a.active { color: var(--text); font-weight: 600; }

.topnav a.active::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 4px;
  height: 4px;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--violet);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.btn:active { transform: translateY(1px); }

.btn--solid {
  background: linear-gradient(135deg, var(--violet) 10%, var(--violet-deep) 90%);
  color: #fff;
}

.btn--solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(110, 91, 247, 0.35);
}

.btn--dark {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--panel);
}

.btn--dark:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-2px); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(28px, 5vw, 60px);
  padding-block: clamp(56px, 9vw, 96px) clamp(30px, 4vw, 44px);
}

.hi-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.hi-hand { font-size: 1rem; }

.hero-name {
  margin-top: 20px;
  font-size: clamp(3rem, 6.8vw, 5rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-name em {
  font-style: normal;
  background: linear-gradient(120deg, #B3A6FF 0%, #8B7CFF 55%, #6E5BF7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--violet);
  filter: drop-shadow(0 10px 28px rgba(110, 91, 247, 0.30));
}

.hero-role {
  margin-top: 12px;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 600;
  color: var(--text);
}

.hero-lede { margin-top: 18px; max-width: 52ch; font-size: 1.08rem; line-height: 1.7; }

.hero-lede strong { color: var(--text); font-weight: 600; }

.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* hero visual */

.hero-visual {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
}

.dots {
  position: absolute;
  top: 4%;
  left: 2%;
  width: 110px;
  height: 110px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.22) 1.4px, transparent 1.4px);
  background-size: 15px 15px;
  opacity: .8;
}

.orb {
  position: relative;
  width: min(64%, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #9E90FF 0%, var(--violet-deep) 55%, #4A3CC9 100%);
  box-shadow: 0 24px 80px rgba(110, 91, 247, 0.28);
  display: grid;
  place-items: center;
}

.orb-mark {
  font-size: clamp(3rem, 6vw, 4.4rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-width: 200px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 16, 27, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.float-card b { display: block; color: var(--text); font-size: 1.3rem; font-weight: 700; line-height: 1.15; }

.float-card small { color: var(--muted); font-size: 0.78rem; }

.float-a { top: 12%; left: -2%; animation: floaty 5s ease-in-out infinite; }

.float-b { bottom: 13%; right: -2%; animation: floaty 5s ease-in-out 1.2s infinite; }

.float-c { top: 16%; right: -2%; animation: floaty 5s ease-in-out 2.2s infinite; }

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

/* ---------- chips & stats ---------- */

.chip {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.chip--violet { background: var(--violet-soft); color: var(--violet); }
.chip--green { background: var(--green-soft); color: var(--green); }
.chip--orange { background: var(--orange-soft); color: var(--orange); }
.chip--pink { background: var(--pink-soft); color: var(--pink); }

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-block: 26px 8px;
  padding: 30px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.stats li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-inline: 22px;
  border-left: 1px solid var(--line);
}

.stats li:first-child { border-left: 0; }

.stats b { display: block; color: var(--text); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }

.stats b.num--word { font-size: clamp(1.15rem, 2vw, 1.5rem); }

.stats small { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }

/* ---------- about ---------- */

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: clamp(36px, 5vw, 64px);
}

.grid2 p { font-size: 1rem; line-height: 1.75; }

.grid2 p strong { color: var(--text); font-weight: 600; }

.edu-line {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem !important;
}

.edu-line svg { flex-shrink: 0; margin-top: 4px; color: var(--violet); }

.grid2 .btn { margin-top: 26px; }

.notecard {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
}

.notecard .chip { margin-top: 2px; }

.notecard p { font-size: 0.92rem; color: var(--body); }

.notecard strong { color: var(--text); font-weight: 600; }

.notecard--violet {
  border: 1px solid rgba(124, 108, 255, 0.38);
  background: var(--violet-soft);
}

.notecard--green {
  border: 1px solid rgba(74, 222, 128, 0.38);
  background: var(--green-soft);
}

/* skill bars */

.bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 26px;
}

.bar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.bar-top span { color: var(--text); font-size: 0.92rem; font-weight: 600; }

.bar-top em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--violet);
  background: var(--violet-soft);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #1C1C2A;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet) 0%, var(--violet-deep) 100%);
  transition: width 1.1s cubic-bezier(.25,.75,.35,1) .25s;
}

.reveal.is-in .bar-fill { width: var(--w); }

/* ---------- case studies ---------- */

.case {
  border-top: 2px solid var(--line);
  padding-block: 34px;
}

.case:first-child { border-top: 0; padding-top: 0; }

.case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 20px;
}

.case h3 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 700; }

.case-kicker { margin-top: 6px; color: var(--violet); font-size: 0.9rem; }

.case-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 18px 30px;
}

.case-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.case-col > p { font-size: 0.94rem; }

.case-list { list-style: none; }

.case-list li {
  position: relative;
  padding-left: 18px;
  margin-top: 9px;
  font-size: 0.94rem;
}

.case-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--violet);
}

.case-list.ticks li { font-weight: 560; color: var(--text); }

.case-list.ticks li::before {
  border-radius: 50%;
  background: var(--green);
  opacity: .85;
}

/* ---------- experience ---------- */

.tl {
  position: relative;
  padding-left: 30px;
  display: grid;
  gap: 36px;
}

.tl::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(var(--violet) 0%, var(--line) 90%);
  opacity: .5;
}

.tjob { position: relative; }

.tjob::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 5px var(--violet-soft);
}

.tjob-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.tjob-head h3 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); }

.tpill {
  font-size: 0.78rem;
  color: var(--body);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
}

.torg { margin-top: 6px; font-size: 0.9rem; color: var(--violet); }

.tlist { margin-top: 16px; list-style: none; }

.tlist li {
  position: relative;
  padding-left: 20px;
  margin-top: 10px;
  max-width: 72ch;
  font-size: 0.95rem;
}

.tlist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--violet);
  opacity: .75;
}

.tlist strong { color: var(--text); font-weight: 600; }

/* ---------- achievements ---------- */

.ach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ach {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.ach p { font-size: 0.94rem; }

/* ---------- contact ---------- */

.contact-band {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  align-items: center;
  gap: clamp(24px, 4vw, 44px);
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, #12121F 0%, #0D0D17 100%);
}

.cb-left .chip { margin-bottom: 16px; }

.cb-left h2 {
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cb-left p { margin-top: 10px; font-size: 0.94rem; max-width: 42ch; }

.cb-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px 0;
}

.cb-cols small {
  display: block;
  color: var(--violet);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cb-cols a, .cb-cols span {
  display: block;
  margin-top: 7px;
  color: var(--body);
  font-size: 0.93rem;
  overflow-wrap: anywhere;
  transition: color .15s ease;
}

.cb-cols a:hover { color: var(--text); }

/* ---------- footer ---------- */

.bot {
  margin-top: 30px;
  padding-block: 34px 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.bot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}

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

.botnav a { font-size: 0.88rem; color: var(--muted); transition: color .15s ease; }

.botnav a:hover { color: var(--text); }

.bot-year {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- back to top ---------- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff;
  box-shadow: 0 12px 30px rgba(110, 91, 247, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}

.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

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

/* ---------- entrances ---------- */

.anim {
  opacity: 0;
  transform: translateY(16px);
  animation: rise .65s ease var(--d, 0s) forwards;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

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

.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .grid2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 20px 0; }
  .stats li:nth-child(3) { border-left: 0; }
  .ach-grid { grid-template-columns: 1fr; }
  .contact-band { grid-template-columns: 1fr; }
  .cb-cols { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 260px; margin-top: 10px; }
  .hero-copy { text-align: left; }
  .case-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 640px) {
  .topnav { display: none; }
  .brand em { display: none; }
  .btn--sm { white-space: nowrap; }
  .projects { grid-template-columns: 1fr; }
  .bars { grid-template-columns: 1fr; gap: 16px; }
  .stats { grid-template-columns: 1fr; }
  .stats li { border-left: 0 !important; }
  .cb-cols { grid-template-columns: 1fr; }

  .hero-visual { min-height: 340px; }
  .float-card { padding: 10px 13px; gap: 9px; min-width: 172px; }
  .float-card b { font-size: 1.12rem; }
  .float-card small { font-size: 0.7rem; }
  .float-card .chip { width: 32px; height: 32px; border-radius: 9px; }
  .float-card .chip svg { width: 14px; height: 14px; }
  .float-a { top: 2%; left: 0; right: auto; }
  .float-c { top: 40%; right: -4px; left: auto; }
  .float-b { bottom: 2%; left: 0; right: auto; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim { animation: none; opacity: 1; transform: none; }
  .float-a, .float-b, .float-c { animation: none; }
  .bar-fill { transition: none; }
  .reveal.is-in .bar-fill { width: var(--w); }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .to-top, .to-top.show { transition: none; }
  .pcard:hover, .btn--solid:hover, .btn--dark:hover { transform: none; }
}