@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=EB+Garamond:wght@400;500;700&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {

  background:
    radial-gradient(circle at 20% 30%, rgba(120, 80, 255, 0.25), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(255, 80, 120, 0.15), transparent 60%),
    #0b0b12;

  background-attachment: fixed;

}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
/* ---------- INTRO MODE ---------- */
.intro-mode .header,
.intro-mode .top-tabs,
.intro-mode .content-area {
  display: none;
}

.intro-mode .switch-home {
  display: block;
}

.switch-home {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 2;
  background: transparent;
  color: #222;
}

/* ---------- TOP ---------- */

  .switch-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 34px 0;
  }
  
  .switch-home-title {
    font-family: "Cinzel", serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    text-align: right;
  }
  
  .switch-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: url("snom.png") center/cover no-repeat;
    box-shadow: 0 0 0 5px rgba(255,255,255,0.8);
    background-color: #ffffff;
  }
  
  .switch-status {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: system-ui, sans-serif;
    font-size: 1.15rem;
    color: #222;
  }
  
  .switch-dot.wifi {
    width: 16px;
    height: 12px;
    border-radius: 10px 10px 0 0;
    border: 2px solid #222;
    border-bottom: none;
    transform: scaleX(0.9);
  }
  
  .switch-battery {
    width: 30px;
    height: 15px;
    border: 2px solid #222;
    border-radius: 2px;
    position: relative;
  }
  
  .switch-battery::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 4px;
    width: 3px;
    height: 5px;
    background: #222;
    border-radius: 1px;
  }

/* ---------- BIG TILES ---------- */
.switch-main {
  min-height: calc(100vh - 215px);
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
}

.carousel-arrow {
    width: 68px;
    height: 68px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    color: #444;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,0.10);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
    justify-self: center;
  }
  
  .carousel-arrow:hover {
    transform: scale(1.08);
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(0,0,0,0.14);
  }

.hidden-arrow {
  opacity: 0;
  pointer-events: none;
}

.switch-row-wrap {
  width: 100%;
  overflow: hidden;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 24px;
  transition: transform 0.32s ease;
  will-change: transform;
}

.switch-card {
  flex: 0 0 auto;
  width: 300px;
  height: 300px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.switch-card-art {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.58);
  box-shadow: 0 14px 26px rgba(0,0,0,0.12);
  transform: scale(0.97);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.switch-card:hover .switch-card-art,
.switch-card.selected-home .switch-card-art {
  transform: scale(1);
  border-color: #fff;
  box-shadow:
    0 0 0 4px rgba(0,0,0,0.04),
    0 20px 34px rgba(0,0,0,0.16);
}

.switch-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.08) 56%, rgba(0,0,0,0));
}

.switch-card-overlay h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 2.35rem;
  line-height: 0.95;
  word-break: normal;
  overflow-wrap: normal;
}

.switch-card.experience .switch-card-overlay h2 {
  font-size: 2rem;
}

.switch-card-overlay p {
  margin: 0.75rem 0 0;
  font-size: 1.05rem;
  line-height: 1.08;
  font-family: system-ui, sans-serif;
  max-width: 90%;
}

.about-art {
  background:
    radial-gradient(circle at 55% 20%, rgba(255,255,255,0.22), rgba(255,255,255,0) 36%),
    linear-gradient(to bottom, #6b7898 0%, #34425c 55%, #121721 100%);
}

.projects-art {
  background:
    radial-gradient(circle at 30% 26%, rgba(160, 100, 255, 0.55), transparent 26%),
    radial-gradient(circle at 70% 60%, rgba(255, 90, 140, 0.50), transparent 26%),
    radial-gradient(circle at 54% 78%, rgba(255, 170, 60, 0.45), transparent 24%),
    linear-gradient(135deg, #2b1032 0%, #63203c 38%, #1a1430 70%, #0e0b18 100%);
}

.experience-art {
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.10), transparent 28%),
    linear-gradient(to bottom, #7a34d8 0%, #a34ad6 60%, #d0609d 100%);
}

.physics-art {
  background:
    radial-gradient(circle at 50% 30%, rgba(120,180,255,0.18), transparent 24%),
    linear-gradient(to bottom, #314ea5 0%, #18316b 54%, #071126 100%);
}

/* ---------- BOTTOM ICONS ---------- */
.switch-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  padding: 0 54px;
}

.switch-icons {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 16px;
}

.home-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #f7f7f7;
  display: grid;
  place-items: center;
  font-size: 1.85rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  border: 2px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.home-icon.active {
  outline: 6px solid #38c8db;
}

.star-icon { background: #fff8d8; color: #e0ac1d; }
.flask-icon { background: #e8f8ff; color: #3698d9; }
.controller-icon { background: #ececec; }
.gear-icon { background: #ececec; color: #6e6e6e; }
.power-icon { background: #f4f4f4; color: #222; }

.switch-selected-label {
  font-family: system-ui, sans-serif;
  font-size: 1.3rem;
  color: #4fb9c7;
  border-bottom: 2px solid rgba(0,0,0,0.18);
  padding-bottom: 10px;
}

/* ---------- FULL PAGE VIEW ---------- */
.header {
  text-align: center;
  padding: 26px 16px 12px;
  position: relative;
  z-index: 2;
}

.header h1 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 3rem;
  font-weight: 700;
  color: #f7f7f2;
}

.header p {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  color: rgba(245,245,240,0.9);
}

.top-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 16px 20px;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10,10,18,0.4);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  cursor: pointer;
}

.active-tab {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.16);
}

.content-area {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 40px;
  position: relative;
  z-index: 2;
}

.section {
  display: none;
  margin-top: 20px;
  padding: 24px 26px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 14px 36px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.section.active {
  display: block;
}

.section h2 {
  margin-top: 0;
  font-family: "Cinzel", serif;
  font-size: 2.2rem;
}

.section p {
  font-size: 1.22rem;
  line-height: 1.55;
}

/* ---------- ABOUT ---------- */
body.theme-about {
  background: none !important;
  position: relative;
}

body.theme-about::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background:
    linear-gradient(
      to bottom,
      rgba(8, 10, 18, 0.42) 0%,
      rgba(8, 10, 18, 0.30) 22%,
      rgba(8, 10, 18, 0.22) 46%,
      rgba(8, 10, 18, 0.36) 72%,
      rgba(0, 0, 0, 0.62) 100%
    ),
    url("Personal_website_images/knight_bg.png") center / cover no-repeat;

  filter: blur(1.5px) brightness(0.62);
  transform: scale(1.03);
}

.mist-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.theme-about .mist-layer {
  opacity: 0.35;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(255,255,255,0.08) 0%,
      rgba(255,255,255,0.03) 22%,
      rgba(255,255,255,0) 46%
    );
  filter: blur(10px);
}

body.theme-about .void-base {
  opacity: 0.55;
  background:
    radial-gradient(
      ellipse at 50% 100%,
      rgba(0,0,0,0.82) 0%,
      rgba(0,0,0,0.68) 24%,
      rgba(0,0,0,0.38) 52%,
      rgba(0,0,0,0.10) 78%,
      rgba(0,0,0,0) 100%
    );
  filter: blur(10px);
}



#particle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: none;
  overflow: hidden;
}

body.theme-about #particle-field {
  opacity: 1;
}

.void-particle {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  animation: floatUp linear forwards;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: inherit;
  }
  100% {
    transform: translateY(-115vh) translateX(var(--drift-x, 0px));
    opacity: 0;
  }
}

.decor-snom,
.decor-knight {
  position: fixed;
  pointer-events: none;
  z-index: 3;
}

.decor-snom {
  top: 18px;
  left: 18px;
  width: 120px;
}

.decor-knight {
  right: 34px;
  bottom: 20px;
  width: 230px;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.theme-about .decor-knight { opacity: 1; }



/* ---------- PROJECTS ---------- */
.balatro-bounce-zone {
  position: absolute;
  left: 0;
  width: 100%;
  top: 0;
  height: 20%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.balatro-joker-bg {
  position: absolute;
  left: 40px;
  top: 40px;
  width: 95px;
  opacity: 0.45;
  pointer-events: none;
  z-index: 1;
  filter:
    drop-shadow(0 8px 18px rgba(0,0,0,0.35))
    drop-shadow(0 0 10px rgba(173, 96, 255, 0.18));
  image-rendering: pixelated;
}


.project-hand {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

body.theme-projects {
    background: #09080d;
  }
  
  .balatro-fluid {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
    overflow: hidden;
  }
  #projects {
    position: relative;
    overflow: visible;
  }
  body.theme-projects .balatro-fluid {
    opacity: 1;
  }
  
  #balatro-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
  }
  
  .balatro-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at center, rgba(0,0,0,0) 30%, rgba(0,0,0,0.12) 70%, rgba(0,0,0,0.28) 100%);
  }


  .project-table {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.10);
    background:
      linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(255,255,255,0.00)),
      rgba(18, 14, 28, 0.36);
    padding: 32px 24px 28px;
    position: relative;
  overflow: visible;
  }

