:root {
  --p: #9b5bb7;
  --p-soft: #c47ad8;
  --p-hot: #f06bc8;
  --s: #7a5cff;
  --a: #d76dd8;
  --ok: #22c55e;
  --bg1: #0d0a10;
  --bg2: #17111c;
  --bg3: #251b2c;
  --t: #fcf9f6;
  --td: #d6cec6;
  --tdd: #a89e94;
  --b: #3b3042;
  --glass: rgba(23, 17, 28, .72);
  --glass-2: rgba(255, 255, 255, .035);
  --shadow: 0 24px 90px rgba(0, 0, 0, .45);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  color: var(--t);
  font-family: "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    radial-gradient(circle at 16% 20%, rgba(155, 91, 183, .13), transparent 29%),
    radial-gradient(circle at 83% 18%, rgba(240, 107, 200, .12), transparent 32%),
    radial-gradient(circle at 62% 86%, rgba(122, 92, 255, .10), transparent 35%),
    linear-gradient(135deg, var(--bg1), #09070b 56%, #130c18);
  background-size: 84px 84px, 84px 84px, auto, auto, auto, auto;
  letter-spacing: 0;
}


body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .05) 48%, rgba(0, 0, 0, .44)),
    linear-gradient(180deg, rgba(0, 0, 0, .48), rgba(0, 0, 0, .05) 48%, rgba(0, 0, 0, .64)),
    url("../img/bgblackhole.jpg");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  opacity: .34;
  filter: brightness(.82) contrast(1.05) saturate(.76);
}

body::after {
  content: "";
  position: fixed;
  inset: auto -12% -34% -12%;
  z-index: 0;
  height: 54vh;
  pointer-events: none;
  background: radial-gradient(circle, rgba(155, 91, 183, .18), transparent 66%);
  filter: blur(24px);
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

body.cursor-enabled,
body.cursor-enabled a,
body.cursor-enabled button,
body.cursor-enabled input,
body.cursor-enabled textarea,
body.cursor-enabled select,
body.cursor-enabled [role="button"] {
  cursor: none;
}

.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  transition: opacity .16s ease, width .18s ease, height .18s ease, border-color .18s ease, background .18s ease;
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(155, 91, 183, .76);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(155, 91, 183, .18);
}

.cursor-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--p-soft);
  box-shadow: 0 0 16px rgba(240, 107, 200, .46);
}

body.cursor-visible .cursor-ring,
body.cursor-visible .cursor-dot {
  opacity: 1;
}

body.cursor-active .cursor-ring {
  width: 50px;
  height: 50px;
  border-color: rgba(240, 107, 200, .78);
}

body.cursor-pressed .cursor-ring {
  width: 30px;
  height: 30px;
  background: rgba(155, 91, 183, .10);
}

#space-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 1;
  pointer-events: none;
}

