:root {
  --bg: #0c0a17;
  --bg-2: #110e1d;
  --surface: #181424;
  --line: rgba(242, 237, 246, 0.12);
  --text: #f2edf6;
  --muted: #aaa0b5;
  --gold: #f3a4d3;
  --gold-2: #f3a4d3;
  --blush: #f49acb;
  --mint: #c3a6ea;
  --violet: #9a6dde;
  --pink-soft: #f7b2da;
  --blue-soft: #181424;
  --blue: #c3a6ea;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-head: "Syne", "Avenir Next", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  background: var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(154, 109, 222, 0.18), transparent 55%),
    radial-gradient(700px 480px at 100% 8%, rgba(195, 166, 234, 0.12), transparent 50%),
    radial-gradient(700px 500px at 80% 100%, rgba(244, 154, 203, 0.12), transparent 55%);
}

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

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button.btn {
  appearance: none;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--gold);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(var(--container), calc(100% - 2.4rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(12, 10, 23, 0.76);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(12, 10, 23, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
}

.logo-text {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.logo-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.lang {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lang:hover {
  border-color: rgba(242, 237, 246, 0.28);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
}

.hero {
  padding: clamp(0.6rem, 1.75vw, 1.375rem) 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.75fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--gold-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.08;
  margin: 0;
}

.hero h1 {
  margin: 0.8rem 0 1rem;
  font-size: clamp(3.1rem, 8vw, 6.4rem);
  letter-spacing: -0.04em;
}

.hero h1 em {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--gold-2);
}

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
}

.chip {
  border: 1px solid var(--line);
  background: rgba(24, 20, 36, 0.72);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.chip.gold { color: var(--gold); border-color: rgba(243, 164, 211, 0.48); }
.chip.mint { color: var(--blue); border-color: rgba(195, 166, 234, 0.48); }
.chip.blush { color: var(--blush); border-color: rgba(244, 154, 203, 0.48); }

.lead {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--blush);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--violet);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 34rem;
}

.stat {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.7rem;
}

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

.hero-stage {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.portrait {
  margin: 0;
  position: relative;
  width: min(100%, 320px);
  padding: 0.55rem;
  background: var(--blush);
  border-radius: 4px;
  box-shadow:
    var(--shadow),
    0 0 70px rgba(244, 154, 203, 0.22);
  transform: rotate(-7deg);
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 12% -8% -10% 8%;
  border-radius: 40%;
  background: radial-gradient(circle, rgba(154, 109, 222, 0.3), transparent 68%);
  z-index: -1;
  pointer-events: none;
}

.portrait img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--surface);
}

