:root {
  --bg: #0a0d1a;
  --bg2: #0f1426;
  --fg: #eef0fb;
  --muted: #9aa3c2;
  --card: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .09);
  --a: #6d7bff;
  --b: #9b6dff;
  --grad: linear-gradient(135deg, #5b8cff, #9b6dff);
  --grad-glow: linear-gradient(135deg, rgba(91, 140, 255, 0.4), rgba(155, 109, 255, 0.4));
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="dark"] {
  --bg: #0a0d1a;
}

*, *::before, *::after {
  box-sizing: inherit;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: 
    radial-gradient(800px 500px at 80% 10%, rgba(109, 123, 255, .15), transparent 70%),
    radial-gradient(600px 450px at 10% 65%, rgba(155, 109, 255, .12), transparent 70%),
    radial-gradient(500px 400px at 50% 90%, rgba(79, 110, 247, .08), transparent 70%);
  pointer-events: none;
}

/* Ambient cursor glow */
#cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(109, 123, 255, 0.12) 0%, rgba(155, 109, 255, 0.05) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.08s ease-out;
  opacity: 0;
}

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

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
  position: relative;
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .8rem;
  color: var(--a);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
}

h2 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.2;
  margin: .4rem 0 1.6rem;
  letter-spacing: -.02em;
}

h3 {
  margin: 0 0 .4rem;
  font-size: 1.1rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 123, 255, .6);
  background: rgba(255, 255, 255, .08);
}

.btn.pri {
  background: var(--grad);
  border: 0;
  color: #fff;
  box-shadow: 0 8px 28px rgba(109, 123, 255, .35);
}

.btn.pri:hover {
  box-shadow: 0 14px 38px rgba(109, 123, 255, .55);
  transform: translateY(-2px) scale(1.02);
}

.glow-btn span {
  transition: transform .2s ease;
}

.glow-btn:hover span {
  transform: translateX(4px);
}

.btn.sm {
  min-height: 44px;
  padding: 0 18px;
  font-size: .88rem;
}

.btn.ghost-btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
}

.btn.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--a);
}

.btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}

.btn[aria-disabled="true"]:hover {
  transform: none;
  border-color: var(--line);
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(109, 123, 255, .45);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

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

.g2 { grid-template-columns: 1fr; }
.g3 { grid-template-columns: 1fr; }
.g4 { grid-template-columns: repeat(2, 1fr); }

@media(min-width: 700px) {
  .g2 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .g4 { grid-template-columns: repeat(4, 1fr); }
}

@media(min-width: 960px) {
  .g3 { grid-template-columns: repeat(3, 1fr); }
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: .75rem;
  border: 1px solid var(--line);
  background: rgba(109, 123, 255, .1);
  color: #c5ccff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1rem;
}

/* Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(10, 13, 26, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background .3s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.menu {
  display: none;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s, background .2s;
}

.menu a:hover, .menu a.on {
  color: var(--fg);
  background: var(--card);
}

.burger {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font-size: 1.3rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.mmenu {
  display: none;
  flex-direction: column;
  padding: 8px 20px 16px;
  border-top: 1px solid var(--line);
}

.mmenu.open {
  display: flex;
}

.mmenu a {
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

@media(min-width: 900px) {
  .menu { display: flex; }
  .burger, .mmenu, .mmenu.open { display: none; }
}

/* ==========================================================
   HERO SECTION (Dribbble Animated Personal Showcase)
   ========================================================== */
#home {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media(min-width: 960px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Status badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(109, 123, 255, 0.08);
  border: 1px solid rgba(109, 123, 255, 0.25);
  color: #c9d2ff;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35d49a;
  box-shadow: 0 0 0 0 rgba(53, 212, 154, .7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(53, 212, 154, .7); }
  70% { box-shadow: 0 0 0 9px rgba(53, 212, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 212, 154, 0); }
}

.hi {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--a);
  font-size: .95rem;
  letter-spacing: .02em;
  margin-bottom: .4rem;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  margin: 0 0 1.2rem;
  font-weight: 800;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 540px;
  color: #a8b2d1;
}

.lead strong {
  color: var(--fg);
  font-weight: 600;
}

.hero-stats-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.4rem 0 1.8rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: .84rem;
  color: var(--muted);
}

.stat-num {
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: .6rem;
}