.site-frame {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.portfolio-nav {
  border-bottom: 1px solid rgba(62, 54, 48, .86);
  background: rgba(14, 12, 11, .72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.navbar-brand {
  color: var(--t);
  font-weight: 800;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--t);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(155, 91, 183, .38);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
}

.brand-accent {
  color: var(--p);
}

.nav-link {
  color: var(--td);
  font-size: .92rem;
  font-weight: 700;
}

.portfolio-nav .nav-link:hover,
.portfolio-nav .nav-link:focus,
.portfolio-nav .nav-link.active,
.portfolio-nav .navbar-nav .nav-link.active {
  color: var(--p);
}

.navbar-toggler {
  border-color: rgba(155, 91, 183, .38);
  color: var(--t);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 .2rem rgba(155, 91, 183, .18);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.page-main {
  flex: 1;
  padding: calc(112px + env(safe-area-inset-top)) 0 calc(72px + env(safe-area-inset-bottom));
}

.page-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--p);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.page-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 18px rgba(34, 197, 94, .72);
}

.display-title {
  max-width: 950px;
  margin: 0;
  color: var(--t);
  font-size: clamp(3.2rem, 8vw, 7.1rem);
  font-weight: 800;
  line-height: .94;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.name-title {
  display: grid;
  gap: .02em;
}

.name-title > span {
  display: block;
}

.hero-role {
  color: var(--td);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 800;
}

.grad {
  background: linear-gradient(90deg, var(--p-soft), var(--s), var(--a));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.interactive-gradient {
  --gx: 50%;
  --gy: 50%;
  background:
    radial-gradient(circle at var(--gx) var(--gy), rgba(255, 228, 91, .95) 0 10%, rgba(183, 108, 255, .70) 28%, rgba(35, 17, 41, .30) 68%),
    linear-gradient(112deg, #8b5cf6 0%, #facc15 46%, #24102c 96%);
  background-size: 180% 180%, 220% 220%;
  background-position: 50% 50%, 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: saturate(1.08);
  transition: filter .18s ease, transform .18s ease;
  animation: gradientDrift 8s ease-in-out infinite alternate;
}

.interactive-gradient:hover {
  filter: saturate(1.35) brightness(1.06);
}

@keyframes gradientDrift {
  0% {
    background-position: 50% 50%, 0% 50%;
  }
  50% {
    background-position: 50% 50%, 72% 44%;
  }
  100% {
    background-position: 50% 50%, 100% 58%;
  }
}

.lead-copy {
  max-width: 690px;
  color: var(--td);
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  line-height: 1.82;
}

.btn,
.project-cta,
.social-link,
button,
input,
select,
textarea {
  min-height: 44px;
}

.btn,
.project-cta,
.chip,
.profile-pill {
  max-width: 100%;
}

.btn-primary {
  --bs-btn-bg: var(--p);
  --bs-btn-border-color: var(--p);
  --bs-btn-color: #100a14;
  --bs-btn-hover-bg: #b768cf;
  --bs-btn-hover-border-color: #b768cf;
  --bs-btn-hover-color: #100a14;
  --bs-btn-active-bg: #82469e;
  --bs-btn-active-border-color: #82469e;
  font-weight: 800;
}

.btn-outline-light {
  --bs-btn-border-color: rgba(252, 249, 246, .22);
  --bs-btn-color: var(--td);
  --bs-btn-hover-bg: rgba(252, 249, 246, .08);
  --bs-btn-hover-border-color: rgba(147, 112, 219, .58);
  --bs-btn-hover-color: var(--t);
  font-weight: 800;
}

.glass-card,
.project-card,
.skill-card,
.timeline-item,
.contact-panel {
  border: 1px solid rgba(62, 54, 48, .86);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .018)),
    rgba(14, 12, 11, .54);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .18);
}

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  padding: 16px 14px 38px;
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6% -8% 2%;
  z-index: -1;
  background:
    radial-gradient(circle at 28% 72%, rgba(155, 91, 183, .36), transparent 48%),
    radial-gradient(circle at 75% 22%, rgba(240, 107, 200, .16), transparent 34%);
  filter: blur(18px);
}

.portrait-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(155, 91, 183, .34);
  border-radius: 8px;
  background: rgba(13, 10, 16, .48);
  box-shadow: var(--shadow);
}

.profile-card {
  width: min(390px, 82vw);
  max-width: 100%;
  aspect-ratio: 1.16 / 1;
  border-radius: 8px;
  overflow: visible;
  transform: rotate(0) scale(1);
  transform-origin: center;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
  will-change: transform;
}

.hero-visual:hover .profile-card {
  transform: translateY(-3px) rotate(1.4deg) scale(1.026);
  border-color: rgba(240, 107, 200, .46);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .58), 0 0 44px rgba(155, 91, 183, .22);
}

.portrait-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(155, 91, 183, .24), transparent 58%);
  filter: blur(28px);
  z-index: 1;
  pointer-events: none;
}

.portrait-card img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 1.16 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.floating-note {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 92%;
  padding: 10px 14px;
  border: 1px solid rgba(155, 91, 183, .42);
  border-radius: 7px;
  color: var(--td);
  background: rgba(13, 10, 16, .86);
  backdrop-filter: blur(12px);
  font-size: .78rem;
}

.profile-pill {
  position: absolute;
  left: 50%;
  bottom: -16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 42px);
  padding: 10px 18px;
  border: 1px solid rgba(155, 91, 183, .44);
  border-radius: 7px;
  color: var(--td);
  background: rgba(17, 13, 18, .92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .36);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(.74rem, 1.6vw, .95rem);
  font-weight: 800;
}