section {
  padding: 4.5rem 0;
  position: relative;
  z-index: 1;
  scroll-margin-top: 84px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-head p {
  max-width: 28rem;
  color: var(--muted);
  margin: 0;
}

.num {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  gap: 1.2rem;
}

.card {
  background: rgba(24, 20, 36, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

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

.about-copy p:last-child {
  margin-bottom: 0;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.side-list li {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.side-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.side-list small {
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.72rem;
}

.games {
  display: grid;
  gap: 1.1rem;
}

.game {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 0;
  overflow: hidden;
  background: rgba(24, 20, 36, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.game:nth-child(even) {
  grid-template-columns: 0.9fr 1.25fr;
}

.game:nth-child(even) .game-copy {
  order: -1;
}

.game-media {
  cursor: zoom-in;
  min-height: 280px;
  background: var(--blue-soft);
}

.game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.game-copy {
  padding: 1.5rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
}

.game-copy h3 {
  font-size: 1.55rem;
  margin: 0.35rem 0 0.7rem;
}

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

.bullets {
  margin: 0 0 1.2rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.bullets li + li {
  margin-top: 0.35rem;
}

.game-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.design-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.1rem;
}

.design-card {
  background: rgba(24, 20, 36, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.design-card img {
  width: 100%;
  cursor: zoom-in;
  object-fit: cover;
}

.stack img + img {
  border-top: 1px solid var(--line);
}

.design-card figcaption,
.design-copy {
  padding: 1.15rem 1.25rem 1.3rem;
}

.design-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.design-card p,
.design-copy p {
  margin: 0;
  color: var(--muted);
}

.tall img {
  max-height: none;
}

.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.exp h3 {
  font-size: 1.35rem;
  margin: 0.2rem 0 0.2rem;
}

.exp .meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

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

.skill h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
  color: var(--gold-2);
}

.skill ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.skill li + li {
  margin-top: 0.35rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.1rem;
}

.contact-links {
  display: grid;
  gap: 0.7rem;
}

.contact-links a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: rgba(24, 20, 36, 0.92);
}

.contact-links a small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.contact-links a:hover {
  border-color: var(--violet);
}

form {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(12, 10, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.lightbox button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .game,
  .game:nth-child(even),
  .design-grid,
  .exp-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .game:nth-child(even) .game-copy {
    order: 0;
  }

  .hero-stage {
    order: -1;
    justify-content: center;
  }

  .portrait {
    width: min(52%, 260px);
    margin-inline: auto;
  }

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

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 72px;
    right: 1.2rem;
    left: 1.2rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a,
  .nav .lang {
    padding: 0.95rem 1rem;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .stat b {
    font-size: 1.35rem;
  }

  .stat span {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .chip {
    font-size: 0.78rem;
    padding: 0.3rem 0.65rem;
  }

  .portrait {
    width: min(58%, 220px);
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }

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

/* Compact game-portfolio redesign */
main {
  display: flex;
  flex-direction: column;
}

.hero { order: 1; }
.toolbelt { order: 2; }
#games { order: 3; }
#experience { order: 4; }
#about { order: 5; }
#contact { order: 6; }

body {
  font-size: 15px;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(242, 237, 246, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 237, 246, 0.012) 1px, transparent 1px);
  background-size: 32px 32px;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
}

.header-inner {
  min-height: 62px;
}

.logo-mark {
  width: 30px;
  height: 30px;
}

.logo-text {
  font-size: 0.9rem;
}

.logo-text small {
  font-size: 0.58rem;
}

.nav {
  gap: 1.5rem;
}

.nav a {
  font-size: 0.76rem;
}

.hero {
  min-height: 610px;
  padding: clamp(0.75rem, 1.75vw, 1.5rem) 0 1.25rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 76% 38%, rgba(154, 109, 222, 0.16), transparent 34%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 65% 42%, transparent 0 24%, rgba(12, 10, 23, 0.2) 58%),
    linear-gradient(180deg, transparent 75%, var(--bg));
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  position: relative;
  z-index: 1;
}

.hero-grid > div:first-child {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 0.6rem 0 1rem;
  font-size: clamp(3.25rem, 6.8vw, 5.6rem);
  max-width: 760px;
}

.hero h1 em {
  display: block;
  color: var(--blush);
  font-family: "Caveat", var(--font-display);
  font-size: 1.05em;
  line-height: 0.82;
}

.hero h1 > span {
  display: block;
  margin-top: 0.2em;
  font-size: 0.48em;
  letter-spacing: 0.04em;
}

html[lang="ru"] .hero h1 > span {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.kicker {
  color: var(--blue);
  font-size: 0.72rem;
}

.kicker::before {
  background: var(--blush);
}

.roles {
  margin-bottom: 1rem;
}

.lead {
  max-width: 34rem;
  font-size: 0.96rem;
}

.hero-actions {
  margin-bottom: 1.7rem;
}

.btn {
  min-height: 42px;
  padding: 0.58rem 1rem;
  font-size: 0.82rem;
  border-radius: 10px;
}

.btn-primary {
  color: #24162d;
  box-shadow: 0 10px 30px rgba(244, 154, 203, 0.2);
}

.stats {
  max-width: 30rem;
}

.stat {
  padding-top: 0.65rem;
}

.stat b {
  font-size: 1.35rem;
  color: var(--text);
}

.stat span {
  font-size: 0.72rem;
}

.hero-stage {
  min-height: 470px;
  justify-content: center;
}

.hero-stage::before {
  content: "✦";
  position: absolute;
  top: 8%;
  left: 4%;
  color: var(--blue);
  font-size: 2rem;
  text-shadow: 46px 72px 0 var(--blush), 250px 32px 0 var(--gold);
}

.hero-art {
  position: absolute;
  right: 0;
  width: auto;
  height: 470px;
  aspect-ratio: 4 / 3;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(154, 109, 222, 0.18);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 15%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 15%, #000 91%, transparent 100%);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(12, 10, 23, 0.32), transparent 28%);
}

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.96);
}

.hero-cta-highlight {
  position: relative;
  display: inline-flex;
}

.hero-cta-highlight .btn {
  position: relative;
  z-index: 2;
}

.hero-sparkles {
  position: absolute;
  inset: -3.2rem -1.6rem -0.8rem;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.hero-sparkles span {
  position: absolute;
  left: var(--spark-x);
  bottom: var(--spark-y);
  color: var(--spark-color);
  font-size: var(--spark-size);
  line-height: 1;
  opacity: 0;
  filter: drop-shadow(0 0 7px currentColor);
  animation: hero-sparkle-float var(--spark-speed) ease-in infinite;
  animation-delay: var(--spark-delay);
}

.hero-sparkles span:nth-child(1) { --spark-x: 18%; --spark-y: 9%; --spark-size: 0.8rem; --spark-speed: 5.8s; --spark-delay: -1s; --spark-color: var(--pink-soft); }
.hero-sparkles span:nth-child(2) { --spark-x: 31%; --spark-y: 2%; --spark-size: 1.15rem; --spark-speed: 7.2s; --spark-delay: -4s; --spark-color: var(--gold); }
.hero-sparkles span:nth-child(3) { --spark-x: 43%; --spark-y: 16%; --spark-size: 0.65rem; --spark-speed: 5.2s; --spark-delay: -3s; --spark-color: var(--blush); }
.hero-sparkles span:nth-child(4) { --spark-x: 55%; --spark-y: 5%; --spark-size: 0.95rem; --spark-speed: 6.7s; --spark-delay: -5s; --spark-color: var(--pink-soft); }
.hero-sparkles span:nth-child(5) { --spark-x: 67%; --spark-y: 13%; --spark-size: 0.72rem; --spark-speed: 5.5s; --spark-delay: -2s; --spark-color: var(--gold); }
.hero-sparkles span:nth-child(6) { --spark-x: 77%; --spark-y: 3%; --spark-size: 1.05rem; --spark-speed: 7.5s; --spark-delay: -6s; --spark-color: var(--violet); }
.hero-sparkles span:nth-child(7) { --spark-x: 86%; --spark-y: 18%; --spark-size: 0.7rem; --spark-speed: 5.9s; --spark-delay: -4.5s; --spark-color: var(--pink-soft); }
.hero-sparkles span:nth-child(8) { --spark-x: 94%; --spark-y: 8%; --spark-size: 0.9rem; --spark-speed: 6.4s; --spark-delay: -2.5s; --spark-color: var(--gold); }
.hero-sparkles span:nth-child(9) { --spark-x: 48%; --spark-y: 0%; --spark-size: 0.55rem; --spark-speed: 4.9s; --spark-delay: -3.8s; --spark-color: var(--blush); }

@keyframes hero-sparkle-float {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.65);
    opacity: 0;
  }
  16% {
    opacity: 0.85;
  }
  72% {
    opacity: 0.48;
  }
  100% {
    transform: translate3d(9px, -92px, 0) rotate(110deg) scale(1.08);
    opacity: 0;
  }
}

section {
  padding: 3.5rem 0;
}

.toolbelt {
  padding: 0 0 2rem;
}

.toolbelt-card {
  padding: 1.25rem 1.5rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(115deg, rgba(154, 109, 222, 0.1), transparent 42%),
    rgba(24, 20, 36, 0.9);
  box-shadow: var(--shadow);
}

.toolbelt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.toolbelt-head h2 {
  font-family: "Caveat", var(--font-display);
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--text);
}

.toolbelt-head span {
  color: var(--muted);
  font-size: 0.7rem;
}

.toolbelt-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.6rem;
}

.tool {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.66rem;
  text-align: center;
}

.tool b {
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font-family: var(--font-head);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.tool b img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
}

.tool:hover b {
  transform: translateY(-3px);
  border-color: transparent;
}

.section-head {
  margin-bottom: 1.35rem;
}

.section-head .num {
  color: var(--blush);
  font-size: 0.68rem;
  margin-bottom: 0.2rem;
}

.section-head h2 {
  font-family: "Caveat", var(--font-display);
  font-weight: 500;
  font-size: clamp(2.35rem, 4.5vw, 3.3rem);
  letter-spacing: 0;
}

.section-head h2::after {
  content: " ✦";
  color: var(--violet);
  font-family: var(--font-body);
  font-size: 0.42em;
  vertical-align: top;
}

.section-head > p {
  font-size: 0.78rem;
  white-space: pre-line;
}

.derby-showcase {
  display: grid;
  grid-template-columns: minmax(350px, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem;
  border: 1px solid rgba(244, 154, 203, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 10%, rgba(154, 109, 222, 0.14), transparent 35%),
    rgba(24, 20, 36, 0.94);
  box-shadow: var(--shadow);
}

.derby-gallery {
  position: relative;
  min-width: 0;
  display: flex;
  align-self: stretch;
  align-items: flex-start;
}

.derby-main {
  position: relative;
  width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: zoom-in;
}

.derby-main img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.18s ease, transform 0.35s ease;
}

.derby-main:hover img {
  transform: scale(1.015);
}

.derby-shot-card {
  position: absolute;
  bottom: 0.65rem;
  z-index: 2;
  width: 29%;
  padding: 0.28rem;
  border: 1px solid rgba(244, 154, 203, 0.44);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.48),
    0 0 24px rgba(154, 109, 222, 0.12);
  cursor: zoom-in;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.derby-shot-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  object-fit: cover;
}

.derby-shot-card--portrait img {
  object-position: center 42%;
}

.derby-shot-card--one {
  left: 4%;
  transform: rotate(-4deg);
}

.derby-shot-card--two {
  left: 35.5%;
  bottom: 0.45rem;
  transform: rotate(1.5deg);
}

.derby-shot-card--three {
  right: 3%;
  transform: rotate(4deg);
}

.derby-shot-card--single {
  right: 4%;
  width: 38%;
  transform: rotate(4deg);
}

.derby-shot-card:hover {
  z-index: 3;
  border-color: var(--blush);
  transform: translateY(-6px) rotate(0);
}

.derby-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.derby-thumbs button {
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
  opacity: 0.58;
  transition: opacity 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.derby-thumbs button:hover,
.derby-thumbs button.is-active {
  opacity: 1;
  border-color: var(--blush);
  transform: translateY(-2px);
}

.derby-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.derby-showcase-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  order: -1;
  padding: 0.45rem 0 0.35rem 0.4rem;
}

.derby-showcase:nth-of-type(even) {
  grid-template-columns: minmax(0, 1.1fr) minmax(350px, 0.9fr);
}

.derby-showcase:nth-of-type(even) .derby-showcase-copy {
  order: 0;
  padding: 0.45rem 0.4rem 0.35rem 0;
}

.derby-eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.derby-eyebrow .chip {
  padding: 0.22rem 0.55rem;
  font-size: 0.62rem;
}

.derby-format {
  color: var(--violet);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.derby-showcase-copy h3 {
  margin: 1rem 0 0.35rem;
  font-family: "Caveat", var(--font-display);
  color: var(--text);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 500;
}

.derby-role {
  margin: 0;
  color: var(--blush);
  font-size: 0.75rem;
  font-weight: 700;
}

.derby-summary {
  margin: 0.75rem 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.derby-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
}

.derby-meta div {
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 10, 23, 0.5);
}

.derby-meta dt {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.derby-meta dd {
  margin: 0;
  color: var(--text);
  font-size: 0.65rem;
}

.derby-contribution {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.derby-contribution > span {
  color: var(--blush);
  font-size: 0.68rem;
  font-weight: 700;
}

.derby-contribution .bullets {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
}

.compact-projects-test {
  margin-bottom: 1.5rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(130deg, rgba(154, 109, 222, 0.08), transparent 42%),
    rgba(17, 14, 29, 0.72);
}

.compact-projects-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.compact-projects-head h3 {
  font-family: "Caveat", var(--font-display);
  color: var(--pink-soft);
  font-size: 1.65rem;
  font-weight: 500;
}

.compact-projects-head span {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compact-projects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.compact-project {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-project:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 154, 203, 0.42);
}

.compact-project-media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--bg-2);
  cursor: zoom-in;
}

.compact-project-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.compact-projects-test--screens .compact-project-media img {
  aspect-ratio: 16 / 9;
}

.compact-project:hover .compact-project-media img {
  transform: scale(1.025);
}

.compact-project-media--inset img {
  transform: scale(0.88);
}

.compact-project:hover .compact-project-media--inset img {
  transform: scale(0.91);
}

.compact-project-copy {
  padding: 0.8rem 0.85rem 0.95rem;
}

.compact-project-copy h4 {
  margin: 0 0 0.55rem;
  color: var(--pink-soft);
  font-family: var(--font-head);
  font-size: 0.76rem;
  line-height: 1.35;
}

.compact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.compact-tags span {
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(154, 109, 222, 0.1);
  font-size: 0.54rem;
}

.compact-project-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.55;
}

.project-carousel-test {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.1rem 0.9rem;
  border: 1px solid rgba(195, 166, 234, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 10%, rgba(244, 154, 203, 0.1), transparent 32%),
    rgba(17, 14, 29, 0.78);
  outline: none;
}

.project-carousel-test:focus-visible {
  box-shadow: 0 0 0 2px var(--violet);
}

.project-carousel-shell {
  position: relative;
  width: min(100%, 850px);
  margin-inline: auto;
}

.project-carousel-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.project-carousel-track {
  display: flex;
  transition: transform 0.42s cubic-bezier(0.22, 0.8, 0.25, 1);
  will-change: transform;
}

.project-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.project-carousel-media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--bg-2);
  cursor: zoom-in;
}

.project-carousel-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.project-carousel-caption {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(220px, 1.25fr);
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem 1rem;
}

.project-carousel-caption span {
  color: var(--violet);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-carousel-caption h4 {
  margin: 0.2rem 0 0;
  color: var(--pink-soft);
  font-family: var(--font-head);
  font-size: 0.9rem;
}

.project-carousel-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.project-carousel-arrow {
  position: absolute;
  top: 44%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 0.14rem;
  border: 1px solid rgba(244, 154, 203, 0.35);
  border-radius: 50%;
  color: var(--text);
  background: rgba(12, 10, 23, 0.88);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
  transition: background 0.18s ease, transform 0.18s ease;
}

.project-carousel-arrow:hover {
  background: var(--violet);
  transform: scale(1.06);
}

.project-carousel-arrow--prev {
  left: -21px;
}

.project-carousel-arrow--next {
  right: -21px;
}

.project-carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.project-carousel-dots {
  display: flex;
  gap: 0.42rem;
}

.project-carousel-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(195, 166, 234, 0.3);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.project-carousel-dots button.is-active {
  width: 22px;
  background: var(--blush);
}

.project-carousel-count {
  color: var(--muted);
  font-size: 0.62rem;
}

.project-carousel-count b {
  color: var(--pink-soft);
}

.games {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.game,
.game:nth-child(even) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 16px;
  background: var(--surface);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.game:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 154, 203, 0.5);
}

.game:nth-child(even) .game-copy {
  order: 0;
}

.game-media {
  min-height: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.game-media img {
  min-height: 0;
  height: 100%;
  object-fit: cover;
}

.game-copy {
  flex: 1;
  padding: 1rem 1.1rem 1.1rem;
}

.game-copy .chip {
  align-self: flex-start;
  font-size: 0.65rem;
  padding: 0.22rem 0.55rem;
}

.game-copy h3 {
  font-size: 1.08rem;
  margin: 0.55rem 0 0.35rem;
}

.game-copy p {
  margin-bottom: 0.7rem;
  font-size: 0.76rem;
}

.game-copy details {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}

.game-copy summary {
  color: var(--blush);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  list-style: none;
}

.game-copy summary::-webkit-details-marker {
  display: none;
}

.game-copy summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.game-copy details[open] summary::after {
  content: "−";
}

.game-copy .bullets {
  margin: 0.65rem 0 0;
  font-size: 0.73rem;
}

.game-links {
  margin-top: 0.75rem;
}

.game-links .btn {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  font-size: 0.68rem;
}

.design-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: start;
}

.design-grid > div {
  display: contents;
}

.design-card {
  border-radius: 14px;
  background: var(--surface);
}

.design-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.design-card.stack img {
  height: 145px;
}

.design-card figcaption,
.design-copy {
  padding: 0.85rem 0.9rem 1rem;
}

.design-card h3 {
  font-size: 0.9rem;
}

.design-card p,
.design-copy p {
  font-size: 0.72rem;
}

.about-grid,
.exp-grid,
.contact-grid {
  gap: 0.8rem;
}

.about-side {
  overflow: hidden;
}

.about-portrait {
  width: 144px;
  height: 144px;
  margin: 0 auto 1rem;
  overflow: hidden;
  border: 1px solid rgba(244, 154, 203, 0.45);
  border-radius: 50%;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.36),
    0 0 42px rgba(154, 109, 222, 0.15);
}