.deck-stack {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 116px;
  height: 150px;
}

.deck-card {
  position: absolute;
  width: 92px;
  height: 128px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.22);
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 28%, rgba(0,0,0,0) 52%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0px, rgba(255,255,255,0.08) 6px, rgba(0,0,0,0) 6px, rgba(0,0,0,0) 12px),
    linear-gradient(to bottom, #4d1f77 0%, #2a123f 100%);
  box-shadow: 0 10px 18px rgba(0,0,0,0.24);
}

.back-1 { left: 0; top: 16px; transform: rotate(-8deg); }
.back-2 { left: 8px; top: 8px; transform: rotate(-3deg); }
.back-3 { left: 16px; top: 0; transform: rotate(2deg); }



.project-card-inner {
  position: relative;
  padding: 54px 22px 28px 22px;
  height: 100%;
}

.project-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  line-height: 1.15;
  color: #111;
}

.project-card p {
  line-height: 1.45;
  font-size: 0.98rem;
  color: #1a1a1a;
}

.card-tag {
  display: inline-block;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(0,0,0,0.18);
  background: #e8e8ef;
  color: #222;
}


.deal-in {
  animation: dealCard 0.9s cubic-bezier(.2,.8,.2,1) forwards;
}

@keyframes dealCard {
  0% {
    transform: translateY(-18px) rotate(var(--base-rot, 0deg)) scale(0.96);
    opacity: 0;
  }
  100% {
    transform: rotate(var(--base-rot, 0deg)) scale(1);
    opacity: 1;
  }
}

/* ---------- EXPERIENCE ---------- */
body.theme-experience {
  background: none !important;
  position: relative;
}

body.theme-experience::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;

  background: url("Personal_website_images/smash_background.png") center / cover no-repeat;

  filter: blur(8px) brightness(0.75);
  transform: scale(1.1);

  pointer-events: none;
}


.smash-select-screen {
  margin-top: 18px;
  border: 4px solid #111;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,0.05), rgba(255,255,255,0) 20%),
    linear-gradient(to bottom, #06070c 0%, #0c0f18 100%);
  box-shadow: 0 18px 36px rgba(0,0,0,0.32);
}

.select-topbar {
  height: 54px;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  background: linear-gradient(to right, #9a0d12 0%, #d21118 40%, #a1080d 100%);
  border-bottom: 4px solid #111;
}

.select-back,
.select-corner {
  display: grid;
  place-items: center;
  height: 100%;
  color: white;
  font-weight: 700;
  font-family: system-ui, sans-serif;
}

.select-title {
  justify-self: center;
  background: #f5dd20;
  color: #111;
  font-family: system-ui, sans-serif;
  font-weight: 800;
  padding: 7px 24px;
  border-radius: 0 0 10px 10px;
  border: 3px solid #111;
  border-top: none;
  font-size: 1.1rem;
}

.fighter-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  background:
    linear-gradient(to bottom, rgba(40,60,120,0.20), rgba(0,0,0,0.0)),
    #0b111a;
  border-bottom: 4px solid #111;
}

.fighter-card {
  position: relative;
  min-height: 104px;
  border: 3px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 42%),
    linear-gradient(to bottom, #4d8cf7 0%, #13233d 100%);
  box-shadow: inset 0 -30px 50px rgba(0,0,0,0.30);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.fighter-card:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0) 42%),
    linear-gradient(to bottom, #f79ae1 0%, #2c1027 100%);
}

.fighter-card:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%),
    linear-gradient(to bottom, #ffdb58 0%, #494109 100%);
}

.fighter-card:nth-child(4) {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%),
    linear-gradient(to bottom, #86f48f 0%, #17361a 100%);
}

.fighter-card:nth-child(5) {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%),
    linear-gradient(to bottom, #bb7cff 0%, #28133a 100%);
}

.fighter-card:nth-child(6) {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%),
    linear-gradient(to bottom, #ffb160 0%, #3a1d09 100%);
}

.fighter-card:nth-child(7) {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%),
    linear-gradient(to bottom, #6df5ff 0%, #0f2c31 100%);
}

.fighter-card:nth-child(8) {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%),
    linear-gradient(to bottom, #ff88cb 0%, #391428 100%);
}

.fighter-card:hover,
.fighter-card.active-fighter,
.fighter-card.smash-hovered {
  transform: scale(1.03);
  border-color: rgba(255,255,255,0.98);
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.14),
    inset 0 -30px 50px rgba(0,0,0,0.30);
}

.fighter-name {
  position: absolute;
  left: 10px;
  bottom: 8px;
  color: white;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 0.95;
  text-shadow:
    2px 2px 0 rgba(0,0,0,0.55),
    0 0 8px rgba(0,0,0,0.22);
}

.fighter-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  color: white;
  border: 2px solid rgba(255,255,255,0.8);
}

.fighter-badge.p1 {
  background: #e11927;
}

.fighter-badge.p2 {
  background: #2d78ff;
}

.versus-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 4px solid #111;
}

.player-panel {
  min-height: 250px;
  display: grid;
  grid-template-columns: 180px 1fr;
  position: relative;
  overflow: hidden;
}

.player-one {
  background:
    linear-gradient(120deg, #e4202b 0%, #ff4450 50%, #a20c13 100%);
  border-right: 4px solid #111;
}

.player-two {
  background:
    linear-gradient(120deg, #4aa0ff 0%, #74b4ff 50%, #2153c3 100%);
}

.player-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 34%);
  pointer-events: none;
}

.panel-portrait {
  display: grid;
  place-items: center;
  font-family: "Cinzel", serif;
  font-size: 3.2rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

.portrait-red {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 34%),
    linear-gradient(to bottom, #ff6f76 0%, #be1e29 100%);
}

.portrait-blue {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 34%),
    linear-gradient(to bottom, #82c0ff 0%, #2665d4 100%);
}

.panel-info {
  padding: 22px 18px 18px;
  color: white;
  position: relative;
  z-index: 1;
}

.panel-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-name {
  font-family: "Cinzel", serif;
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}

.panel-role {
  margin-top: 10px;
  display: inline-block;
  background: rgba(255,255,255,0.78);
  color: #111;
  border: 2px solid rgba(0,0,0,0.30);
  padding: 6px 12px;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.panel-tag {
  margin-top: 12px;
  width: 56px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: white;
  border: 2px solid rgba(255,255,255,0.8);
}

.p1-tag {
  background: #d91624;
}

.p2-tag {
  background: #2c73ff;
}

.panel-desc {
  margin-top: 14px;
  font-size: 1.08rem;
  line-height: 1.32;
  max-width: 90%;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

/* ---------- PHYSICS ---------- */
body.theme-physics {
  background:
    radial-gradient(circle at 50% 18%, rgba(120,180,255,0.14), transparent 16%),
    radial-gradient(circle at 18% 22%, rgba(120, 90, 255, 0.10), transparent 22%),
    radial-gradient(circle at 82% 30%, rgba(80, 170, 255, 0.12), transparent 24%),
    linear-gradient(to bottom, #02040a 0%, #07101c 38%, #010309 100%);
}

.physics-space {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  overflow: hidden;
}

body.theme-physics .physics-space {
  opacity: 1;
}

/* nebula layers */
.space-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.32;
  pointer-events: none;
}

.nebula-a {
  width: 520px;
  height: 520px;
  left: -120px;
  top: 40px;
  background:
    radial-gradient(circle, rgba(120, 110, 255, 0.30) 0%, rgba(120,110,255,0.12) 38%, rgba(120,110,255,0) 72%);
}

.nebula-b {
  width: 620px;
  height: 620px;
  right: -180px;
  top: 120px;
  background:
    radial-gradient(circle, rgba(90, 190, 255, 0.28) 0%, rgba(90,190,255,0.10) 40%, rgba(90,190,255,0) 74%);
}

/* extra deep-space vignette */
.physics-space::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(0,0,0,0) 38%, rgba(0,0,0,0.22) 72%, rgba(0,0,0,0.52) 100%);
}

/* distant earth / planet */
.distant-earth {
  position: absolute;
  right: 8%;
  bottom: 8%;
  width: 220px;
  height: 220px;
  opacity: 0.82;
  pointer-events: none;
}

.earth-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120,190,255,0.16), rgba(120,190,255,0.04) 45%, rgba(120,190,255,0) 72%);
  filter: blur(18px);
}