.profile-pill span {
  color: var(--p-soft);
}

.profile-pill b::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 7px 2px 1px;
  border-radius: 999px;
  background: var(--td);
}

.profile-pill b {
  color: var(--td);
  font: inherit;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-metrics {
  max-width: 736px;
}

.metric {
  padding: 18px;
}

.metric b {
  display: block;
  color: var(--p);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--tdd);
  font-size: .86rem;
}

.section-title {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
}

.section-copy {
  max-width: 720px;
  color: var(--td);
  line-height: 1.82;
}

.skill-card {
  height: 100%;
  padding: 22px;
}

.skill-card h2,
.project-card h2,
.timeline-item h2,
.contact-panel h2 {
  color: var(--t);
  font-size: 1.28rem;
  font-weight: 800;
}

.skill-card p,
.project-card p,
.timeline-item p,
.contact-panel p {
  color: var(--td);
  line-height: 1.75;
  overflow-wrap: break-word;
}

blockquote {
  margin: 0;
  padding-left: 18px;
  border-left: 3px solid var(--p);
  color: var(--t);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.55;
}

.progress {
  height: 9px;
  border-radius: 3px;
  background: rgba(252, 249, 246, .08);
}

.progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--p), var(--s));
}

.project-card {
  height: 100%;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(155, 91, 183, .48);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid rgba(62, 54, 48, .86);
  background: var(--bg2);
}

.project-body {
  padding: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  margin: 0 7px 7px 0;
  padding: 6px 10px;
  border: 1px solid rgba(147, 112, 219, .28);
  border-radius: 5px;
  color: var(--tdd);
  background: rgba(147, 112, 219, .08);
  font-size: .76rem;
  font-weight: 700;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  padding: 22px;
}

.timeline-date {
  color: var(--p);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
  font-weight: 700;
}

.contact-panel {
  padding: clamp(22px, 4vw, 42px);
}

.project-access-panel {
  position: relative;
  overflow: hidden;
}

.project-access-panel::before {
  content: "";
  position: absolute;
  inset: -42% -18% auto auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 107, 200, .18), transparent 65%);
  pointer-events: none;
}

.project-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.project-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  border-radius: 7px;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.project-cta:hover,
.project-cta:focus {
  transform: translateY(-2px);
}

.project-cta-primary {
  min-width: 266px;
  gap: 22px;
  padding: 8px 10px 8px 30px;
  color: var(--t);
  background: linear-gradient(135deg, #b15cff, #9b5bb7 72%, #8b47bd);
  box-shadow: 0 18px 42px rgba(155, 91, 183, .22);
}

.project-cta-primary:hover,
.project-cta-primary:focus {
  color: var(--t);
  box-shadow: 0 22px 52px rgba(155, 91, 183, .30);
}

.project-cta-primary i {
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 5px;
  color: #c47ad8;
  background: #160d1f;
  font-style: normal;
  font-size: 1.55rem;
  line-height: 1;
  transform: translateY(-1px);
}

.project-cta-outline {
  min-width: 212px;
  gap: 12px;
  padding: 0 26px;
  border: 1px solid rgba(252, 249, 246, .12);
  color: var(--td);
  background: rgba(13, 10, 16, .22);
}

.project-cta-outline:hover,
.project-cta-outline:focus {
  border-color: rgba(155, 91, 183, .46);
  color: var(--t);
  background: rgba(252, 249, 246, .045);
}

.wa-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid #c47ad8;
  border-radius: 50%;
}

.wa-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -4px;
  width: 7px;
  height: 7px;
  border-left: 2px solid #c47ad8;
  border-bottom: 2px solid #c47ad8;
  transform: rotate(-22deg);
}

.mini-timeline {
  gap: 12px;
}

.mini-timeline .timeline-item {
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 16px;
}

.mini-timeline .timeline-item h2 {
  font-size: 1rem;
}

.mini-timeline .timeline-item p {
  margin-bottom: 0;
  font-size: .9rem;
}