.about-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.card {
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
}

.about-copy p {
  font-size: 0.82rem;
}

.side-list {
  font-size: 0.78rem;
}

.exp h3 {
  font-size: 1.05rem;
}

.exp .meta,
.exp .bullets {
  font-size: 0.76rem;
}

.skills {
  gap: 0.7rem;
}

.skill h3 {
  font-size: 0.86rem;
  color: var(--blue);
}

.skill ul {
  font-size: 0.72rem;
}

#contact .wrap {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 75% 20%, rgba(244, 154, 203, 0.1), transparent 30%),
    var(--surface);
}

.contact-links a {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: var(--bg-2);
  font-size: 0.78rem;
}

input,
textarea {
  border-radius: 9px;
  padding: 0.68rem 0.75rem;
  font-size: 0.78rem;
}

textarea {
  min-height: 105px;
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  }

  .hero-stage {
    order: 0;
    min-height: 360px;
  }

  .hero-art {
    height: 360px;
  }

  .compact-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbelt-grid {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 1rem;
  }

  .design-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero-grid,
  .games,
  .design-grid {
    grid-template-columns: 1fr;
  }

  .derby-showcase:nth-of-type(n) {
    grid-template-columns: 1fr;
  }

  .derby-showcase:nth-of-type(n) .derby-showcase-copy {
    order: 1;
    padding: 0.4rem;
  }

  .compact-projects {
    grid-template-columns: 1fr;
  }

  .project-carousel-test {
    padding-inline: 0.75rem;
  }

  .project-carousel-caption {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .project-carousel-arrow {
    top: 38%;
    width: 36px;
    height: 36px;
  }

  .project-carousel-arrow--prev {
    left: 0.45rem;
  }

  .project-carousel-arrow--next {
    right: 0.45rem;
  }

  .hero-stage {
    order: -1;
    min-height: auto;
    margin-bottom: 1rem;
  }

  .hero {
    padding-top: 0.5rem;
  }

  .hero-art {
    position: relative;
    right: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 13vw, 4.2rem);
  }

  .game-media {
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(100% - 1.4rem, 1120px);
  }

  .toolbelt-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .toolbelt-card {
    padding-inline: 0.8rem;
  }

  .tool b img {
    width: 34px;
    height: 34px;
  }

  .section-head {
    align-items: flex-start;
  }

  #contact .wrap {
    padding: 1rem;
  }
}

