:root {
  /* The site ships a single dark theme. Declaring it stops browser
     "auto dark mode" from re-inverting an already-dark page (which
     wiped out the gradient-clipped hero title). */
  color-scheme: dark;
  --bg: #09090e;
  --panel: #110f16;
  --panel-2: #16131b;
  --text: #f5f2f7;
  --muted: #9e96a8;
  --accent: #c77aa8;
  --violet: #7d5cba;
  --line: #2e293b;
}

* {
  box-sizing: border-box;
}

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

::selection {
  background: rgba(199, 122, 168, .34);
  color: var(--text);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(199, 122, 168, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(125, 92, 186, 0.12), transparent 25%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  width: min(100%, 1400px);
  margin: 0 auto;
  padding: 22px 22px 72px;
}

.topbar {
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(15, 12, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 16px;
  z-index: 20;
  padding: 0 16px 0 24px;
  animation: topbarDrop .7s ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  transition: color .2s ease, text-shadow .2s ease;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(199, 122, 168, .3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
}

.nav>a {
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  position: relative;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav>a::after {
  display: none;
}

.nav>a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-1px);
}

.availability {
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(199, 122, 168, .12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.availability i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(199, 122, 168, .6);
  animation: availabilityPulse 1.9s ease-in-out infinite;
}

.menu-toggle {
  display: none;
  min-width: 78px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.menu-toggle:hover {
  background: rgba(199, 122, 168, .12);
  border-color: rgba(199, 122, 168, .3);
  transform: translateY(-1px);
}

.section-pad {
  padding: 44px 0 40px;
}

.hero {
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(360px, 1fr);
  gap: 42px;
  align-items: center;
  overflow: hidden;
  padding: 56px 32px 42px;
  background: linear-gradient(180deg, rgba(17, 15, 22, 0.95), rgba(12, 10, 16, 1));
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 28px 28px;
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(255, 255, 255, .07) 48%, transparent 60%),
    radial-gradient(circle at 14% 18%, rgba(199, 122, 168, .16), transparent 24%);
  opacity: .62;
  transform: translateX(-18%);
  animation: heroSheen 8s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

.hero>* {
  position: relative;
  z-index: 1;
}

.hero-copy {
  align-self: center;
  padding-right: 10px;
}

.eyebrow,
.card-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .10em;
  margin: 0;
}

.hero .eyebrow {
  font-size: 13px;
}

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(72px, 7.5vw, 108px);
  line-height: .88;
  letter-spacing: -.04em;
}

.hero-title {
  display: grid;
  width: fit-content;
  overflow: hidden;
}

.hero-title span {
  display: block;
  /* Solid fallback: stays readable if the gradient fill is ever
     stripped (forced dark mode, unsupported background-clip, etc.). */
  color: var(--text);
  background: linear-gradient(100deg, var(--text) 0 38%, #ffd7ec 48%, var(--text) 58% 100%);
  background-size: 240% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 34px rgba(199, 122, 168, .08);
  animation:
    titleSlideUp .85s cubic-bezier(.2, .8, .2, 1) both,
    titleShine 3.8s ease-in-out 1.1s infinite;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title span {
    -webkit-text-fill-color: transparent;
  }
}

@media (forced-colors: active) {
  .hero-title span {
    background: none;
    -webkit-text-fill-color: CanvasText;
    color: CanvasText;
  }
}

.hero-title span:nth-child(2) {
  animation-delay: .16s, 1.32s;
}

.hero-intro {
  width: min(640px, 100%);
  font-size: 22px;
  line-height: 1.35;
  color: var(--muted);
  margin: 0 0 22px;
}

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

.btn {
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .26), transparent 70%);
  transform: translateX(-120%);
  transition: transform .5s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-outline {
  border: 1px solid var(--line);
}

.btn-light {
  background: var(--text);
  color: var(--bg);
  width: fit-content;
}

.hero-skills {
  display: flex;
  gap: 38px;
  margin-top: 42px;
}

.hero-skills div {
  display: grid;
  gap: 5px;
  transform: translateY(0);
  transition: transform .2s ease;
}

.hero-skills div:hover {
  transform: translateY(-4px);
}

.hero-skills strong {
  font-size: 14px;
}

.hero-skills span {
  font-size: 12px;
  color: var(--muted);
}

.hero-photo {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.photo-glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 122, 168, .35), rgba(125, 92, 186, .14) 50%, transparent 72%);
  filter: blur(18px);
  animation: glowBreathe 4s ease-in-out infinite;
}

.photo-frame {
  position: relative;
  width: 100%;
  height: 620px;
  border-radius: 40px;
  overflow: hidden;
  background: linear-gradient(180deg, #281d31, #120f18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
  animation: photoFloat 5.5s ease-in-out infinite;
  transform: translate3d(var(--photo-x, 0), var(--photo-y, 0), 0);
  transition: transform .18s ease-out;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 9, 14, .22), transparent 38%);
  pointer-events: none;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 53% 30%;
  display: block;
  filter: saturate(.88) contrast(1.03);
}