.form-control,
.form-select {
  width: 100%;
  min-width: 0;
  border-color: rgba(62, 54, 48, .95);
  border-radius: var(--radius);
  color: var(--t);
  background: rgba(14, 12, 11, .54);
}

.form-control::placeholder {
  color: rgba(214, 206, 198, .56);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(155, 91, 183, .68);
  color: var(--t);
  background: rgba(13, 10, 16, .68);
  box-shadow: 0 0 0 .22rem rgba(155, 91, 183, .15);
}

.form-label {
  color: var(--td);
  font-weight: 800;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(62, 54, 48, .95);
  border-radius: var(--radius);
  color: var(--td);
  background: rgba(252, 249, 246, .035);
  font-weight: 800;
}

.social-link:hover {
  color: var(--p);
  border-color: rgba(155, 91, 183, .46);
}

/* Cartoon bar language, adapted to the existing dark-purple palette. */
.portfolio-nav .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .48rem .82rem !important;
  border: 2px solid transparent;
  border-radius: 6px;
  background: transparent;
  box-shadow: 0 0 0 #070508;
  transform: translate(0, 0);
  transition: color .14s ease, background-color .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.portfolio-nav .nav-link:hover,
.portfolio-nav .nav-link:focus-visible {
  color: var(--t);
  border-color: rgba(196, 122, 216, .58);
  background: #211724;
  box-shadow: 3px 3px 0 #070508;
  transform: translate(-1px, -1px);
}

.portfolio-nav .nav-link.active,
.portfolio-nav .navbar-nav .nav-link.active {
  color: #160d1f;
  border-color: #e2a1f0;
  background: #b966cf;
  box-shadow: 4px 4px 0 #070508;
}

.portfolio-nav .nav-link:active {
  box-shadow: 1px 1px 0 #070508;
  transform: translate(3px, 3px);
}

.navbar-toggler,
.page-main .btn,
.project-cta,
.social-link {
  border-width: 2px;
  border-style: solid;
  border-radius: 7px !important;
  box-shadow: 4px 4px 0 #070508;
  transform: translate(0, 0);
  transition: color .14s ease, background-color .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.navbar-toggler:hover,
.page-main .btn:hover,
.project-cta:hover,
.project-cta:focus-visible,
.social-link:hover,
.social-link:focus-visible {
  box-shadow: 5px 5px 0 #070508;
  transform: translate(-1px, -1px);
}

.navbar-toggler:active,
.page-main .btn:active,
.project-cta:active,
.social-link:active {
  box-shadow: 1px 1px 0 #070508;
  transform: translate(3px, 3px);
}

.navbar-toggler {
  border-color: rgba(196, 122, 216, .62);
  background: #211724;
}

.page-main .btn-primary {
  border-color: #e2a1f0;
}

.page-main .btn-outline-light {
  border-color: rgba(196, 122, 216, .56);
  background: #17111c;
}

.profile-pill,
.floating-note {
  border-width: 2px;
  border-radius: 7px;
  border-color: rgba(196, 122, 216, .62);
  background: #17111c;
  box-shadow: 5px 5px 0 #070508;
}

.chip {
  padding: 6px 10px;
  border-width: 2px;
  border-radius: 5px;
  border-color: rgba(196, 122, 216, .42);
  color: var(--td);
  background: #211724;
  box-shadow: 2px 2px 0 #070508;
}

.progress {
  overflow: hidden;
  border: 1px solid rgba(196, 122, 216, .34);
  border-radius: 3px;
}

.progress-bar {
  border-radius: 0;
}

.project-cta-primary {
  border-color: #e2a1f0;
}

.project-cta-outline {
  border-color: rgba(196, 122, 216, .48);
  background: #17111c;
}

.project-cta-primary i {
  border: 2px solid #2c2032;
  border-radius: 5px;
  box-shadow: 2px 2px 0 #070508;
}

.glass-card,
.project-card,
.skill-card,
.timeline-item,
.contact-panel {
  border: 2px solid rgba(196, 122, 216, .42);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012)),
    #17111c;
  box-shadow: 6px 6px 0 #070508;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.glass-card:hover,