/* Combined about and contact footer */
.experience-cat {
  position: absolute;
  z-index: 2;
  top: -0.35rem;
  right: 1.5rem;
  width: 235px;
  margin: 0;
  pointer-events: none;
  opacity: 0.86;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.32));
}

.experience-cat img {
  display: block;
  width: 100%;
  height: auto;
}

#experience .wrap {
  position: relative;
}

#experience .section-head {
  padding-right: 245px;
}

.closing-section {
  padding-bottom: 1.25rem;
}

.anchor-target {
  position: absolute;
  top: 0;
  scroll-margin-top: 84px;
}

.closing-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(190px, 0.62fr) minmax(270px, 0.9fr);
  align-items: start;
  gap: 1.3rem;
  min-height: 300px;
  padding: 1.8rem 2rem 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(244, 154, 203, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 110%, rgba(244, 154, 203, 0.2), transparent 36%),
    radial-gradient(circle at 88% 15%, rgba(154, 109, 222, 0.16), transparent 32%),
    rgba(24, 20, 36, 0.95);
  box-shadow: var(--shadow);
}

.closing-card::before {
  content: "✦";
  position: absolute;
  top: 1.3rem;
  left: 48%;
  color: var(--gold);
  font-size: 1.15rem;
  text-shadow: 0 0 18px rgba(244, 154, 203, 0.7);
}