.earth-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 30%, rgba(170,220,255,0.9), rgba(80,130,220,0.95) 42%, rgba(14,40,110,1) 78%, rgba(4,10,30,1) 100%);
  box-shadow:
    inset -24px -18px 30px rgba(0,0,0,0.42),
    0 0 20px rgba(120,190,255,0.12);
}

.earth-cloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  filter: blur(8px);
}

.earth-cloud-1 {
  width: 90px;
  height: 36px;
  left: 26px;
  top: 44px;
}

.earth-cloud-2 {
  width: 70px;
  height: 28px;
  right: 34px;
  bottom: 54px;
}

/* stars */
.space-stars {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
}

.stars-back {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.45) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 28%, rgba(170,210,255,0.40) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,0.45) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 42%, rgba(170,210,255,0.40) 0 1px, transparent 2px),
    radial-gradient(circle at 56% 80%, rgba(255,255,255,0.35) 0 1px, transparent 2px);
  opacity: 0.34;
  animation: driftBack 12s linear infinite;
}

.stars-mid {
  background-image:
    radial-gradient(circle at 16% 46%, rgba(255,255,255,0.75) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 46% 22%, rgba(170,210,255,0.75) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 68% 36%, rgba(255,255,255,0.75) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 90% 64%, rgba(170,210,255,0.75) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 24% 70%, rgba(200,230,255,0.65) 0 1.4px, transparent 2.4px);
  opacity: 0.48;
  animation: driftMid 7s linear infinite;
}

.stars-front {
  background-image:
    radial-gradient(circle at 8% 74%, rgba(255,255,255,1) 0 2px, transparent 3px),
    radial-gradient(circle at 28% 58%, rgba(210,230,255,1) 0 2px, transparent 3px),
    radial-gradient(circle at 54% 78%, rgba(255,255,255,1) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 64%, rgba(210,230,255,1) 0 2px, transparent 3px),
    radial-gradient(circle at 62% 18%, rgba(255,255,255,0.95) 0 2px, transparent 3px);
  opacity: 0.82;
  animation: driftFront 3.5s linear infinite;
}

@keyframes driftBack {
  0% { transform: translateY(0px); }
  100% { transform: translateY(18px); }
}

@keyframes driftMid {
  0% { transform: translateY(0px); }
  100% { transform: translateY(34px); }
}

@keyframes driftFront {
  0% { transform: translateY(0px); }
  100% { transform: translateY(62px); }
}


/* ---------- TRANSITIONS ---------- */
.screen-wipe-bar {
  position: fixed;
  top: 0;
  left: -120vw;
  width: 120vw;
  height: 100vh;
  background: black;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

.screen-wipe-bar.play {
  opacity: 1;
  animation: wipeBar 1.05s cubic-bezier(0.22,0.8,0.2,1) forwards;
}

@keyframes wipeBar {
  0% { left: -120vw; }
  32% { left: 0vw; }
  52% { left: 0vw; }
  100% { left: 120vw; }
}

.screen-shockwave {
  position: fixed;
  top: 50%;
  right: 0;
  width: 64px;
  height: 64px;
  transform: translate(50%, -50%) scale(0.08);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.95) 8%, rgba(255,255,255,0) 15%),
    radial-gradient(circle, rgba(255,60,60,0.72) 0%, rgba(255,60,60,0.28) 18%, rgba(255,60,60,0) 34%),
    radial-gradient(circle, rgba(255,160,60,0.66) 0%, rgba(255,160,60,0.26) 24%, rgba(255,160,60,0) 40%),
    radial-gradient(circle, rgba(255,240,120,0.62) 0%, rgba(255,240,120,0.24) 30%, rgba(255,240,120,0) 46%),
    radial-gradient(circle, rgba(120,220,255,0.60) 0%, rgba(120,220,255,0.24) 36%, rgba(120,220,255,0) 56%),
    radial-gradient(circle, rgba(160,120,255,0.58) 0%, rgba(160,120,255,0.22) 42%, rgba(160,120,255,0) 64%);
  opacity: 0;
  z-index: 10000;
  pointer-events: none;
  filter: blur(0.5px);
}

.screen-shockwave.play {
  animation: shockImpact 0.58s ease-out forwards;
}

@keyframes shockImpact {
  0% {
    opacity: 0;
    transform: translate(50%, -50%) scale(0.08);
  }
  8% {
    opacity: 1;
    transform: translate(50%, -50%) scale(1.1);
  }
  28% {
    opacity: 0.95;
    transform: translate(50%, -50%) scale(18);
  }
  100% {
    opacity: 0;
    transform: translate(50%, -50%) scale(72);
  }
}

.screen-shake {
  animation: screenShake 0.42s ease;
}

@keyframes screenShake {
  0% { transform: translate(0, 0); }
  12% { transform: translate(-9px, 4px); }
  24% { transform: translate(8px, -6px); }
  36% { transform: translate(-7px, 7px); }
  48% { transform: translate(6px, 3px); }
  60% { transform: translate(-5px, -4px); }
  72% { transform: translate(4px, 2px); }
  84% { transform: translate(-2px, -2px); }
  100% { transform: translate(0, 0); }
}

/* ---------- TAB SWITCH TRANSITIONS ---------- */
.theme-transition {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15000;
  opacity: 0;
}

.theme-transition-black {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
}

.hk-slash,
.card-wipe,
.space-wipe-ship {
  position: absolute;
  opacity: 0;
}

.hk-slash {
  left: 50%;
  top: 50%;
  width: 0;
  height: 12px;
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1) 20%, rgba(255,255,255,1) 80%, rgba(255,255,255,0));
  transform: translate(-50%, -50%) rotate(-12deg);
  box-shadow:
    0 0 18px rgba(255,255,255,0.95),
    0 0 48px rgba(255,255,255,0.45);
  border-radius: 999px;
}




.card-wipe {
  position: absolute;
  top: 50%;
  left: -28vw;
  width: 22vw;
  max-width: 300px;
  min-width: 160px;
  transform: translateY(-50%) rotate(-18deg);
  opacity: 0;
  z-index: 16000;
  pointer-events: none;
}

.polaroid-real {
  display: block;
  width: 100%;
  height: auto;
}
  


.space-wipe-ship {
  top: 50%;
  left: -200px;
  width: 180px;
  height: 90px;
  transform: translateY(-50%);
}

.space-wipe-body {
  position: absolute;
  right: 0;
  top: 50%;
  width: 120px;
  height: 56px;
  transform: translateY(-50%);
  background: linear-gradient(to bottom, #dff0ff 0%, #8fc1ff 34%, #4973d9 68%, #17306a 100%);
  clip-path: polygon(0 52%, 22% 18%, 56% 0, 100% 32%, 76% 60%, 100% 84%, 46% 100%, 18% 76%);
  box-shadow:
    0 0 18px rgba(120,180,255,0.45),
    inset 0 0 10px rgba(255,255,255,0.12);
}

.space-wipe-body::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 16px;
  height: 18px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #ffffff 0%, #8fe2ff 100%);
  border-radius: 8px 8px 6px 6px;
  box-shadow: 0 0 10px rgba(180,230,255,0.5);
}

.space-wipe-trail {
  position: absolute;
  left: 0;
  top: 50%;
  width: 110px;
  height: 18px;
  transform: translateY(-50%);
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(140,205,255,0.35), rgba(235,248,255,0.95));
  filter: blur(4px);
  border-radius: 999px;
}

.theme-transition.play-about,
.theme-transition.play-experience,
.theme-transition.play-personal,
.theme-transition.play-physics {
  opacity: 1;
}

/* about */
.theme-transition.play-about .theme-transition-black {
  animation: aboutBlack 0.72s ease forwards;
}

.theme-transition.play-about .hk-slash {
  animation: aboutSlash 0.72s ease forwards;
}

@keyframes aboutBlack {
  0% { opacity: 0; }
  15% { opacity: 0.9; }
  48% { opacity: 0.96; }
  100% { opacity: 0; }
}

@keyframes aboutSlash {
  0% {
    opacity: 0;
    width: 0;
    height: 10px;
  }
  22% {
    opacity: 0;
    width: 0;
    height: 10px;
  }
  36% {
    opacity: 1;
    width: 220px;
    height: 12px;
  }
  58% {
    opacity: 1;
    width: 160vw;
    height: 18px;
  }
  100% {
    opacity: 0;
    width: 190vw;
    height: 28px;
  }
}