.project-card:hover,
.skill-card:hover,
.timeline-item:hover {
  border-color: rgba(216, 154, 232, .68);
  box-shadow: 7px 7px 0 #070508;
  transform: translate(-1px, -1px);
}

.portrait-card,
.profile-card {
  border-width: 2px;
  border-radius: 8px;
  box-shadow: 7px 7px 0 #070508, var(--shadow);
}

.brand-mark,
.form-control,
.form-select,
.social-link {
  border-radius: 6px;
}

.form-control,
.form-select {
  border-width: 2px;
  box-shadow: 3px 3px 0 #070508;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 3px 3px 0 #070508, 0 0 0 .18rem rgba(155, 91, 183, .15);
}

@media (max-width: 1023.98px) {
  .portfolio-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 7px;
  }
}

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(62, 54, 48, .86);
  color: var(--tdd);
  background: rgba(14, 12, 11, .42);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .portfolio-nav,
  .profile-pill {
    background: rgba(14, 12, 11, .92);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: min(1140px, calc(100vw - 48px));
  }
}

@media (max-width: 1023.98px) {
  .portfolio-nav .navbar-collapse {
    padding: 16px 0 8px;
  }

  .page-main {
    padding-top: calc(96px + env(safe-area-inset-top));
  }

  .display-title {
    font-size: clamp(2.75rem, 11vw, 4.8rem);
  }

  .hero-visual {
    margin: 28px auto 0;
    padding-bottom: 42px;
  }
}