/* ==========================================================
   HERO PORTRAIT SHOWCASE (3D Tilt & Floating Chips)
   ========================================================== */
.hero-portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  padding: 24px 16px;
}

/* Ambient dynamic glows */
.portrait-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 123, 255, 0.35) 0%, rgba(155, 109, 255, 0.2) 40%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  animation: pulseGlow 5s ease-in-out infinite alternate;
}

.portrait-glow-secondary {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  bottom: 0;
  right: 10%;
  background: radial-gradient(circle, rgba(53, 212, 154, 0.2) 0%, transparent 65%);
  filter: blur(50px);
  z-index: 0;
  pointer-events: none;
  animation: pulseGlow 7s ease-in-out infinite alternate-reverse;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9) translate(-10px, -10px); opacity: 0.7; }
  100% { transform: scale(1.15) translate(15px, 15px); opacity: 1; }
}

/* 3D Interactive Card */
.portrait-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3.2 / 4;
  border-radius: 30px;
  background: rgba(18, 22, 44, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 30px 80px -15px rgba(0, 0, 0, 0.7),
    0 0 50px rgba(109, 123, 255, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  z-index: 1;
  cursor: pointer;
}

.portrait-card:hover {
  box-shadow: 
    0 35px 90px -10px rgba(0, 0, 0, 0.8),
    0 0 70px rgba(109, 123, 255, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.portrait-frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  display: flex;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.portrait-card:hover .portrait-img {
  transform: scale(1.04);
}

/* Subtle gradient bottom overlay on portrait */
.portrait-gradient-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 45%,
    rgba(10, 13, 26, 0.4) 75%,
    rgba(10, 13, 26, 0.85) 100%
  );
}

/* Specular glare shine */
.portrait-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: overlay;
}

.portrait-card:hover .portrait-glare {
  opacity: 1;
}

/* ==========================================================
   FLOATING INTERACTIVE CHIPS
   ========================================================== */