/* smash */
.smashball-wrap {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 220px;
    height: 220px;
    transform: translate(-50%, -50%) scale(0.12);
    opacity: 0;
    z-index: 16001;
  }



  
  .play-experience .smashball-burst {
    animation: smashExplode 0.5s ease-out forwards;
  }
  
  @keyframes smashExplode {
    0% {
      opacity: 1;
      transform: scale(0.6);
    }
  
    40% {
      opacity: 1;
      transform: scale(1.8);
      background:
        radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,220,120,0.8) 40%, rgba(255,200,80,0.3) 70%, transparent 100%);
    }
  
    100% {
      opacity: 0;
      transform: scale(2.4);
    }
  }
  .theme-transition.play-experience .smashball-wrap {
    animation: smashBallAppearClean 1s ease forwards;
  }
  
  @keyframes smashBallAppearClean {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.08) rotate(-10deg);
    }
    15% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.75) rotate(0deg);
    }
    45% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    75% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.18) rotate(2deg);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.55) rotate(6deg);
    }
  }

/* projects */
.theme-transition.play-personal .card-wipe {
  animation: cardPass 0.74s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardPass {
  0% {
    transform: translate(-28vw, -50%) rotate(-18deg) scale(0.9);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    transform: translate(120vw, -50%) rotate(-6deg) scale(1);
    opacity: 1;
  }
}

/* physics */
.theme-transition.play-physics .theme-transition-black {
  animation: physicsBlack 0.8s ease forwards;
}

.theme-transition.play-physics .space-wipe-ship {
  animation: physicsShipFly 0.8s ease forwards;
}

@keyframes physicsBlack {
  0% { opacity: 0; }
  15% { opacity: 0.92; }
  52% { opacity: 0.95; }
  100% { opacity: 0; }
}

@keyframes physicsShipFly {
  0% {
    opacity: 0;
    left: -220px;
  }
  18% {
    opacity: 1;
    left: 10vw;
  }
  56% {
    opacity: 1;
    left: 54vw;
  }
  100% {
    opacity: 0;
    left: calc(100vw + 120px);
  }
}

/* ---------- BALATRO CURSOR SUITS ---------- */
.suit-trail-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1200;
}

.suit-trail {
  position: fixed;
  left: 0;
  top: 0;
  font-size: 1.35rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  animation: suitFloat 0.85s ease-out forwards;
  text-shadow:
    0 0 8px rgba(255,255,255,0.2),
    0 0 18px rgba(0,0,0,0.18);
}

.suit-heart,
.suit-diamond {
  color: #ff5a7a;
}

.suit-spade,
.suit-club {
  color: #ffffff;
}

@keyframes suitFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -78px) scale(0.9) rotate(8deg);
  }
}

@media (max-width: 1400px) {
  .switch-card {
    width: 260px;
    height: 260px;
  }

  .switch-card-overlay h2 {
    font-size: 2rem;
  }

  .switch-card.experience .switch-card-overlay h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 1100px) {
  .switch-main {
    grid-template-columns: 64px minmax(0, 1fr) 64px;
  }

  .carousel-arrow {
    width: 58px;
    height: 58px;
    font-size: 2.4rem;
  }

  .switch-card {
    width: 220px;
    height: 220px;
  }

  .switch-card-overlay h2 {
    font-size: 1.7rem;
  }

  .switch-card.experience .switch-card-overlay h2 {
    font-size: 1.45rem;
  }

  .switch-card-overlay p {
    font-size: 0.92rem;
  }

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

  .versus-panels {
    grid-template-columns: 1fr;
  }

  .player-one {
    border-right: none;
    border-bottom: 4px solid #111;
  }
}