@media (max-width: 767.98px) {
  .section-title {
    font-size: clamp(2rem, 10vw, 3.35rem);
    line-height: 1.04;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

/* Full-page transition keeps the dark visual continuity between documents. */
.site-page-transition {
  position: fixed;
  z-index: 50000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #f8f2fa;
  background:
    radial-gradient(circle at 50% 46%, rgba(196, 122, 216, .2), transparent 26%),
    linear-gradient(145deg, #09070b, #120b16 58%, #08060a);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.site-page-transition.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.site-page-transition-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: min(360px, calc(100vw - 36px));
  padding: 18px 20px;
  border: 2px solid rgba(213, 142, 229, .55);
  border-radius: 13px;
  background: rgba(24, 16, 28, .94);
  box-shadow: 7px 7px 0 #050306, 0 22px 70px rgba(0, 0, 0, .5);
}
.site-page-transition-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 2px solid #dfa0ec;
  border-radius: 12px;
  color: #f1b3f6;
  background: #2a1930;
  transform: rotate(-3deg);
}
.site-page-transition-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: site-transition-turn 1.05s cubic-bezier(.55,.15,.42,.88) infinite;
}
.site-page-transition strong,.site-page-transition small { display: block; }
.site-page-transition strong { font-size: .84rem; }
.site-page-transition small { margin-top: 4px; color: #aa9bae; font-size: .67rem; }
@keyframes site-transition-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .site-page-transition-icon svg { animation: none; } }

@media (max-width: 480px) {
  .site-frame,
  .page-main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
  }

  .page-main .row {
    margin-right: 0;
    margin-left: 0;
  }

  .page-main .row > * {
    padding-right: 0;
    padding-left: 0;
  }

  html {
    scrollbar-width: none;
  }

  body::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .page-main {
    padding-top: calc(88px + env(safe-area-inset-top));
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
  }

  .display-title {
    max-width: calc(100vw - 40px);
    font-size: clamp(2.6rem, 14vw, 4rem);
    line-height: 1;
  }

  .hero-role {
    max-width: 28ch;
    font-size: 1rem;
    line-height: 1.55;
  }

  .lead-copy {
    max-width: 28ch;
    font-size: 1rem;
  }

  .metric-grid {
    width: min(330px, calc(100vw - 40px));
    max-width: min(330px, calc(100vw - 40px));
  }

  .page-main .btn {
    width: min(330px, calc(100vw - 40px));
    max-width: min(330px, calc(100vw - 40px));
  }

  .project-cta-group {
    width: 100%;
    max-width: 100%;
    gap: 14px;
  }

  .project-cta {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .project-cta-primary {
    justify-content: center;
    min-width: 0;
    padding: 8px 58px 8px 18px;
  }

  .project-cta-primary i {
    position: absolute;
    right: 10px;
    top: 50%;
    flex-basis: auto;
    transform: translateY(-50%);
  }

  .timeline-item {
    padding: 18px;
  }
}

/* Portfolio cartoonist system: compact corners, visible ink and offset depth. */
:root {
  --cartoon-ink: #070508;
  --cartoon-panel: #17111c;
  --cartoon-panel-raised: #211724;
  --cartoon-edge: rgba(196, 122, 216, .58);
  --cartoon-edge-hot: #e2a1f0;
  --cartoon-shadow-sm: 3px 3px 0 var(--cartoon-ink);
  --cartoon-shadow: 6px 6px 0 var(--cartoon-ink);
  --radius: 6px;
}

.portfolio-nav {
  border-bottom: 2px solid rgba(196, 122, 216, .28);
  background: rgba(13, 10, 16, .9);
  box-shadow: 0 4px 0 rgba(7, 5, 8, .92);
}

.navbar-brand {
  min-height: 42px;
  padding: 3px 7px 3px 3px;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.navbar-brand:hover,
.navbar-brand:focus-visible {
  border-color: rgba(196, 122, 216, .52);
  background: var(--cartoon-panel-raised);
  box-shadow: var(--cartoon-shadow-sm);
  transform: translate(-1px, -1px);
}

.brand-mark {
  border: 2px solid var(--cartoon-edge);
  border-radius: 5px;
  box-shadow: 3px 3px 0 var(--cartoon-ink);
}

.portfolio-nav .nav-link {
  min-height: 42px;
  border-radius: 5px;
  font-weight: 800;
}

.portfolio-nav .nav-link.active,
.portfolio-nav .navbar-nav .nav-link.active {
  border-color: var(--cartoon-edge-hot);
  background: #b966cf;
  box-shadow: 4px 4px 0 var(--cartoon-ink);
}

.page-kicker {
  min-height: 34px;
  padding: 6px 10px;
  border: 2px solid rgba(196, 122, 216, .5);
  border-radius: 4px;
  background: var(--cartoon-panel-raised);
  box-shadow: var(--cartoon-shadow-sm);
}

.page-kicker::before {
  width: 8px;
  height: 8px;
  border: 1px solid #8af0ae;
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--cartoon-ink);
}

.page-main .btn,
.project-cta,
.social-link,
.navbar-toggler {
  border-width: 2px !important;
  border-radius: 5px !important;
  box-shadow: 5px 5px 0 var(--cartoon-ink);
  font-weight: 800;
}

.page-main .btn:hover,
.page-main .btn:focus-visible,
.project-cta:hover,
.project-cta:focus-visible,
.social-link:hover,
.social-link:focus-visible,
.navbar-toggler:hover,
.navbar-toggler:focus-visible {
  box-shadow: 7px 7px 0 var(--cartoon-ink);
  transform: translate(-2px, -2px);
}

.page-main .btn:active,
.project-cta:active,
.social-link:active,
.navbar-toggler:active {
  box-shadow: 1px 1px 0 var(--cartoon-ink);
  transform: translate(4px, 4px);
}

.page-main .btn-primary {
  color: #160d1f;
  border-color: #f0c8fa;
  background: #b966cf;
}

.page-main .btn-outline-light,
.project-cta-outline,
.social-link {
  border-color: var(--cartoon-edge);
  background: var(--cartoon-panel);
}

.glass-card,
.project-card,
.skill-card,
.timeline-item,
.contact-panel {
  border: 2px solid var(--cartoon-edge);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012)),
    var(--cartoon-panel);
  box-shadow: var(--cartoon-shadow);
}

.glass-card:hover,
.project-card:hover,
.skill-card:hover,
.timeline-item:hover,
.contact-panel:hover {
  border-color: rgba(226, 161, 240, .82);
  box-shadow: 8px 8px 0 var(--cartoon-ink);
  transform: translate(-2px, -2px);
}

.metric {
  min-height: 110px;
  border-top: 5px solid #9b5bb7;
}

.skill-card {
  position: relative;
  overflow: hidden;
  border-top-color: #c47ad8;
}