.quick-stats {
  min-height: 120px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  background: rgba(17, 15, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
}

.quick-stats div {
  display: grid;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.01);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.quick-stats div:hover {
  background: rgba(199, 122, 168, .06);
  transform: translateY(-4px);
}

.quick-stats span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}

.quick-stats strong {
  font-size: 16px;
}

.content-section {
  padding-top: 96px;
}

.section-heading {
  padding-bottom: 28px;
  max-width: 1120px;
}

.section-heading h2 {
  margin: 8px 0 10px;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.12;
}

.section-heading>p:last-child {
  max-width: 760px;
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, rgba(17, 15, 22, 0.96), rgba(14, 11, 18, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.panel:hover {
  border-color: rgba(199, 122, 168, .26);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .16);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
}

.panel-large,
.learning-card {
  min-height: 300px;
  padding: 28px;
}

.panel h3 {
  margin: 16px 0;
  font-size: 34px;
  line-height: 1.15;
}

.panel p:not(.card-label) {
  color: var(--muted);
  line-height: 1.55;
}

.arrow-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

.arrow-list li {
  font-size: 16px;
  font-weight: 500;
}

.arrow-list li::before {
  content: "->";
  color: var(--accent);
  margin-right: 10px;
}

.project-workspace {
  display: grid;
  gap: 20px;
}

.project-card {
  padding: 22px;
  border-radius: 18px;
  background: #121018;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.01);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.project-trigger {
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.project-trigger::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 16px;
  height: 1px;
  background: rgba(199, 122, 168, .7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.project-trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--card-x, 50%) var(--card-y, 50%), rgba(199, 122, 168, .14), transparent 30%);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
  z-index: 0;
}

.project-trigger>* {
  position: relative;
  z-index: 1;
}