@media (max-width: 800px) {
  .switch-main {
    gap: 8px;
    padding: 0 8px;
  }

  .switch-card {
    width: 170px;
    height: 170px;
  }

  .switch-card-overlay h2 {
    font-size: 1.35rem;
  }

  .switch-card.experience .switch-card-overlay h2 {
    font-size: 1.18rem;
  }

  .switch-card-overlay p {
    font-size: 0.8rem;
  }

  .switch-icons {
    gap: 12px;
  }

  .home-icon {
    width: 58px;
    height: 58px;
    font-size: 1.4rem;
  }

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

@media (max-width: 620px) {
  .switch-topbar {
    padding-inline: 18px;
  }

  .switch-main {
    grid-template-columns: 50px minmax(0, 1fr) 50px;
  }

  .carousel-arrow {
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
  }

  .switch-card {
    width: 145px;
    height: 145px;
  }

  .switch-card-overlay {
    padding: 12px;
  }

  .switch-card-overlay h2 {
    font-size: 1.1rem;
  }

  .switch-card.experience .switch-card-overlay h2 {
    font-size: 1rem;
  }

  .switch-card-overlay p {
    font-size: 0.74rem;
  }

  .switch-icons {
    gap: 10px;
  }

  .home-icon {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .switch-bottom {
    padding-inline: 18px;
  }

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

  .player-panel {
    grid-template-columns: 110px 1fr;
  }

  .panel-name {
    font-size: 1.7rem;
  }

  .panel-desc {
    font-size: 0.95rem;
  }
}




 /* ===== FINAL IMAGE / THEME OVERRIDES ===== */

.switch-avatar {
    background: url("Personal_website_images/snom.png") center/cover no-repeat !important;
    background-color: #ffffff !important;
  }
  
  .decor-snom {
    display: none !important;
  }
  
  .oski-icon,
  .poke-icon,
  .star-icon {
    background: #f7f7f7 !important;
  }
  
  .nav-icon-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
    transition: transform 0.2s ease;
  }
  
  .home-icon:hover .nav-icon-img {
    transform: scale(1.12);
  }
  
  .oski-face,
  .pokeball,
  .poke-center {
    display: none !important;
  }
  
  .decor-knight {
    position: fixed;
    right: 34px;
    bottom: 20px;
    width: 230px;
    opacity: 0 !important;
    transition: opacity 0.35s ease;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35));
    pointer-events: none;
    z-index: 3;
  }
  
  body.theme-about .decor-knight {
    opacity: 0.22 !important;
  }
  
  body.theme-personal {
    background:
      radial-gradient(circle at 50% 20%, rgba(255,255,255,0.10), transparent 18%),
      radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08), transparent 10%),
      radial-gradient(circle at 75% 40%, rgba(255,255,255,0.06), transparent 8%),
      linear-gradient(to bottom, #7b2cff 0%, #5e1dff 45%, #3f0eb3 100%) !important;
  }
  
  body.theme-personal::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
    background-image:
      radial-gradient(circle, rgba(255,255,255,0.95) 0 1px, transparent 2px),
      radial-gradient(circle, rgba(255,255,255,0.9) 0 1.5px, transparent 2.5px),
      radial-gradient(circle, rgba(255,255,255,0.9) 0 1px, transparent 2px),
      radial-gradient(circle, rgba(255,255,255,0.85) 0 1.2px, transparent 2.2px);
    background-size: 120px 120px, 180px 180px, 240px 240px, 320px 320px;
    background-position: 0 0, 40px 80px, 100px 30px, 160px 140px;
  }
  
  .personal-section {
    background:
      linear-gradient(to bottom, rgba(40,20,14,0.66), rgba(14,8,8,0.78)),
      rgba(0,0,0,0.28) !important;
  }
  
  .personal-gallery {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
  }
  
  .art-card {
    width: 220px;
    background: #f7f7f7;
    border-radius: 10px;
    padding: 12px 12px 42px;
    box-shadow:
      0 12px 28px rgba(0,0,0,0.28),
      0 0 0 1px rgba(0,0,0,0.05);
    transform: rotate(-2deg);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    position: relative;
  }
  
  .art-card:nth-child(2) {
    transform: rotate(1.5deg);
  }
  
  .art-card:nth-child(3) {
    transform: rotate(-1deg);
  }
  
  .art-card:hover {
    transform: translateY(-8px) scale(1.03) rotate(0deg);
    box-shadow:
      0 18px 38px rgba(0,0,0,0.35),
      0 0 0 1px rgba(0,0,0,0.05);
  }
  
  .art-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
  }
  
  .art-card::after {
    content: "Headspace";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    text-align: center;
    color: #666;
    font-family: "EB Garamond", serif;
    font-size: 1rem;
  }
  
  .personal-panel::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 2px solid rgba(255,240,210,0.05);
    border-radius: 16px;
    pointer-events: none;
  }
  .personal-intro {
    max-width: 760px;
    margin-bottom: 26px;
    color: rgba(255,255,255,0.92) !important;
    text-shadow: 0 2px 10px rgba(40, 10, 90, 0.28);
  }
  
  .personal-gallery {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 22px;
    align-items: start;
  }
  
  .isaac-card {
    position: relative;
    min-height: 320px;
    padding: 22px 18px 18px;
    border-radius: 10px;
    background: linear-gradient(to bottom, #dfcfab 0%, #c7b186 100%) !important;
    color: #2a1a12 !important;
    box-shadow:
      0 14px 24px rgba(0,0,0,0.28),
      inset 0 1px 0 rgba(255,255,255,0.35) !important;
    border: 1px solid rgba(70,40,20,0.18) !important;
    transform: rotate(-1.2deg);
  }
  
  .isaac-card:nth-child(2) { transform: rotate(1.4deg); }
  .isaac-card:nth-child(3) { transform: rotate(-0.6deg); }
  
  .note-card {
    min-height: 220px;
    transform: rotate(1deg);
  }
  
  .featured-card {
    grid-row: span 2;
    min-height: 560px;
  }
  
  .pin {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 18px;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.22);
    border: 2px solid rgba(255,255,255,0.35);
  }
  
  .pin-red { background: #b13a32; }
  .pin-blue { background: #4770a8; }
  .pin-yellow { background: #d2ab39; }
  .pin-dark { background: #51453a; }
  
  .card-scribble {
    position: absolute;
    pointer-events: none;
    opacity: 0.18;
    border-radius: 999px;
    border: 2px solid rgba(60,30,20,0.55);
  }
  
  .scribble-1 {
    width: 54px;
    height: 18px;
    top: 24px;
    right: 18px;
    transform: rotate(12deg);
  }
  
  .scribble-2 {
    width: 44px;
    height: 16px;
    top: 20px;
    left: 18px;
    transform: rotate(-10deg);
  }
  
  .scribble-3 {
    width: 34px;
    height: 14px;
    top: 22px;
    right: 24px;
    transform: rotate(20deg);
  }
  
  .paper-hole {
    position: absolute;
    left: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(70,45,28,0.28);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.22);
  }
  
  .hole-1 { top: 42px; }
  .hole-2 { top: 66px; }
  
  .art-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-top: 16px;
    border-radius: 8px;
    padding: 10px;
    background: linear-gradient(to bottom, #7c6247 0%, #4f3b2a 100%) !important;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.28);
  }
  
  .art-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    border: 2px dashed rgba(255,245,220,0.34);
    display: grid;
    place-items: center;
    font-family: "Cinzel", serif;
    font-size: 1.2rem;
    color: rgba(255,240,220,0.76) !important;
    background:
      radial-gradient(circle at 50% 40%, rgba(255,240,210,0.08), rgba(255,240,210,0) 36%),
      linear-gradient(to bottom, #2a1b16 0%, #140d0b 100%) !important;
  }
  
  .card-note {
    margin-top: 16px;
  }
  
  .card-note h3 {
    margin: 0 0 8px;
    font-family: "Cinzel", serif;
    font-size: 1.35rem;
    color: #2a1a12 !important;
  }
  
  .card-note p,
  .personal-list li {
    color: rgba(40,24,16,0.92) !important;
  }
  
  .big-note {
    margin-top: 24px;
  }
  
  .personal-list {
    margin: 10px 0 0;
    padding-left: 20px;
  }
  
  


 /* ---------- PERSONAL POLAROID PRINT ---------- */


 .personal-bottom.personal-isaac {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.isaac-board {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.isaac-card {
  position: relative;
  min-height: 240px;
  padding: 22px 18px 18px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #dfcfab 0%, #c7b186 100%);
  color: #2a1a12;
  box-shadow:
    0 14px 24px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.35);
  border: 1px solid rgba(70,40,20,0.18);
}

.featured-card {
  min-height: 320px;
  transform: rotate(-1.2deg);
}

.note-card:nth-child(2) {
  transform: rotate(1.4deg);
}

.note-card:nth-child(3) {
  transform: rotate(-0.6deg);
}
@media (max-width: 900px) {
  .balatro-feature-overlay {
    max-width: 100%;
    padding-right: 28px;
  }

  .balatro-feature-card img {
    position: static;
    display: block;
    margin: 22px auto 0;
    transform: rotate(-4deg);
    width: 150px;
  }

  .isaac-board {
    grid-template-columns: 1fr;
  }
}
.pin {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.22);
  border: 2px solid rgba(255,255,255,0.35);
}

.pin-red { background: #b13a32; }
.pin-blue { background: #4770a8; }
.pin-yellow { background: #d2ab39; }

.card-note h3 {
  margin: 10px 0 8px;
  font-family: "Cinzel", serif;
  font-size: 1.35rem;
  color: #2a1a12;
}

.card-note p {
  margin: 0;
  color: rgba(40,24,16,0.92);
  line-height: 1.5;
}

 .personal-panel {
  position: relative;
  overflow: hidden;
}

.personal-top.personal-balatro {
  position: relative;
  padding: 12px 0 28px;
}

.balatro-personal-showcase {
  margin-top: 18px;
}

.balatro-feature-card {
  position: relative;
  min-height: 280px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 24%),
    linear-gradient(135deg, rgba(70,20,90,0.88), rgba(25,10,40,0.92));
  box-shadow:
    0 18px 34px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.balatro-feature-card img {
  position: absolute;
  right: 28px;
  top: 50%;
  width: 180px;
  transform: translateY(-50%) rotate(-6deg);
  image-rendering: pixelated;
  opacity: 0.95;
  filter:
    drop-shadow(0 12px 20px rgba(0,0,0,0.38))
    drop-shadow(0 0 16px rgba(162, 90, 255, 0.18));
}

.balatro-feature-overlay {
  position: relative;
  z-index: 2;
  max-width: 58%;
  padding: 30px 28px;
}

.balatro-feature-overlay h3 {
  margin: 0 0 10px;
  font-family: "Cinzel", serif;
  font-size: 2rem;
  color: #fff4e8;
}

.balatro-feature-overlay p {
  margin: 0;
  color: rgba(255,245,235,0.9);
  font-size: 1.08rem;
  line-height: 1.5;
}

.flash-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 20000;
    opacity: 0;
  }
  
  .flash-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at center, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.10) 24%, rgba(0,0,0,0.35) 100%);
    opacity: 0;
  }
  
  .flash-overlay::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 220px;
    height: 270px;
    transform: translate(-50%, -80%) scale(0.72);
    border-radius: 8px;
    background:
      linear-gradient(to bottom,
        #f6f1e8 0%,
        #f6f1e8 72%,
        #ece4d8 72%,
        #ece4d8 100%);
    box-shadow:
      0 18px 40px rgba(0,0,0,0.38),
      0 2px 0 rgba(255,255,255,0.5) inset;
    opacity: 0;
  }
  
  .flash-overlay.play {
    animation: polaroidOverlay 1s ease forwards;
  }
  
  .flash-overlay.play::before {
    animation: shutterSnap 1s ease forwards;
  }
  
  .flash-overlay.play::after {
    animation: polaroidDrop 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
  
  @keyframes shutterSnap {
    0% { opacity: 0; }
    8% { opacity: 0.95; }
    16% { opacity: 0.08; }
    100% { opacity: 0; }
  }
  
  @keyframes polaroidOverlay {
    0% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
  }
  
  @keyframes polaroidDrop {
    0% {
      opacity: 0;
      transform: translate(-50%, -120%) scale(0.7) rotate(-6deg);
      filter: brightness(1.1);
    }
    18% {
      opacity: 1;
      transform: translate(-50%, -58%) scale(0.92) rotate(-2deg);
    }
    38% {
      opacity: 1;
      transform: translate(-50%, -42%) scale(1) rotate(1deg);
    }
    60% {
      opacity: 1;
      transform: translate(-50%, -34%) scale(1) rotate(0deg);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -26%) scale(1.03) rotate(0deg);
    }
  }
  
  .smashball-real {
    width: 140px;
    height: 140px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 3;
  
    /* REMOVE old glow */
    filter: none;
  
    animation: smashPulse 0.9s ease-in-out infinite alternate;
  }
  
  @keyframes smashPulse {
    0% {
      transform: scale(1);
      filter:
        drop-shadow(0 0 10px rgba(255, 230, 120, 0.8))
        drop-shadow(0 0 20px rgba(255, 200, 80, 0.6));
    }
    100% {
      transform: scale(1.08);
      filter:
        drop-shadow(0 0 18px rgba(255, 255, 180, 1))
        drop-shadow(0 0 50px rgba(255, 180, 60, 0.9));
    }
  }

  
  .play-experience .smashball-wrap::after {
    animation: smashFlash 0.4s ease-out forwards;
  }
  
  @keyframes smashFlash {
    0% {
      opacity: 0;
    }
    20% {
      opacity: 1;
      background:
      radial-gradient(circle,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,0.9) 20%,
      rgba(255,200,120,0.6) 40%,
      rgba(255,120,120,0.3) 65%,
      transparent 100%);
    }
    100% {
      opacity: 0;
    }
  }

  body.screen-shake {
    animation: smashShake 0.4s ease-in-out;
  }
  
  @keyframes smashShake {
    0% { transform: translate(0,0); }
    20% { transform: translate(-6px, 4px); }
    40% { transform: translate(6px, -4px); }
    60% { transform: translate(-4px, 2px); }
    80% { transform: translate(4px, -2px); }
    100% { transform: translate(0,0); }
  }

  .smashball-wrap {
    position: relative;
    display: grid;
    place-items: center;
  }
  
  .smashball-wrap::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    z-index: 1;
  
    background: conic-gradient(
      red,
      orange,
      yellow,
      lime,
      cyan,
      blue,
      violet,
      red
    );

  }

  @keyframes smashRainbowGlow {
    0% {
      transform: scale(1);
      filter: blur(10px) hue-rotate(0deg);
      opacity: 0.8;
    }
    100% {
      transform: scale(1.15);
      filter: blur(18px) hue-rotate(90deg);
      opacity: 1;
    }
  }

  .smashball-wrap::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    z-index: 2;
  
    background: radial-gradient(circle,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,0.95) 30%,
      rgba(255,255,255,0.6) 60%,
      rgba(255,255,255,0.2) 80%,
      transparent 100%
    );
  
    filter: blur(10px);
    opacity: 0;
  }