.closing-bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.closing-bubbles span {
  position: absolute;
  bottom: -45px;
  left: var(--bubble-x);
  width: var(--bubble-size);
  height: var(--bubble-size);
  border: 1px solid rgba(255, 182, 225, 0.58);
  border-radius: 50%;
  opacity: 0;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.75) 0 5%, transparent 7%),
    radial-gradient(circle at 68% 72%, rgba(154, 109, 222, 0.2), transparent 55%),
    rgba(244, 154, 203, 0.05);
  box-shadow:
    inset 2px 2px 7px rgba(255, 223, 243, 0.18),
    0 0 10px rgba(244, 154, 203, 0.12);
  animation: closing-bubble-rise var(--bubble-speed) linear infinite;
  animation-delay: var(--bubble-delay);
}

.closing-bubbles span:nth-child(1) { --bubble-x: 39%; --bubble-size: 15px; --bubble-speed: 8s; --bubble-delay: -2s; }
.closing-bubbles span:nth-child(2) { --bubble-x: 47%; --bubble-size: 25px; --bubble-speed: 11s; --bubble-delay: -7s; }
.closing-bubbles span:nth-child(3) { --bubble-x: 56%; --bubble-size: 11px; --bubble-speed: 7s; --bubble-delay: -4s; }
.closing-bubbles span:nth-child(4) { --bubble-x: 63%; --bubble-size: 20px; --bubble-speed: 10s; --bubble-delay: -1s; }
.closing-bubbles span:nth-child(5) { --bubble-x: 73%; --bubble-size: 13px; --bubble-speed: 9s; --bubble-delay: -6s; }
.closing-bubbles span:nth-child(6) { --bubble-x: 84%; --bubble-size: 28px; --bubble-speed: 13s; --bubble-delay: -9s; }
.closing-bubbles span:nth-child(7) { --bubble-x: 31%; --bubble-size: 9px; --bubble-speed: 7.5s; --bubble-delay: -5s; }
.closing-bubbles span:nth-child(8) { --bubble-x: 91%; --bubble-size: 16px; --bubble-speed: 9.5s; --bubble-delay: -3s; }