.skill-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 8px;
  background: #c47ad8;
  border-left: 2px solid var(--cartoon-ink);
  border-bottom: 2px solid var(--cartoon-ink);
}

.progress {
  height: 13px;
  overflow: hidden;
  border: 2px solid rgba(196, 122, 216, .52);
  border-radius: 3px;
  background: #0d0a10;
  box-shadow: 3px 3px 0 var(--cartoon-ink);
}

.progress-bar {
  border-right: 2px solid var(--cartoon-ink);
  border-radius: 0;
  background: linear-gradient(90deg, #b966cf, #7a5cff);
}

.chip {
  min-height: 34px;
  margin: 0 9px 10px 0;
  padding: 7px 10px;
  border: 2px solid rgba(196, 122, 216, .56);
  border-radius: 4px;
  color: var(--td);
  background: var(--cartoon-panel-raised);
  box-shadow: 3px 3px 0 var(--cartoon-ink);
  vertical-align: middle;
  transition: color .14s ease, border-color .14s ease, background-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.chip:hover {
  color: var(--t);
  border-color: var(--cartoon-edge-hot);
  background: #2b1c31;
  box-shadow: 4px 4px 0 var(--cartoon-ink);
  transform: translate(-1px, -1px) rotate(-1deg);
}

.timeline-item {
  border-left: 6px solid #9b5bb7;
}

.timeline-date {
  width: fit-content;
  height: fit-content;
  padding: 7px 9px;
  border: 2px solid rgba(196, 122, 216, .58);
  border-radius: 4px;
  color: #f0c8fa;
  background: var(--cartoon-panel-raised);
  box-shadow: var(--cartoon-shadow-sm);
}

.portrait-card,
.profile-card {
  border: 2px solid var(--cartoon-edge);
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--cartoon-ink), var(--shadow);
}

.profile-pill,
.floating-note {
  border: 2px solid var(--cartoon-edge);
  border-radius: 4px;
  background: var(--cartoon-panel);
  box-shadow: 5px 5px 0 var(--cartoon-ink);
}

.profile-pill b::before {
  border-radius: 1px;
}

.project-cta-primary {
  border-color: var(--cartoon-edge-hot);
  background: #9b5bb7;
  box-shadow: 6px 6px 0 var(--cartoon-ink);
}

.project-cta-primary i {
  border: 2px solid rgba(226, 161, 240, .62);
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--cartoon-ink);
}

.mini-timeline .timeline-item {
  border-left-width: 4px;
  box-shadow: 4px 4px 0 var(--cartoon-ink);
}

blockquote {
  padding: 16px 18px;
  border: 2px solid rgba(196, 122, 216, .58);
  border-left: 6px solid #b966cf;
  border-radius: 5px;
  background: #100c13;
  box-shadow: 4px 4px 0 var(--cartoon-ink);
}

.form-control,
.form-select {
  border: 2px solid var(--cartoon-edge);
  border-radius: 5px;
  background: var(--cartoon-panel);
  box-shadow: var(--cartoon-shadow-sm);
}

.footer {
  border-top: 2px solid rgba(196, 122, 216, .3);
  background: rgba(13, 10, 16, .9);
  box-shadow: 0 -3px 0 rgba(7, 5, 8, .8);
}

@media (max-width: 767.98px) {
  .glass-card,
  .project-card,
  .skill-card,
  .timeline-item,
  .contact-panel {
    box-shadow: 4px 4px 0 var(--cartoon-ink);
  }

  .glass-card:hover,
  .project-card:hover,
  .skill-card:hover,
  .timeline-item:hover,
  .contact-panel:hover {
    box-shadow: 5px 5px 0 var(--cartoon-ink);
    transform: translate(-1px, -1px);
  }

  .profile-pill {
    bottom: -14px;
    width: max-content;
    max-width: calc(100% - 12px);
    gap: 4px;
    padding: 8px 10px;
    font-size: clamp(.62rem, 2.7vw, .74rem);
    line-height: 1.15;
    white-space: nowrap;
  }

  .profile-pill span,
  .profile-pill b {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .profile-pill b::before {
    margin-right: 5px;
    margin-left: 0;
  }
}