.theme-transition.play-experience .smashball-wrap::before,
.theme-transition.play-experience .smashball-wrap::after {
  animation: smashGlowFade 1s ease forwards;
}

@keyframes smashGlowFade {
    0% {
      opacity: 0;
      transform: scale(0.6);
    }
    20% {
      opacity: 1;
      transform: scale(1);
    }
    60% {
      opacity: 1;
      transform: scale(1.2);
    }
    100% {
      opacity: 0;
      transform: scale(1.6);
    }
  }

  .smashball-white-bg {
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: white;
    z-index: 1;
  
    opacity: 0;
  }
  .theme-transition.play-experience .smashball-white-bg {
    animation: smashWhitePop 1s ease forwards;
  }

  @keyframes smashWhitePop {
    0% {
      opacity: 0;
      transform: scale(0.6);
    }
    20% {
      opacity: 0.85;
      transform: scale(0.9);
    }
    60% {
      opacity: 0.85;
      transform: scale(1.05);
    }
    100% {
      opacity: 0;
      transform: scale(1.3);
    }
  }

  .smashball-white-bg {
    mix-blend-mode: screen;
  }

  .theme-transition.play-experience .theme-transition-black {
    animation: experienceBlack 1s ease forwards;
  }
  
  @keyframes experienceBlack {
    0%   { opacity: 0; }
    12%  { opacity: 1; }
    72%  { opacity: 1; }
    100% { opacity: 0; }
  }

  .personal-gallery {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
  }
  
  .art-card {
    width: 220px;
    height: 300px;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .art-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .art-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  }

  body.theme-personal {
    background:
      radial-gradient(circle at 50% 18%, rgba(255,255,255,0.08), transparent 18%),
      linear-gradient(to bottom, #7d2cff 0%, #5f1cff 48%, #3b0aa8 100%) !important;
  }
  
  .personal-section {
    background: transparent !important;
  }
  
  .personal-panel {
    position: relative;
    z-index: 5; /* above background */
  }
  
  .personal-panel h2,
  .personal-intro,
  .personal-gallery {
    position: relative;
    z-index: 4;
  }
  
  .personal-intro {
    color: rgba(255,255,255,0.95);
    max-width: 760px;
    margin-bottom: 24px;
  }
  
  /* big yellow cat */
  body.theme-personal .headspace-yellow-cat {
    position: fixed;
    left: 0;
    bottom: -70px;
    width: 260px;
  
    opacity: 0.9;
    z-index: 1;
    pointer-events: none;
    image-rendering: pixelated;
  }

  .headspace-yellow-cat {
    display: none;
  }
  
  body.theme-personal .headspace-yellow-cat {
    display: block;
  }
  
  /* floating characters */
  .headspace-floaters {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
  }

  .headspace-bg {
    display: none;
  }

  body.theme-personal .headspace-bg {
    display: block;
  }

  .floater {
    position: absolute;
    width: 90px;
    opacity: 0.95;
    image-rendering: pixelated;
    transform-origin: center center;
  }
  
  .f1 { top: 15%; animation: drift1 18s linear infinite; }
  .f2 { top: 30%; animation: drift2 22s linear infinite; }
  .f3 { top: 50%; animation: drift3 16s linear infinite; }
  .f4 { top: 70%; animation: drift4 24s linear infinite; }
  .f5 { top: 85%; animation: drift5 20s linear infinite; }
  
  @keyframes drift1 {
    0% {
      left: -120px;
      transform: rotate(0deg) scale(1);
    }
    100% {
      left: calc(100% + 120px);
      transform: rotate(360deg) scale(1.05);
    }
  }
  
  @keyframes drift2 {
    0% {
      right: -120px;
      transform: rotate(0deg) scale(1);
    }
    100% {
      right: calc(100% + 120px);
      transform: rotate(-360deg) scale(0.95);
    }
  }
  
  @keyframes drift3 {
    0% {
      left: -120px;
      transform: rotate(0deg) scale(0.95);
    }
    100% {
      left: calc(100% + 120px);
      transform: rotate(360deg) scale(1.02);
    }
  }
  
  @keyframes drift4 {
    0% {
      right: -120px;
      transform: rotate(0deg) scale(1.05);
    }
    100% {
      right: calc(100% + 120px);
      transform: rotate(-360deg) scale(0.98);
    }
  }
  
  @keyframes drift5 {
    0% {
      left: -120px;
      transform: rotate(0deg) scale(0.9);
    }
    100% {
      left: calc(100% + 120px);
      transform: rotate(360deg) scale(0.94);
    }
  }
  
  /* polaroid gallery */
  .personal-gallery {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
  }
  
  .art-card {
    width: 220px;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 12px 12px 42px;
    position: relative;
    box-shadow:
      0 14px 28px rgba(0,0,0,0.28),
      0 0 0 1px rgba(0,0,0,0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
  
  .art-card:nth-child(1) { transform: rotate(-3deg); }
  .art-card:nth-child(2) { transform: rotate(2deg); }
  .art-card:nth-child(3) { transform: rotate(-1.5deg); }
  
  .art-card:hover {
    transform: translateY(-8px) scale(1.03) rotate(0deg);
    box-shadow:
      0 20px 38px rgba(0,0,0,0.34),
      0 0 0 1px rgba(0,0,0,0.06);
  }
  
  .art-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
  }
  
  .art-card::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
  }
  
  /* optional white doodle stars */
  .headspace-bg-icons::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
    background-image:
      radial-gradient(circle, rgba(255,255,255,0.95) 0 1px, transparent 2px),
      radial-gradient(circle, rgba(255,255,255,0.9) 0 1.4px, transparent 2.4px),
      radial-gradient(circle, rgba(255,255,255,0.9) 0 1px, transparent 2px);
    background-size: 120px 120px, 180px 180px, 240px 240px;
    background-position: 0 0, 40px 80px, 100px 30px;
  }

  


  body.theme-smash {
    background: none !important;
    position: relative;
  }
  
  body.theme-smash::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
  
    background: url("Personal_website_images/smash_background.png") center / cover no-repeat;
  
    /* blur + slight dim for readability */
    filter: blur(8px) brightness(0.75);
    transform: scale(1.1); /* prevents edges from showing due to blur */
  
    pointer-events: none;
  }

body.theme-smash .switch-main,
body.theme-smash .switch-card,
body.theme-smash .fighter-grid,
body.theme-smash .versus-panels {
  position: relative;
  z-index: 2;
}

body.theme-about::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background-image:
    radial-gradient(circle, rgba(0,0,0,0.6) 1px, transparent 2px),
    radial-gradient(circle, rgba(0,0,0,0.5) 1.5px, transparent 2.5px),
    radial-gradient(circle, rgba(0,0,0,0.4) 1px, transparent 2px);

  background-size: 120px 120px, 180px 180px, 240px 240px;
  background-position: 0 0, 40px 80px, 100px 30px;
  opacity: 0.6;
}


@keyframes voidDrift {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-40px);
  }
}

body.theme-about::after {
  animation: voidDrift 20s linear infinite;
}


#hornet-walker {
  display: none;
  position: fixed;
  bottom: 0;
  left: -200px;
  width: 120px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}

body.theme-about:not(.intro-mode) #hornet-walker {
  display: block;
}

body.theme-about #hornet-walker {
  opacity: 1;
}

.project-documents {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 per row */
  gap: 30px;
  margin-top: 40px;
  padding: 20px;
}