.float-chip {
  position: absolute;
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(14, 18, 40, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(109, 123, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  transform: translateZ(40px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  pointer-events: auto;
  user-select: none;
}

.float-chip:hover {
  transform: translateZ(55px) scale(1.06) !important;
  border-color: rgba(109, 123, 255, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(109, 123, 255, 0.35);
}

.chip-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.chip-text {
  display: flex;
  flex-direction: column;
}

.chip-text strong {
  font-size: .84rem;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -.01em;
}

.chip-text small {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 500;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #35d49a;
  box-shadow: 0 0 10px #35d49a;
  animation: pulseDot 2s infinite;
}

/* Individual chip positions & floating keyframes */
.chip-top-left {
  top: -12px;
  left: -24px;
  animation: floatSlow 6s ease-in-out infinite;
}

.chip-top-right {
  top: 36px;
  right: -28px;
  animation: floatReverse 7s ease-in-out infinite 0.5s;
}

.chip-bottom-left {
  bottom: 44px;
  left: -32px;
  animation: floatReverse 6.5s ease-in-out infinite 1s;
}

.chip-bottom-right {
  bottom: -16px;
  right: -16px;
  animation: floatSlow 7.5s ease-in-out infinite 1.5s;
}

@keyframes floatSlow {
  0%, 100% { transform: translateZ(35px) translateY(0px); }
  50% { transform: translateZ(35px) translateY(-10px); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateZ(35px) translateY(0px); }
  50% { transform: translateZ(35px) translateY(10px); }
}

/* Mobile responsive for chips */
@media(max-width: 600px) {
  .hero-portrait-wrap {
    padding: 30px 10px;
  }
  .portrait-card {
    max-width: 290px;
  }
  .chip-top-left {
    top: -10px;
    left: -10px;
  }
  .chip-top-right {
    top: 24px;
    right: -10px;
  }
  .chip-bottom-left {
    bottom: 24px;
    left: -12px;
  }
  .chip-bottom-right {
    bottom: -12px;
    right: -10px;
  }
  .float-chip {
    padding: 8px 12px;
  }
  .chip-text strong {
    font-size: .78rem;
  }
  .chip-text small {
    font-size: .65rem;
  }
}

/* ==========================================================
   ABOUT & STATS SECTION
   ========================================================== */
.stat b {
  display: block;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}

.stat span {
  font-size: .84rem;
  color: var(--muted);
}

.me {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--grad);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  box-shadow: 0 0 40px rgba(109, 123, 255, .25);
}

.me span {
  font-weight: 800;
  font-size: 2rem;
  color: #fff;
  letter-spacing: -.02em;
}

.me img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Code terminal component (can be placed in About or Code) */
.term {
  background: rgba(14, 18, 36, .9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 50px rgba(109, 123, 255, .15);
  overflow: hidden;
  margin-bottom: 20px;
}

.bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a4166;
}

.bar span {
  margin-left: 8px;
  font-size: .74rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

pre {
  margin: 0;
  padding: 18px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .8rem;
  line-height: 1.8;
  overflow-x: auto;
  color: #cfd5f5;
}

.k { color: #b48cff; }
.s { color: #7fe3b4; }
.n { color: #7aa5ff; }
.c { color: #5c668f; }

.cur {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--a);
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ==========================================================
   FEATURED PROJECT
   ========================================================== */
.shot {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  border: 1px dashed rgba(109, 123, 255, .5);
  background: linear-gradient(135deg, rgba(91, 140, 255, .12), rgba(155, 109, 255, .12));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: .88rem;
  overflow: hidden;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.feat {
  display: grid;
  gap: 28px;
}

@media(min-width: 900px) {
  .feat {
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
  }
}

ul.tick {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

ul.tick li {
  padding: 4px 0 4px 26px;
  position: relative;
  color: var(--muted);
  font-size: .94rem;
}

ul.tick li::before {
  content: "›";
  position: absolute;
  left: 6px;
  color: var(--a);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ==========================================================
   SKILLS & SERVICES
   ========================================================== */
.lv {
  display: inline-block;
  margin-top: 8px;
  font-size: .72rem;
  padding: 2px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.lv.w { color: #7fe3b4; border-color: rgba(127, 227, 180, .35); }
.lv.f { color: #8fb3ff; border-color: rgba(143, 179, 255, .35); }
.lv.l { color: #e6c476; border-color: rgba(230, 196, 118, .35); }

.tech {
  padding: 18px;
  text-align: center;
}

.tech strong {
  display: block;
  font-size: .95rem;
}

.sk h3 {
  color: var(--a);
  font-size: .82rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 1.8rem 0 .9rem;
}

.note {
  font-size: .88rem;
  border-left: 2px solid var(--a);
  padding-left: 14px;
  margin-top: 1.6rem;
}

/* ==========================================================
   TIMELINE & CONTACT
   ========================================================== */
.tl {
  position: relative;
  margin-left: 8px;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.tl .it {
  position: relative;
  margin-bottom: 24px;
}

.tl .it::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--a);
}

.tl .it.now::before {
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 0 16px rgba(109, 123, 255, .8);
}

.tl small {
  font-family: "JetBrains Mono", monospace;
  color: var(--a);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ct {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
}

.ct em {
  font-style: normal;
  font-size: .78rem;
  color: var(--muted);
  display: block;
}

.ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(109, 123, 255, .14);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #c5ccff;
  flex: none;
}

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 46px;
  text-align: center;
}

footer p {
  margin: .25rem 0;
  font-size: .9rem;
}

/* ==========================================================
   CASE STUDY OVERLAY & REVEALS
   ========================================================== */
#case {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#case.open {
  display: block;
  animation: up .35s ease;
}

@keyframes up {
  from { opacity: 0; transform: translateY(24px); }
}

#case .wrap {
  max-width: 820px;
  padding-top: 24px;
  padding-bottom: 70px;
}

.steps {
  counter-reset: s;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}

.steps li::before {
  counter-increment: s;
  content: counter(s, decimal-leading-zero);
  font-family: "JetBrains Mono", monospace;
  color: var(--a);
  font-size: .85rem;
  min-width: 26px;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 30px);
  opacity: 0;
  background: #1a2040;
  border: 1px solid var(--line);
  padding: 12px 20px;
  border-radius: 14px;
  font-size: .9rem;
  z-index: 200;
  transition: .3s;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

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

.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(0.16, 1, 0.3, 1), transform .7s cubic-bezier(0.16, 1, 0.3, 1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

/* Page entrance animations */
.hero-enter {
  animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.portrait-enter {
  animation: portraitScaleIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes portraitScaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(40px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
}