@keyframes closing-bubble-rise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.75);
    opacity: 0;
  }
  12% {
    opacity: 0.7;
  }
  70% {
    opacity: 0.42;
  }
  100% {
    transform: translate3d(18px, -370px, 0) scale(1.08);
    opacity: 0;
  }
}

.closing-about,
.closing-contact {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 100%;
}

.closing-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 68px;
  margin-bottom: 1rem;
}

.closing-title-row .num,
.closing-contact .num {
  margin-bottom: 0.25rem;
}

.closing-title-row h2,
.closing-contact h2 {
  margin: 0;
  font-family: "Caveat", var(--font-display);
  color: var(--text);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
}

.closing-contact > h2 {
  display: flex;
  align-items: center;
  min-height: 68px;
  margin-bottom: 1rem;
}

.closing-portrait-frame {
  position: relative;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  padding: 3px;
  border: 1px solid rgba(244, 154, 203, 0.68);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(244, 154, 203, 0.42), rgba(154, 109, 222, 0.52));
  box-shadow:
    0 0 0 3px rgba(154, 109, 222, 0.1),
    0 0 28px rgba(244, 154, 203, 0.2);
  transform: rotate(-3deg);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.closing-portrait-frame:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow:
    0 0 0 3px rgba(154, 109, 222, 0.14),
    0 0 34px rgba(244, 154, 203, 0.3);
}

.closing-portrait-frame::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(244, 154, 203, 0.2), rgba(91, 65, 142, 0.2));
  mix-blend-mode: color;
}

.closing-portrait {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 24%;
  filter: saturate(0.72) contrast(1.06) brightness(0.93);
}