.doc {
  background: rgba(255,255,255,0.85);
  padding: 15px;
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.doc h4 {
  margin-bottom: 10px;
}

.doc iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 10px;
}

.project-doc-card iframe {
  width: 100%;
  height: 700px; /* change this */
  border: none;
  border-radius: 10px;
}


.project-doc-card {
  background: rgba(30, 20, 40, 0.9);
  padding: 15px;
  border-radius: 14px;

  border: 1.5px solid rgba(0, 0, 0, 0.6); /* soft gold */

  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(212, 175, 55, 0.15); /* subtle glow */
}

 .project-doc-card::after {
  content: "♠";
  position: absolute;
  top: 10px;
  right: 14px;

  font-size: 14px;
  color: rgba(212, 175, 55, 0.5); /* faint gold */
}

.project-card:hover {
  transform: rotate(var(--base-rot)) translateY(-10px) scale(1.04);
  box-shadow: 0 18px 30px rgba(0,0,0,0.35);
  z-index: 10;
}

.physics-img {
  width: 100%;
  max-width: 600px;  /* controls how big it can get */
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 12px;
}

.menu-card {
  position: relative;
  overflow: hidden;
}

/* image layer */
.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;          /* subtle background look */
  transform: scale(1.1);  /* avoids edge gaps */
}

/* text stays above */
.card-content {
  position: relative;
  z-index: 2;
}

body.intro-mode .page-bg {
  opacity: 0.28;
  transition: opacity 0.3s ease;
}

body.intro-mode .switch-row-wrap {
  background: rgba(10, 12, 20, 0.18);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 26px 22px;
  backdrop-filter: blur(8px);
}

body.theme-about.intro-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background:
    linear-gradient(
      to bottom,
      rgba(8, 10, 18, 0.62) 0%,
      rgba(8, 10, 18, 0.52) 22%,
      rgba(8, 10, 18, 0.46) 46%,
      rgba(8, 10, 18, 0.58) 72%,
      rgba(0, 0, 0, 0.78) 100%
    ),
    url("Personal_website_images/knight_bg.png") center / cover no-repeat;

  filter: blur(1.5px) brightness(0.42);
  transform: scale(1.03);
}

body.theme-about.intro-mode::before {
  display: none;
}

body.intro-mode {
  background: #11131a !important;
}

body.intro-mode::before {
  display: none !important;
}

body.intro-mode .page-bg {
  display: none !important;
}

.switch-home {
  background: transparent;
}

.switch-home-title,
.switch-card h2,
.switch-card p {
  color: rgba(255,255,255,0.95);
  text-shadow:
    0 2px 6px rgba(0,0,0,0.6),
    0 0 18px rgba(0,0,0,0.4);
}

.switch-card {
  background: rgba(20, 22, 32, 0.65); /* darker glass */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
}

.section {
  color: white;
}


.theme-transition {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.theme-transition-black,
.card-wipe {
  opacity: 0;
}

.theme-transition.play-personal .theme-transition-black {  position: absolute;
  inset: 0;
  background: #0c0c12;
  animation: projectsFade 820ms ease forwards;
}

.card-wipe {
  position: absolute;
  top: 50%;
  left: -28vw;

  width: 28vw;
  max-width: 360px;
  min-width: 180px;

  transform: translateY(-50%) rotate(-18deg);

  opacity: 0;

  background: transparent;
  border: none;
  box-shadow: none;

  overflow: visible;
}

.polaroid-real {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 40px rgba(0,0,0,0.35));
}

.theme-transition.play-personal .card-wipe {
  opacity: 1;
  animation: cardPass 0.74s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardPass {
  0% {
    opacity: 0;
    left: -30vw;
    transform: translateY(-50%) rotate(-20deg) scale(0.9);
  }
  12% {
    opacity: 1;
  }
  46% {
    opacity: 1;
    left: 38vw;
    transform: translateY(-50%) rotate(-6deg) scale(1.02);
  }
  100% {
    opacity: 0;
    left: 110vw;
    transform: translateY(-50%) rotate(14deg) scale(1.08);
  }
}

.card-wipe {
  pointer-events: none;
  z-index: 15001; /* above everything */
}

.theme-transition:not(.play-personal) .card-wipe {
  display: none;
}

.theme-transition.play-personal .card-wipe {
  display: block;
  opacity: 1;
}




.balatro-fan {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 320px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 15002;
  opacity: 0;
}

.balatro-card {
  position: absolute;
  width: 92px;
  height: 128px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.22);
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 28%, transparent 52%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0px, rgba(255,255,255,0.08) 6px, transparent 6px, transparent 12px),
    linear-gradient(to bottom, #4d1f77 0%, #2a123f 100%);
  box-shadow: 0 10px 18px rgba(0,0,0,0.24);
  left: 50%;
  top: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7) rotate(0deg);
}

/* center card */
.balatro-card.c3 {
  z-index: 5;
}

/* inner left/right */
.balatro-card.c2,
.balatro-card.c4 {
  z-index: 4;
}

/* outer left/right */
.balatro-card.c1,
.balatro-card.c5 {
  z-index: 3;
}

.theme-transition.play-projects {
  opacity: 1;
}

.theme-transition.play-projects .balatro-fan {
  animation: balatroFanFade 0.9s ease forwards;
}

.theme-transition.play-projects .balatro-card.c1 {
  animation: fanCard1 0.9s cubic-bezier(.2,.8,.2,1) forwards;
}

.theme-transition.play-projects .balatro-card.c2 {
  animation: fanCard2 0.9s cubic-bezier(.2,.8,.2,1) forwards;
}

.theme-transition.play-projects .balatro-card.c3 {
  animation: fanCard3 0.9s cubic-bezier(.2,.8,.2,1) forwards;
}

.theme-transition.play-projects .balatro-card.c4 {
  animation: fanCard4 0.9s cubic-bezier(.2,.8,.2,1) forwards;
}

.theme-transition.play-projects .balatro-card.c5 {
  animation: fanCard5 0.9s cubic-bezier(.2,.8,.2,1) forwards;
}

@keyframes balatroFanFade {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes fanCard1 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translate(-220px, -10px) scale(1) rotate(-28deg);
  }
  100% {
    opacity: 0;
    transform: translate(-250px, -22px) scale(1.02) rotate(-32deg);
  }
}

@keyframes fanCard2 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translate(-120px, -2px) scale(1) rotate(-14deg);
  }
  100% {
    opacity: 0;
    transform: translate(-140px, -10px) scale(1.02) rotate(-16deg);
  }
}

@keyframes fanCard3 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -58%) scale(1.04) rotate(0deg);
  }
}

@keyframes fanCard4 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translate(20px, -2px) scale(1) rotate(14deg);
  }
  100% {
    opacity: 0;
    transform: translate(40px, -10px) scale(1.02) rotate(16deg);
  }
}

@keyframes fanCard5 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translate(120px, -10px) scale(1) rotate(28deg);
  }
  100% {
    opacity: 0;
    transform: translate(150px, -22px) scale(1.02) rotate(32deg);
  }
}
.balatro-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #2a123f 0%, #12081c 100%);
  opacity: 0;
  z-index: 15000;
  pointer-events: none;
}

.theme-transition.play-projects .balatro-bg {
  animation: balatroBgFade 0.9s ease forwards;
}

@keyframes balatroBgFade {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  85% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

body.theme-personal::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(to bottom, rgba(90,40,180,0.78), rgba(60,20,130,0.82)),
    url("Personal_website_images/frieren.png") right center / contain no-repeat;
  opacity: 0.22;
  filter: blur(2px) saturate(0.8);
}

.card-corner {
  position: absolute;
  font-family: "EB Garamond", serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.card-corner.top-left {
  top: 14px;
  left: 18px;
}

.card-corner.bottom-right {
  bottom: 14px;
  right: 18px;
  transform: rotate(180deg);
}
.card-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0.15;
}