.project-trigger:hover,
.project-trigger:focus-visible,
.project-trigger.is-active {
  border-color: rgba(199, 122, 168, .5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
  transform: translateY(-2px);
  outline: none;
}

.project-trigger:hover::before,
.project-trigger:focus-visible::before {
  opacity: 1;
}

.project-trigger.is-active::after {
  transform: scaleX(1);
}

.project-card h3 {
  font-size: 26px;
  margin: 12px 0 10px;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.project-card .project-link {
  display: inline-flex;
  margin-top: auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
}

.project-detail {
  display: none;
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #121018;
  grid-column: 1 / -1;
  transform: translateY(10px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease, border-color .25s ease;
  overflow: hidden;
}

.project-detail.is-open {
  display: block;
  border-color: rgba(199, 122, 168, .45);
  opacity: 1;
  transform: none;
}

.project-detail.is-changing {
  animation: projectPop .3s ease;
}

.project-detail h3 {
  margin: 12px 0 8px;
  font-size: 26px;
}

.project-detail p:not(.card-label) {
  color: var(--muted);
  line-height: 1.55;
  max-width: 820px;
}

.detail-stack {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: .04em;
}

.detail-link {
  color: var(--accent);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-top: 18px;
}

@keyframes projectPop {
  0% {
    opacity: .35;
    transform: translateY(12px);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

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

.project-card {
  min-height: 370px;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: rgba(199, 122, 168, 0.35);
  transform: translateY(-2px);
}

.project-thumb {
  height: 170px;
  border-radius: 14px;
  background: linear-gradient(135deg, #17131d, #3b2d48 52%, #17131d);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.project-thumb::before,
.project-thumb::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  transition: transform .35s ease, opacity .35s ease;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.project-thumb::before {
  width: 90px;
  height: 90px;
  background: rgba(199, 122, 168, 0.18);
  top: 16px;
  right: 18px;
}

.project-thumb::after {
  width: 130px;
  height: 130px;
  background: rgba(125, 92, 186, 0.15);
  bottom: -26px;
  left: -12px;
}

.project-card:hover .project-thumb::before {
  transform: translate(-12px, 10px) scale(1.14);
}

.project-card:hover .project-thumb::after {
  transform: translate(16px, -10px) scale(1.08);
}

.project-card p:not(.card-label) {
  font-size: 15px;
  margin: 0;
}

.skills-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skill-card {
  min-height: 340px;
  padding: 26px 24px;
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

.skill-card li {
  font-size: 16px;
  font-weight: 500;
}

.skill-card li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--violet);
  margin-right: 10px;
  transition: transform .2s ease, background .2s ease;
}

.skill-card li:first-child::before {
  background: var(--accent);
}

.skill-card li:hover::before {
  transform: rotate(45deg) scale(1.18);
  background: var(--accent);
}

.process-card {
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.process-card:hover {
  background: rgba(199, 122, 168, .05);
  border-color: rgba(199, 122, 168, .34);
  transform: translateY(-5px);
}

.process-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.process-card h3 {
  margin: 14px 0 10px;
  font-size: 19px;
}

.process-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.contact-box {
  min-height: 360px;
  border-radius: 28px;
  padding: 34px;
  background: linear-gradient(90deg, #291a30, #613357);
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 28px;
}

.contact-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-main h3 {
  margin: 14px 0 10px;
  font-size: 42px;
}

.contact-main>p:not(.card-label) {
  color: var(--muted);
  margin: 0 0 26px;
}

.connect-panel {
  background: rgba(9, 9, 14, .6);
  border-radius: 22px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.connect-panel a {
  font-size: 18px;
  font-weight: 600;
  transition: color .2s ease, transform .2s ease;
}

.connect-panel a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

.footer {
  min-height: 96px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}

.reveal {
  opacity: 0;
  translate: 0 20px;
  transition: opacity .65s ease, translate .65s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  translate: none;
}

@keyframes topbarDrop {
  0% {
    opacity: 0;
    transform: translateY(-14px);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes availabilityPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(199, 122, 168, .6);
  }

  50% {
    transform: scale(1.35);
    box-shadow: 0 0 28px rgba(199, 122, 168, .9);
  }
}

@keyframes heroSheen {
  0% {
    transform: translateX(-18%);
  }

  100% {
    transform: translateX(16%);
  }
}

@keyframes titleSlideUp {
  0% {
    opacity: 0;
    transform: translateY(110%) scale(.98);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes titleShine {
  0%,
  42% {
    background-position: 120% 0;
  }

  72%,
  100% {
    background-position: -120% 0;
  }
}

@keyframes glowBreathe {
  0%,
  100% {
    opacity: .72;
    transform: scale(.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes photoFloat {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -12px;
  }
}

@media (max-width: 1100px) {
  .site-shell {
    padding-inline: 40px;
  }

  .hero {
    grid-template-columns: 1.2fr .8fr;
    gap: 28px;
    min-height: 650px;
  }

  .hero-photo,
  .photo-frame {
    height: 460px;
  }

  .hero h1 {
    font-size: clamp(64px, 8vw, 88px);
  }

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

@media (max-width: 820px) {
  .site-shell {
    padding: 24px 22px 40px;
  }

  .topbar {
    min-height: 62px;
    top: 12px;
    padding: 0 10px 0 18px;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(9, 9, 14, .96);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .26);
    display: none;
    flex-direction: column;
    align-items: stretch;
    z-index: 50;
  }

  .nav.is-open {
    display: flex;
    animation: mobileMenuIn .22s ease both;
  }

  .nav>a,
  .availability {
    width: 100%;
    justify-content: flex-start;
  }

  .availability {
    margin-left: 0;
  }

  .hero {
    grid-template-columns: 1fr minmax(200px, 0.7fr);
    min-height: auto;
    gap: 24px;
    padding: 48px 20px 36px;
  }

  .hero h1 {
    font-size: clamp(40px, 9vw, 64px);
  }

  .hero-intro {
    font-size: 18px;
  }

  .hero-skills {
    gap: 20px;
    flex-wrap: wrap;
  }

  .hero-photo {
    max-width: 320px;
    margin-left: auto;
  }

  .hero-photo,
  .photo-frame {
    height: min(420px, 46vw);
  }

  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px 0;
    gap: 24px;
  }

  .about-grid,
  .project-grid,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .panel-large,
  .learning-card {
    min-height: unset;
  }

  .skills-grid,
  .process-grid {
    grid-template-columns: 1fr 1fr;
  }

  .skill-card,
  .process-card {
    min-height: 230px;
  }

  .contact-main h3 {
    font-size: 34px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-top: 28px;
  }
}

@media (max-width: 520px) {
  .site-shell {
    padding-inline: 16px;
  }

  .brand {
    font-size: 15px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(52px, 16vw, 72px);
  }

  .hero-photo {
    max-width: 300px;
    margin-inline: auto;
  }

  .hero-photo,
  .photo-frame {
    height: min(360px, 80vw);
  }

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

  .quick-stats,
  .skills-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .project-card {
    min-height: unset;
  }

  .contact-box {
    padding: 24px;
  }

  .contact-main h3 {
    font-size: 30px;
  }
}

@keyframes mobileMenuIn {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

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

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

  .hero-copy > *,
  .hero-photo,
  .hero-title span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-photo {
    translate: none !important;
  }

  .section-heading h2 {
    clip-path: none !important;
    opacity: 1 !important;
  }

  .skill-card li,
  .learning-card .arrow-list li {
    animation: none !important;
    opacity: 1 !important;
    translate: none !important;
  }

  .project-trigger {
    transform: none !important;
  }

  .scroll-progress {
    display: none;
  }
}

/* ============================================================
   Enhancements: page-load choreography, scroll UI,
   active nav, richer interactions
   ============================================================ */

/* --- Scroll progress bar --- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  box-shadow: 0 0 18px rgba(199, 122, 168, .5);
  z-index: 100;
  transition: transform .12s linear;
}

/* --- Back to top --- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(15, 12, 18, .82);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s ease, border-color .2s ease;
  z-index: 90;
}

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

.to-top:hover {
  background: rgba(199, 122, 168, .18);
  border-color: rgba(199, 122, 168, .45);
  transform: translateY(-3px);
}

.to-top:active {
  transform: translateY(0) scale(.92);
}

/* --- Active navigation --- */
.nav > a.is-active {
  color: var(--text);
  background: rgba(199, 122, 168, .14);
}

.nav > a.is-active::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left center;
  animation: navMark .3s ease both;
}

@keyframes navMark {
  0% { transform: scaleX(0); opacity: 0; }
  100% { transform: scaleX(1); opacity: 1; }
}

/* --- Button micro-interactions --- */
.btn:active {
  transform: translateY(0) scale(.97);
}

.btn-primary:hover {
  box-shadow: 0 16px 36px rgba(199, 122, 168, .38);
}

.btn-light:hover {
  box-shadow: 0 16px 36px rgba(245, 242, 247, .22);
}

/* --- Hero staggered page-load --- */
.hero-copy > *:not(.hero-title) {
  animation: heroRise .8s cubic-bezier(.2, .8, .2, 1) both;
}

.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(3) { animation-delay: .18s; }
.hero-copy > :nth-child(4) { animation-delay: .27s; }
.hero-copy > :nth-child(5) { animation-delay: .36s; }

.hero-photo {
  animation: heroRise 1s cubic-bezier(.2, .8, .2, 1) .28s both;
  /* scroll parallax rides on the individual `translate` property
     so it never fights the entrance `transform` */
  translate: 0 calc(var(--scroll-y, 0) * 0.022px);
}

@keyframes heroRise {
  0% { opacity: 0; transform: translateY(26px); }
  100% { opacity: 1; transform: none; }
}

/* --- Section heading text reveal --- */
.section-heading h2 {
  clip-path: inset(0 0 108% 0);
  opacity: 0;
  transition: clip-path .85s cubic-bezier(.2, .8, .2, 1) .08s, opacity .6s ease .08s;
}

.section-heading.is-visible h2 {
  clip-path: inset(0 0 -20% 0);
  opacity: 1;
}

/* --- Animated skill / list elements --- */
.skill-card li,
.learning-card .arrow-list li {
  opacity: 0;
  transition: transform .2s ease, color .2s ease;
}

.skill-card.is-visible li,
.learning-card.is-visible .arrow-list li {
  animation: listRise .5s ease both;
}

.skill-card.is-visible li:nth-child(1),
.learning-card.is-visible .arrow-list li:nth-child(1) { animation-delay: .06s; }
.skill-card.is-visible li:nth-child(2),
.learning-card.is-visible .arrow-list li:nth-child(2) { animation-delay: .14s; }
.skill-card.is-visible li:nth-child(3),
.learning-card.is-visible .arrow-list li:nth-child(3) { animation-delay: .22s; }
.skill-card.is-visible li:nth-child(4),
.learning-card.is-visible .arrow-list li:nth-child(4) { animation-delay: .30s; }

.skill-card.is-visible li:hover,
.learning-card.is-visible .arrow-list li:hover {
  transform: translateX(5px);
  color: var(--text);
}

@keyframes listRise {
  0% { opacity: 0; translate: -12px 0; }
  100% { opacity: 1; translate: 0 0; }
}

/* --- Interactive project cards: pointer-tracked 3D tilt --- */
.project-trigger {
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

/* One combined transition: the entrance fade/slide (opacity + the
   individual `translate` property, each carrying the stagger delay)
   plus the snappy hover transitions. The final visible state is the
   plain `.reveal.is-visible` rule, so a card can never get stuck hidden. */
.project-trigger.reveal {
  transition:
    opacity .6s ease var(--reveal-delay, 0ms),
    translate .6s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms),
    border-color .2s ease,
    transform .18s ease,
    box-shadow .2s ease;
}

.project-card:hover,
.project-trigger:hover,
.project-trigger:focus-visible,
.project-trigger.is-active {
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
}

/* --- Mobile: drop the weightier motion --- */
@media (max-width: 820px) {
  .hero-photo {
    translate: none !important;
  }

  .project-trigger {
    transform: none;
  }

  .project-card:hover,
  .project-trigger:hover,
  .project-trigger:focus-visible,
  .project-trigger.is-active {
    transform: translateY(-2px);
  }
}