.closing-about > p,
.closing-contact > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.closing-meta {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.closing-meta span {
  display: grid;
  gap: 0.15rem;
}

.closing-meta small {
  color: var(--pink-soft);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.closing-meta b {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.45;
}

.closing-mascot {
  align-self: end;
  margin: 0 -1.2rem -1.5rem;
}

.closing-mascot img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  filter: saturate(0.82) brightness(0.92);
}

.bubble-game-trigger {
  display: inline-flex;
  align-items: center;
  align-self: end;
  gap: 0.45rem;
  width: fit-content;
  margin-top: auto;
  padding: 0.62rem 0.85rem;
  border: 1px solid rgba(244, 154, 203, 0.42);
  border-radius: 10px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(244, 154, 203, 0.16), rgba(154, 109, 222, 0.14));
  box-shadow: 0 0 22px rgba(244, 154, 203, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.bubble-game-trigger b {
  font-size: 0.68rem;
  font-weight: 600;
}

.bubble-game-trigger:hover {
  transform: translateY(-2px);
  border-color: var(--pink-soft);
  background: rgba(154, 109, 222, 0.18);
}

.bubble-game {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 100%, rgba(244, 154, 203, 0.2), transparent 42%),
    rgba(12, 10, 23, 0.94);
  backdrop-filter: blur(8px);
}

.bubble-game.is-active {
  display: block;
}

.bubble-game[hidden],
.bubble-game-result[hidden] {
  display: none !important;
}

.bubble-game-hud {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem;
  pointer-events: none;
}

.bubble-game-hud > span {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(244, 154, 203, 0.28);
  border-radius: 999px;
  background: rgba(24, 20, 36, 0.82);
}

.bubble-game-hud small {
  color: var(--muted);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bubble-game-hud b {
  color: var(--pink-soft);
  font-size: 0.82rem;
}

.bubble-game-hud b i,
.bubble-game-hud b em {
  font-style: normal;
}

.bubble-game-hud > button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(244, 154, 203, 0.3);
  border-radius: 50%;
  color: var(--text);
  background: rgba(24, 20, 36, 0.86);
  font-size: 1.15rem;
  cursor: pointer;
  pointer-events: auto;
}

.bubble-game-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
}

.game-bubble {
  position: absolute;
  bottom: -85px;
  left: var(--game-x);
  width: var(--game-size);
  height: var(--game-size);
  padding: 0;
  border: 2px solid var(--game-color);
  border-radius: 50%;
  opacity: 0;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.92) 0 5%, transparent 7%),
    radial-gradient(circle at 68% 70%, rgba(154, 109, 222, 0.3), transparent 52%),
    rgba(244, 154, 203, 0.08);
  box-shadow:
    inset 3px 3px 10px rgba(255, 255, 255, 0.18),
    0 0 14px color-mix(in srgb, var(--game-color) 45%, transparent);
  cursor: pointer;
  touch-action: manipulation;
  animation: game-bubble-rise var(--game-duration) linear forwards;
}

.game-bubble::before {
  content: "";
  position: absolute;
  inset: -12px;
}

.game-bubble.is-popped {
  opacity: 0 !important;
  pointer-events: none;
}

.game-splash {
  position: absolute;
  z-index: 6;
  width: 0;
  height: 0;
  pointer-events: none;
}

.game-splash::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--splash-size);
  height: var(--splash-size);
  border: 2px solid var(--game-color);
  border-radius: 50%;
  opacity: 0.85;
  transform: translate(-50%, -50%) scale(0.35);
  animation: game-splash-ring 0.38s ease-out forwards;
}

.game-splash i {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--drop-size);
  height: var(--drop-size);
  border-radius: 50%;
  background: var(--game-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--game-color) 70%, white);
  animation: game-splash-drop 0.42s ease-out forwards;
}

@keyframes game-splash-ring {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

@keyframes game-splash-drop {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.15);
    opacity: 0;
  }
}

@keyframes game-bubble-rise {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.92;
  }
  100% {
    transform: translate3d(var(--game-drift), -410px, 0);
    opacity: 0;
  }
}

.bubble-game-result {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 1.5rem;
  background: rgba(12, 10, 23, 0.84);
  text-align: center;
}

.bubble-game-result > span {
  color: var(--gold);
  font-size: 1.5rem;
  filter: drop-shadow(0 0 9px currentColor);
}

.bubble-game-result h3 {
  margin: 0.25rem 0;
  font-family: "Caveat", var(--font-display);
  color: var(--text);
  font-size: 2.7rem;
  font-weight: 500;
}

.bubble-game-result p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.bubble-game-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.closing-contact {
  align-self: start;
}

.closing-contact > p {
  margin-top: 0;
}

.closing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.closing-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0.8rem;
  border: 1px solid rgba(244, 154, 203, 0.28);
  border-radius: 10px;
  color: var(--text);
  background: rgba(12, 10, 23, 0.58);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.closing-links a span,
.closing-link-icon {
  color: var(--pink-soft);
}

.closing-link-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.closing-links .hh-icon {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
}

.closing-links a b {
  font-size: 0.68rem;
  font-weight: 600;
}

.closing-links a:hover {
  transform: translateY(-2px);
  border-color: var(--pink-soft);
  background: rgba(154, 109, 222, 0.14);
}

.closing-links a.is-preferred {
  border-color: rgba(244, 154, 203, 0.62);
  background: linear-gradient(135deg, rgba(244, 154, 203, 0.16), rgba(154, 109, 222, 0.14));
  box-shadow: 0 0 22px rgba(244, 154, 203, 0.1);
}