.project-card.common {
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.project-card.uncommon {
  box-shadow: 0 0 12px rgba(100,255,180,0.5);
}

.project-card.rare {
  box-shadow: 0 0 18px rgba(120,120,255,0.6);
}

.project-card.legendary {
  box-shadow:
    0 0 25px rgba(255,140,60,0.8),
    0 0 60px rgba(255,80,40,0.4);
}

.project-card {
  position: relative;
  z-index: 2;
  width: 240px;
  min-height: 320px;
  border-radius: 16px;
  background: linear-gradient(to bottom, #fbfbfd 0%, #ececf3 100%);
  color: #111;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  opacity: 1;
  transform: rotate(var(--base-rot, 0deg));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project-card.flipped {
  transform: rotateY(180deg);
}

#projects {
  --isaac-paper: #f5e4b3;
  --isaac-paper-alt: #d4c29a;
  --isaac-ink: #2a1a12;
  --pin-red: #b13a32;
  --pin-blue: #4770a8;
  --pin-yellow: #d2ab39;
}
.isaac-board { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.isaac-note { background: linear-gradient(to bottom, var(--isaac-paper), #cbb98a); padding:16px; border-radius:12px; box-shadow: 0 10px 20px rgba(0,0,0,0.3); position: relative; }
.pin { width:16px; height:16px; border-radius:50%; position:absolute; top:-8px; left:50%; transform:translateX(-50%); }
.pin-red { background: var(--pin-red); }
.note-paper { color: var(--isaac-ink); font-family: "EB Garamond", serif; }
.isaac-stamp { position:absolute; bottom:8px; right:12px; width:100px; opacity:0.15; }
@media (max-width: 800px) { .isaac-board { grid-template-columns: 1fr; } }


/* ---------- PROJECTS (Balatro+Isaac split) ---------- */

/* Isaac theming variables */
#projects {
  --isaac-paper: #f5e4b3;
  --isaac-paper-alt: #d4c29a;
  --isaac-ink: #2a1a12;
  --pin-red:   #b13a32;
  --pin-blue:  #4770a8;
  --pin-yellow:#d2ab39;
}

/* Split container */
.project-split {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

/* Ensure Balatro top overflows (no clipping) */
.balatro-top {
  position: relative;
  overflow: visible;
}

/* Isaac notes board */
.isaac-bottom {
  position: relative;
}

.isaac-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 20px 0;
  position: relative;
}

/* Note card styling */
.isaac-note {
  background: linear-gradient(to bottom, var(--isaac-paper), var(--isaac-paper-alt));
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
  color: var(--isaac-ink);
  position: relative;
  transform: translateZ(0); /* for hardware accel */
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.isaac-note:hover {
  transform: translateY(-4px);
}

/* Slight rotations */
.tear-a { transform: rotate(-1deg); }
.tear-b { transform: rotate(1.5deg); }
.tear-c { transform: rotate(-0.6deg); }

/* Torn-top using clip-path */
.tear-a .note-paper {
  clip-path: polygon(
    0% 3%, 6% 0%, 12% 3%, 20% 1%, 30% 4%, 40% 0%, 50% 4%,
    60% 2%, 70% 5%, 80% 1%, 90% 4%, 100% 2%, 100% 100%, 0% 100%
  );
}
.tear-b .note-paper {
  clip-path: polygon(
    0% 2%, 8% 4%, 16% 0%, 24% 3%, 32% 1%, 42% 4%,
    54% 0%, 64% 3%, 74% 1%, 84% 4%, 94% 1%, 100% 3%,
    100% 100%, 0% 100%
  );
}
.tear-c .note-paper {
  clip-path: polygon(
    0% 4%, 10% 2%, 18% 5%, 28% 2%, 36% 6%, 46% 1%,
    58% 5%, 68% 2%, 78% 5%, 88% 2%, 100% 4%,
    100% 100%, 0% 100%
  );
}


/* ---------- PROJECTS: ISAAC LOWER HALF ---------- */

#projects {
  --isaac-paper: #f5e4b3;
  --isaac-paper-alt: #d4c29a;
  --isaac-ink: #2a1a12;
  --pin-red: #b13a32;
  --pin-blue: #4770a8;
  --pin-yellow: #d2ab39;
}

.project-split {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.isaac-bottom {
  position: relative;
  padding: 28px 18px 22px;
  border-top: 2px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 20%, rgba(120, 80, 40, 0.18), transparent 60%),
    linear-gradient(to bottom, #1a120c, #0c0705);
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.6),
    0 12px 30px rgba(0,0,0,0.4);
}

.isaac-board {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.isaac-note {
  position: relative;
}

.note-paper {
  background: linear-gradient(to bottom, var(--isaac-paper), var(--isaac-paper-alt));
  color: var(--isaac-ink);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow:
    0 10px 20px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.3);
  font-family: "EB Garamond", serif;
}

.tear-a { transform: rotate(-2deg); }
.tear-b { transform: rotate(1.5deg); }
.tear-c { transform: rotate(-0.5deg); }

.pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

.pin-red { background: var(--pin-red); }
.pin-blue { background: var(--pin-blue); }
.pin-yellow { background: var(--pin-yellow); }

.note-paper h4 {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: var(--isaac-ink);
}

.note-paper p {
  margin: 0;
  line-height: 1.45;
  color: rgba(42,26,18,0.92);
}

@media (max-width: 800px) {
  .isaac-board {
    grid-template-columns: 1fr;
  }
}

/* The pin (circle) */
.pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.pin-red    { background: var(--pin-red); }
.pin-blue   { background: var(--pin-blue); }
.pin-yellow { background: var(--pin-yellow); }

/* Note content */
.note-paper {
  font-family: "EB Garamond", serif;
  line-height: 1.5;
  margin: 0;
}

/* Decorative doodle stamp */
.isaac-stamp {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 120px;
  opacity: 0.1;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.2));
}

/* Responsive adjustments */
@media (max-width: 800px) {
  .isaac-board { grid-template-columns: 1fr; }
  .isaac-note { transform: none !important; } /* avoid scroll */
}

/* Focus outline for keyboard users */
.isaac-board :focus-visible {
  outline: 3px solid rgba(255,255,255,0.6);
  outline-offset: 2px;
}

/* Reduced motion: disable excessive animations */
@media (prefers-reduced-motion: reduce) {
  .isaac-note,
  .isaac-stamp {
    transition: none !important;
    animation: none !important;
  }
}

.project-split {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.isaac-bottom {
  margin-top: 22px;
  padding: 24px 18px 20px;
  border-top: 2px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 15%, rgba(120,80,40,0.18), transparent 58%),
    linear-gradient(to bottom, #1a120c, #0d0806);
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.55),
    0 12px 26px rgba(0,0,0,0.34);
}

.isaac-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.isaac-note {
  position: relative;
}

.note-paper {
  background: linear-gradient(to bottom, #f0ddb0, #d3bf92);
  color: #2a1a12;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow:
    0 10px 18px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.30);
}

.note-paper h4 {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  color: #2a1a12;
}

.note-paper p {
  margin: 0;
  line-height: 1.45;
  color: rgba(42,26,18,0.92);
}

.tear-a { transform: rotate(-2deg); }
.tear-b { transform: rotate(1.5deg); }
.tear-c { transform: rotate(-0.5deg); }

.pin {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

.pin-red { background: #b13a32; }
.pin-blue { background: #4770a8; }
.pin-yellow { background: #d2ab39; }

@media (max-width: 800px) {
  .isaac-board {
    grid-template-columns: 1fr;
  }
}

.projects-subtitle {
  margin: 22px 0 12px;
  font-family: "Cinzel", serif;
  color: #f2e7cf;
}




.projects-subtitle {
  margin: 24px 0 12px;
  font-family: "Cinzel", serif;
  color: #f6f1e8;
  letter-spacing: 0.02em;
}

.project-doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 30% 20%, rgba(120, 70, 255, 0.12), transparent 30%),
    radial-gradient(circle at 75% 70%, rgba(255, 70, 120, 0.10), transparent 28%),
    linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(255,255,255,0.00)),
    rgba(18, 14, 28, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 28px rgba(0,0,0,0.28);
}

.project-doc-card {
  position: relative;
  background: linear-gradient(to bottom, #f6f6fa 0%, #e8e8f1 100%);
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.06) inset;
  transform: rotate(-1.2deg);
  overflow: hidden;
}

.project-doc-card:nth-child(2) {
  transform: rotate(1deg);
}

.project-doc-card:nth-child(3) {
  transform: rotate(-0.4deg);
}

.project-doc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.00) 0%,
    rgba(255,255,255,0.05) 35%,
    rgba(255,255,255,0.14) 50%,
    rgba(255,255,255,0.00) 70%
  );
}

.project-doc-card h4 {
  margin: 2px 0 10px;
  font-family: "Cinzel", serif;
  font-size: 1.02rem;
  color: #17131f;
}

.project-doc-card iframe {
  width: 100%;
  height: 320px;
  border: none;
  border-radius: 8px;
  background: white;
  display: block;
}

.project-doc-card.wide-doc {
  grid-column: span 2;
}

.snom-link {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  display: block;
}

.snom-link {
  position: fixed;
  top: 20px;
  left: 20px;
}

.intro-mode .snom-link {
  display: none;
}

.snom-icon {
  width: 52px;
  height: auto;
  image-rendering: pixelated; /* keeps it crisp if pixel art */
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.snom-icon:hover {
  transform: scale(1.15) rotate(-4deg);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}