:root {
  --ink: #171020;
  --paper: #f5f1f8;
  --line: rgba(64, 34, 87, 0.23);
  --accent-violet: #a477ff;
  --accent-lilac: #d6b9ff;
  --accent-pink: #ef83c7;
  --accent-deep: #1a0d2c;
}

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

.video-fallback {
  z-index: 0;
  background:
    radial-gradient(circle at 16% 21%, #9b38df 0, transparent 28%),
    radial-gradient(circle at 76% 66%, #de63bd 0, transparent 31%),
    radial-gradient(circle at 58% 24%, #3920a5 0, transparent 36%),
    #080510;
}

/* Keep the violet liquid field visible while the HLS film buffers, then reveal it. */
.hero-video { z-index: 1; opacity: 0; transition: opacity .8s ease; }
.hero-video.is-playing { opacity: 1; }

.hero-content { flex-direction: column; }

.hero-kicker {
  margin: 0 0 22px;
  color: rgba(255,255,255,.7);
  font: 500 10px var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero-content h1 { margin-bottom: 26px; }

.hero-statement {
  margin: 0;
  max-width: 540px;
  color: rgba(255,255,255,.72);
  font: 300 clamp(15px,1.45vw,19px)/1.42 var(--body);
}

.hero-disciplines {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 42px;
}

.hero-disciplines span {
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(90,50,142,.13);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,.82);
  font: 400 10px var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.profile-main h1 em, .degree-mark { color: #7040a5; }
.portrait-frame {
  background: linear-gradient(145deg, #e6d9f2, #9c76c4);
  padding: 10px;
  overflow: hidden;
}
.portrait-frame img {
  object-position: 50% 12%;
  transform: scale(1.13);
}
.portrait-column i { background: var(--accent-violet); box-shadow: 0 0 12px var(--accent-violet); }
.contact-link { border-color: #7040a5; color: #49216f; }

.experience-section { background: #130d1c; }
.timeline article > b { color: var(--accent-lilac); }

.capabilities {
  background:
    radial-gradient(circle at 13% 8%, rgba(142,64,216,.23), transparent 32%),
    radial-gradient(circle at 90% 90%, rgba(220,97,182,.17), transparent 35%),
    #120b20;
}

.gradient-bars { opacity: .55; }
.gradient-bars i {
  background: linear-gradient(to bottom,
    #110a1b 4%, #43208d 27%, #9654d9 48%, #d578c3 70%, #221131 96%);
  background-size: 100% 240%;
}

.skill-cloud { border-color: rgba(229,208,255,.7); }
.skill-cloud span {
  border-color: rgba(229,208,255,.62);
  background: rgba(35,17,59,.32);
}
.skill-cloud span:nth-child(3n+1) { background: rgba(108,59,165,.32); }
.skill-cloud span:nth-child(3n+2) { background: rgba(125,74,191,.26); }
.skill-cloud span:nth-child(3n) { background: rgba(187,92,170,.24); }
.skill-cloud span:nth-child(3n+1):hover { background: #b68aff; color: #140c1c; }
.skill-cloud span:nth-child(3n+2):hover { background: #8d58d4; color: #fff; }
.skill-cloud span:nth-child(3n):hover { background: #e58bc9; color: #241025; }

.skill-cloud .skill-tool {
  appearance: none;
  border: 1px solid rgba(229,208,255,.72);
  margin: -1px 0 0 -1px;
  padding: 17px 22px;
  color: inherit;
  background: rgba(92,48,143,.5);
  font: inherit;
  font-size: clamp(25px,4.15vw,60px);
  letter-spacing: -.06em;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.skill-cloud .skill-tool:hover,
.skill-cloud .skill-tool:focus-visible { background: #d78aca; color: #241025; outline: none; }
.skill-cloud .skill-tool:focus-visible { box-shadow: inset 0 0 0 3px #fff; }

.capability-gallery {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 42px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.capability-gallery.is-open { opacity: 1; pointer-events: auto; }
.capability-gallery-backdrop {
  position: absolute;
  inset: 0;
  appearance: none;
  border: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(118,66,156,.32), transparent 42%),
    linear-gradient(145deg, #411b61, #1e0b32);
  cursor: default;
}
.capability-gallery-panel {
  position: relative;
  width: min(960px, 100%);
  padding: 0;
  transform: translateY(18px) scale(.985);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.gallery-close, .figma-gallery-close {
  appearance: none;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(24,9,39,.78);
  color: #fff;
  font: 600 10px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.gallery-close { position: absolute; z-index: 8; top: 13px; right: 13px; }
.figma-gallery-close { position: absolute; z-index: 8; top: clamp(16px, 3vw, 32px); right: clamp(16px, 3vw, 32px); }
.gallery-close:hover, .gallery-close:focus-visible, .figma-gallery-close:hover, .figma-gallery-close:focus-visible { background: #fff; color: #241130; outline: none; transform: translateY(-1px); }
.capability-gallery.is-open .capability-gallery-panel { transform: translateY(0) scale(1); }
.capability-gallery-header { display: flex; justify-content: space-between; align-items: start; gap: 22px; }
.capability-gallery-header h2 { margin: 14px 0 0; font-size: clamp(33px, 5.2vw, 64px); font-weight: 500; letter-spacing: -.065em; line-height: .92; }
.capability-gallery-close {
  appearance: none;
  border: 1px solid rgba(236,218,255,.58);
  padding: 10px 13px;
  background: transparent;
  color: inherit;
  font: 500 10px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.capability-gallery-close:hover, .capability-gallery-close:focus-visible { background: #f6eaf5; color: #21102d; outline: none; }
.capability-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 38px; }
.capability-tabs button {
  appearance: none;
  border: 1px solid rgba(236,218,255,.43);
  padding: 9px 12px;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.03);
  font: 500 10px var(--mono);
  letter-spacing: .045em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.capability-tabs button[aria-selected="true"], .capability-tabs button:hover, .capability-tabs button:focus-visible { background: #e191c6; color: #221028; outline: none; }
.capability-gallery-note { margin: 17px 0 0; color: rgba(246,236,255,.7); font: 400 11px var(--mono); letter-spacing: .04em; }
.skewed-carousel { position: relative; height: clamp(265px, 42vw, 440px); overflow: hidden; outline: none; touch-action: pan-y; user-select: none; cursor: grab; }
.capability-gallery.is-portrait .skewed-carousel { height: min(72svh, 680px); }
.skewed-carousel:active { cursor: grabbing; }
.skewed-carousel:focus-visible { box-shadow: inset 0 0 0 1px #fff; }
.skewed-carousel-stage { position: relative; width: 100%; height: 100%; perspective: 1100px; transform-style: preserve-3d; }
.skewed-carousel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--carousel-card-width, 430px);
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.5);
  background: #180d23;
  box-shadow: 0 22px 48px rgba(0,0,0,.34);
  transform-style: preserve-3d;
  transition: transform .56s cubic-bezier(.22,.68,0,1.12), opacity .4s ease, filter .4s ease;
}
.skewed-carousel-card.is-active { cursor: default; }
.skewed-carousel-card:not(.is-active) { cursor: pointer; }
.skewed-carousel-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.skewed-carousel-card figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: 38px 18px 16px; background: linear-gradient(transparent, rgba(12,5,19,.9)); color: #fff; font: 500 12px var(--mono); letter-spacing: .04em; opacity: 0; transform: translateY(8px); transition: opacity .3s ease .1s, transform .3s ease .1s; }
.skewed-carousel-card.is-active figcaption { opacity: 1; transform: translateY(0); }
.skewed-carousel-footer { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 14px; margin-top: 8px; }
.carousel-arrow { appearance: none; width: 40px; height: 40px; border: 1px solid rgba(236,218,255,.62); background: transparent; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s ease, color .2s ease, opacity .2s ease; }
.carousel-arrow:hover:not(:disabled), .carousel-arrow:focus-visible { background: #f6eaf5; color: #21102d; outline: none; }
.carousel-arrow:disabled { opacity: .25; cursor: not-allowed; }
.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.carousel-dot { appearance: none; width: 9px; height: 9px; padding: 0; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: transparent; cursor: pointer; transition: width .2s ease, background .2s ease; }
.carousel-dot[aria-current="true"] { width: 27px; border-radius: 999px; background: #f3b6dc; }

.figma-tiles-gallery {
  position: fixed;
  inset: 0;
  z-index: 61;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.figma-tiles-gallery.is-open { opacity: 1; pointer-events: auto; }
.figma-tiles-backdrop {
  position: absolute;
  inset: 0;
  appearance: none;
  border: 0;
  background: radial-gradient(circle at 50% 40%, #6e5491 0, #29133d 51%, #110919 100%);
  cursor: default;
}
.figma-tiles-stage {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  perspective: 1600px;
  outline: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 84%, transparent 100%);
}
.figma-tiles-stage:focus-visible { box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.figma-tiles-plane {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: 112%;
  height: 230%;
  transform: translate(-50%, -50%) rotateX(calc(38deg + var(--lean-x, 0deg))) rotateY(calc(-14deg + var(--lean-y, 0deg))) rotateZ(-18deg);
  transform-style: preserve-3d;
  transition: transform .35s ease-out;
  will-change: transform;
}
.figma-tiles-strip { padding-top: var(--drift-offset); overflow: hidden; }
.figma-tiles-strip > * { transform: translateZ(0); }
.figma-tiles-strip { animation: figma-tiles-rise var(--drift-duration) linear infinite; animation-delay: var(--drift-delay); }
.figma-tiles-strip.is-reverse { animation-name: figma-tiles-fall; }
.figma-tile {
  width: 100%;
  aspect-ratio: 9 / 16;
  margin-bottom: 9px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(248,247,250,.9);
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
}
.figma-tile img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
@keyframes figma-tiles-rise { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes figma-tiles-fall { from { transform: translateY(-50%); } to { transform: translateY(0); } }

@media (max-width:720px) {
  .skill-cloud .skill-tool { padding: 13px 14px; font-size: 30px; }
  .capability-gallery { padding: 9px; }
  .capability-gallery-panel { min-height: 0; padding: 0; }
  .capability-gallery-header h2 { font-size: 42px; }
  .capability-gallery-close { padding: 9px 8px; }
  .capability-tabs { margin-top: 28px; gap: 6px; }
  .capability-tabs button { padding: 8px 9px; font-size: 9px; }
  .skewed-carousel { height: min(61vw, 330px); min-height: 220px; }
  .capability-gallery.is-portrait .skewed-carousel { height: min(68svh, 620px); min-height: 430px; }
  .skewed-carousel-footer { gap: 8px; }
  .figma-tiles-stage { width: 100vw; height: 100svh; }
  .figma-tiles-plane { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 156%; height: 218%; transform: translate(-50%, -50%) rotateX(calc(34deg + var(--lean-x, 0deg))) rotateY(calc(-10deg + var(--lean-y, 0deg))) rotateZ(-14deg); }
  .figma-tile { margin-bottom: 8px; border-radius: 2px; }
}

.project.active { background: #2b1245; }
.project:hover:not(.active) { color: #613a86; }
.contact { background: radial-gradient(circle at 75% 17%, #3d2073 0, transparent 34%), #0d0715; }

@media (max-width:720px) {
  .portrait-frame {
    width: min(58vw, 232px);
    max-width: none;
    padding: 8px;
  }
  .portrait-frame img {
    object-position: 50% 10%;
    transform: scale(1.16);
  }
  .hero-kicker { margin-bottom: 18px; }
  .hero-content h1 { margin-bottom: 21px; }
  .hero-statement { font-size: 15px; }
  .hero-disciplines { margin-top: 30px; }
  .hero-disciplines span { padding: 8px 10px; font-size: 9px; }
}