.closing-links .preferred-badge {
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  color: var(--bg-2);
  background: var(--pink-soft);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.closing-section + .site-footer,
.site-footer {
  border-top: 0;
  padding-top: 0.4rem;
}

.footer-thanks {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-moon {
  width: 25px;
  height: 25px;
  overflow: visible;
  fill: none;
  stroke: var(--pink-soft);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(244, 154, 203, 0.28));
}

@media (max-width: 900px) {
  .closing-card {
    grid-template-columns: minmax(0, 1fr) 160px minmax(230px, 0.85fr);
    gap: 0.85rem;
    padding-inline: 1.35rem;
  }

  .closing-title-row h2,
  .closing-contact h2 {
    font-size: 2rem;
  }
}

@media (max-width: 720px) {
  .experience-cat {
    top: 0.4rem;
    right: 0.25rem;
    width: 135px;
    opacity: 0.72;
  }

  #experience .section-head {
    min-height: 70px;
    padding-right: 125px;
  }

  .closing-card {
    grid-template-columns: 1fr;
    padding: 1.35rem;
  }

  .closing-card::before {
    left: auto;
    right: 1.4rem;
  }

  .closing-mascot {
    width: 190px;
    margin: -0.5rem auto -1.35rem;
  }

  .closing-contact {
    padding-top: 0;
    text-align: center;
  }

  .closing-contact > h2 {
    justify-content: center;
  }

  .closing-links {
    justify-content: center;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

/* Compact projects and reusable detail modal */
.more-projects {
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.more-projects-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.more-projects-head h3 {
  margin: 0.15rem 0 0;
  font-family: "Caveat", var(--font-display);
  color: var(--text);
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  font-weight: 500;
}

.more-projects-head > p {
  max-width: 420px;
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.more-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.more-project-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: inherit;
  background: rgba(24, 20, 36, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-align: left;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.more-project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 154, 203, 0.48);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
}

.more-project-media {
  display: block;
  overflow: hidden;
  background: var(--bg-2);
}

.more-project-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.more-project-card:hover .more-project-media img {
  transform: scale(1.035);
}

.more-project-copy {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem 1rem;
}

.more-project-copy strong {
  color: var(--text);
  font-family: var(--font-head);
  font-size: 0.92rem;
}

.more-project-copy > span:not(.more-project-tags):not(.project-modal-data) {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.more-project-tags,
.project-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.more-project-tags i,
.project-modal-tags i {
  padding: 0.2rem 0.42rem;
  border: 1px solid rgba(154, 109, 222, 0.28);
  border-radius: 999px;
  color: var(--pink-soft);
  background: rgba(154, 109, 222, 0.08);
  font-size: 0.52rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

.project-modal-data {
  display: none;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 7, 16, 0.86);
  backdrop-filter: blur(12px);
}

.project-modal.is-open {
  display: flex;
}

.project-modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  gap: 1.35rem;
  width: min(980px, 94vw);
  max-height: 88vh;
  padding: 1rem;
  overflow: auto;
  border: 1px solid rgba(244, 154, 203, 0.3);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 8%, rgba(154, 109, 222, 0.15), transparent 30%),
    var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.project-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(12, 10, 23, 0.84);
  font-size: 1.25rem;
  cursor: pointer;
}

.project-modal-gallery {
  min-width: 0;
}

.project-modal-main {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: var(--bg-2);
  cursor: zoom-in;
}

.project-modal-main img {
  display: block;
  width: 100%;
  max-height: 58vh;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.project-modal-thumbs {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.project-modal-thumbs button {
  width: 84px;
  padding: 0.18rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-2);
  cursor: pointer;
}

.project-modal-thumbs button.is-active {
  border-color: var(--pink-soft);
}

.project-modal-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: contain;
}

.project-modal-copy {
  align-self: center;
  padding: 1rem 0.8rem 1rem 0;
}

.project-modal-copy h2 {
  margin: 0.8rem 0 0.35rem;
  font-family: "Caveat", var(--font-display);
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1;
}

.project-modal-copy .derby-role {
  margin: 0 0 0.75rem;
}

.project-modal-copy .derby-summary {
  margin: 0 0 1rem;
}

.project-modal-copy .derby-contribution .bullets {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .more-projects-head {
    display: block;
  }

  .more-projects-head > p {
    margin-top: 0.35rem;
    text-align: left;
  }

  .more-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-modal-panel {
    grid-template-columns: 1fr;
  }

  .project-modal-copy {
    padding: 0.25rem 0.35rem 0.5rem;
  }
}

@media (max-width: 500px) {
  .more-projects-grid {
    grid-template-columns: 1fr;
  }

  .project-modal {
    padding: 0.65rem;
  }

  .project-modal-panel {
    width: 100%;
    max-height: 92vh;
    padding: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-sparkles span,
  .closing-bubbles span { animation: none; }
}
