/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Base colors */
  --color-text: #151515;
  --color-background: #FFFFFF;
  --color-accent: #9E4A20;
  --color-orange: #D4782C;
  --color-blue-light: #4A5FC1;
  --color-blue-dark: #1A1F5C;
  --color-white: #FFFFFF;
  --font-family: 'Rethink Sans', sans-serif;
  
  /* Theme colors (light mode default) */
  --theme-bg: #FFFFFF;
  --theme-bg-transparent: rgba(255, 255, 255, 0.9);
  --theme-text: #151515;
  --theme-popover-bg: rgba(19, 20, 21, 0.9);
  --theme-popover-text: #9d83ff;
  --theme-hover: #360EC8;
}

/* Dark mode */
body.dark-mode {
  --theme-bg: #151515;
  --theme-bg-transparent: rgba(21, 21, 21, 0.9);
  --theme-text: #FFFFFF;
  --theme-popover-bg: rgba(255, 255, 255, 0.9);
  --theme-popover-text: #5a3dbd;
  --theme-hover: #9d83ff;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--theme-bg);
  color: var(--theme-text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom cursor (desktop only) */
@media (min-width: 1280px) {
  body {
    cursor: none;
  }
  
  a, button, [role="button"], input, select, textarea, label, .project-item, .bead-button, .name-wrapper, .dash-wrapper, .title-wrapper, .motion-toggle {
    cursor: none;
  }
}

.custom-cursor {
  display: none;
  position: fixed;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: white;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.2s ease, height 0.2s ease;
}

.custom-cursor.active {
  transform: translate(-50%, -50%) scale(1.5);
}

@media (min-width: 1280px) {
  .custom-cursor {
    display: block;
  }
}

/* Light/Dark mode bead visibility */
.bead-button.bead-3 { /* Moon - visible in light mode, click to enable dark mode */
  cursor: pointer;
  pointer-events: auto;
  z-index: 100;
  transition: transform 0.2s ease;
}

.bead-button.bead-3:hover {
  transform: scale(1.1) !important;
}

.bead-button.bead-4 { /* Sun - hidden in light mode */
  display: none !important;
  cursor: pointer;
  pointer-events: auto;
  z-index: 100;
  transition: transform 0.2s ease;
}

.bead-button.bead-4:hover {
  transform: scale(1.1) !important;
}

body.dark-mode .bead-button.bead-3 { /* Moon - hidden in dark mode */
  display: none !important;
}

body.dark-mode .bead-button.bead-4 { /* Sun - visible in dark mode, click to enable light mode */
  display: flex !important;
}

/* Main container */
.container {
  width: 900px;
  max-width: 100%;
  margin: 0 auto;
  padding: 123px 0 120px;
}

@media (max-width: 940px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Header */
.header {
  margin-bottom: 300px;
}

.header h1 {
  font-family: "BBH Bartle", sans-serif;
  font-size: clamp(32px, 3.2vw, 40px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 2.4px;
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 10px;
}

.header .name-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.header .name {
  font-weight: 800;
  letter-spacing: 2.4px;
}

/* Photo popover on hover */
.photo-popover {
  position: absolute;
  top: 76px;
  left: 0;
  width: 260px;
  height: 260px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 1000;
  pointer-events: none;
  border-radius: 20px;
  overflow: hidden;
}

.photo-popover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Smoother downscaling for high-res images */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: smooth;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  box-shadow: 
    0px 36px 89px 0px rgba(0, 0, 0, 0.35),
    0px 23px 52px 0px rgba(0, 0, 0, 0.25),
    0px 14px 28px 0px rgba(0, 0, 0, 0.2),
    0px 7px 14px 0px rgba(0, 0, 0, 0.15),
    0px 3px 7px 0px rgba(0, 0, 0, 0.12),
    0px 1px 3px 0px rgba(0, 0, 0, 0.1);
}

/* Desktop hover states */
@media (min-width: 1280px) {
  .header .name-wrapper:hover .photo-popover {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  .header .name-wrapper:hover .name {
    color: var(--theme-hover);
  }
}

/* Mobile click states */
.photo-popover.mobile-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.name.mobile-active {
  color: var(--theme-hover);
}

.header .dash-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.header .dash {
  letter-spacing: -3px;
}

/* Em-dash popover on hover */
.dash-popover {
  position: absolute;
  top: 70px;
  left: -100px;
  width: 480px;
  max-width: 90vw;
  padding: 24px;
  background-color: var(--theme-popover-bg);
  box-shadow: 
    0px 36px 89px 0px rgba(0, 0, 0, 0.35),
    0px 23px 52px 0px rgba(0, 0, 0, 0.25),
    0px 14px 28px 0px rgba(0, 0, 0, 0.2),
    0px 7px 14px 0px rgba(0, 0, 0, 0.15),
    0px 3px 7px 0px rgba(0, 0, 0, 0.12),
    0px 1px 3px 0px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  border-radius: 20px;
}

.dash-popover p,
.title-popover p,
.flower-popover p {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: normal;
  white-space: normal;
  color: var(--theme-popover-text);
  margin: 0;
  transition: color 0.3s ease;
}

/* Desktop hover states */
@media (min-width: 1280px) {
  .header .dash-wrapper:hover .dash-popover {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  .header .dash-wrapper:hover .dash {
    color: var(--theme-hover);
  }
}

/* Mobile click states */
.dash-popover.mobile-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.dash.mobile-active {
  color: var(--theme-hover);
}

.header .title-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.header .title {
  font-family: var(--font-family);
  font-weight: 400;
  letter-spacing: normal;
}

/* Title popover on hover - currently suppressed */
.title-popover {
  display: none;
  position: absolute;
  top: 70px;
  left: 20px;
  width: 400px;
  max-width: 90vw;
  padding: 24px;
  background-color: var(--theme-popover-bg);
  box-shadow: 
    0px 36px 89px 0px rgba(0, 0, 0, 0.35),
    0px 23px 52px 0px rgba(0, 0, 0, 0.25),
    0px 14px 28px 0px rgba(0, 0, 0, 0.2),
    0px 7px 14px 0px rgba(0, 0, 0, 0.15),
    0px 3px 7px 0px rgba(0, 0, 0, 0.12),
    0px 1px 3px 0px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  border-radius: 20px;
}


.title-popover em {
  font-style: italic;
}

/* Desktop hover states */
@media (min-width: 1280px) {
  .header .title-wrapper:hover .title-popover {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  .header .title-wrapper:hover .title {
    color: var(--theme-hover);
  }
}

/* Mobile click states */
.title-popover.mobile-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.title.mobile-active {
  color: var(--theme-hover);
}

/* Motion toggle */
.motion-toggle-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.motion-toggle {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  color: var(--theme-text);
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.motion-state {
  color: var(--theme-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.motion-toggle:hover .motion-state {
  opacity: 0.8;
}

/* Decorative bead buttons - floating mode (motion ON) */
.bead-buttons-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.bead-button {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: none;
}

.bead-button img {
  width: 240px;
  height: 240px;
  object-fit: contain;
}

/* Static mode (motion OFF) - beads in a row below header */
.bead-buttons-wrapper.static-mode {
  position: absolute;
  top: 240px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  max-width: calc(100% - 40px);
  height: auto;
  padding: 20px 0;
  display: flex;
  justify-content: center;
  gap: 40px;
  z-index: 1;
}

.bead-buttons-wrapper.static-mode .bead-button {
  position: relative !important;
  transform: none !important;
  left: auto !important;
  top: auto !important;
}

/* Keep original sizes in static mode on desktop */
.bead-buttons-wrapper.static-mode .bead-1 img {
  width: 172px;
  height: 172px;
}

.bead-buttons-wrapper.static-mode .bead-2 img {
  width: 260px;
  height: 260px;
}

.bead-buttons-wrapper.static-mode .bead-3 img {
  width: 200px;
  height: 200px;
}

.bead-buttons-wrapper.static-mode .bead-4 img {
  width: 200px;
  height: 200px;
}

.bead-buttons-wrapper.static-mode .bead-5 img {
  width: 220px;
  height: 220px;
}

.bead-1 {
  left: calc(16.67% + 37px);
  top: 580px;
}

.bead-1 img {
  width: 202px;
  height: 202px;
}

.bead-2 {
  left: calc(33.33% + 179px);
  top: 560px;
}

.bead-2 img {
  width: 260px;
  height: 260px;
}

.bead-3 {
  left: 108px;
  top: 500px;
}

.bead-3 img {
  width: 200px;
  height: 200px;
}

.bead-4 {
  left: calc(66.67% + 32px);
  top: 560px;
}

.bead-4 img {
  width: 200px;
  height: 200px;
}

.bead-5 {
  left: calc(83.33% - 20px);
  top: 520px;
}

.bead-5 img {
  width: 220px;
  height: 220px;
}

/* Flower bead clickable with popover */
.bead-button.bead-5 {
  cursor: pointer;
  pointer-events: auto;
}

.bead-button.bead-5:hover {
  transform: scale(1.1) !important;
}

.flower-popover {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 24px;
  transform: translate(-50%, -50%) scale(0.95);
  background-color: var(--theme-popover-bg);
  box-shadow: 
    0px 36px 89px 0px rgba(0, 0, 0, 0.35),
    0px 23px 52px 0px rgba(0, 0, 0, 0.25),
    0px 14px 28px 0px rgba(0, 0, 0, 0.2),
    0px 7px 14px 0px rgba(0, 0, 0, 0.15),
    0px 3px 7px 0px rgba(0, 0, 0, 0.12),
    0px 1px 3px 0px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.3s ease;
  z-index: 9999;
  pointer-events: none;
  border-radius: 20px;
}

.flower-popover.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.flower-popover strong {
  font-weight: 700;
}

/* Intro section */
.intro {
  margin-bottom: 60px;
}

.intro p {
  font-size: 14px;
  font-weight: 400;
  color: var(--theme-text);
  line-height: 1.5;
  transition: color 0.3s ease;
  margin-bottom: 1em;
}

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

/* Experience section */
.experience {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.experience-block {
  display: flex;
  flex-direction: column;
}

.experience-block + .experience-list {
  margin-top: 0;
}

.company {
  font-family: "BBH Bartle", sans-serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: normal;
}

.company-name {
  font-weight: 800;
}

.company-years {
  font-family: var(--font-family);
  font-weight: 400;
}

.projects {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
  max-width: 846px;
}

.projects li {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.4px;
}

/* Project item with popover */
.project-item {
  position: relative;
  cursor: pointer;
}

.project-item.no-popover {
  cursor: default;
}

.project-item.has-link {
  cursor: pointer;
}

.project-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: var(--theme-hover);
}

.project-popover {
  position: absolute;
  top: 0;
  left: 0;
  width: 840px;
  height: auto;
  max-height: 80vh;
  padding: 24px;
  background-color: var(--theme-bg-transparent);
  transition: background-color 0.3s ease;
  box-shadow: 
    0px 36px 89px 0px rgba(0, 0, 0, 0.35),
    0px 23px 52px 0px rgba(0, 0, 0, 0.25),
    0px 14px 28px 0px rgba(0, 0, 0, 0.2),
    0px 7px 14px 0px rgba(0, 0, 0, 0.15),
    0px 3px 7px 0px rgba(0, 0, 0, 0.12),
    0px 1px 3px 0px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 1000;
  overflow: hidden;
  border-radius: 20px;
}

.project-popover .placeholder {
  width: 100%;
  min-height: 200px;
  background-color: rgba(128, 128, 128, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.project-popover .project-media {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.project-popover .project-description {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--theme-text);
  margin-top: 16px;
  transition: color 0.3s ease;
}

/* Desktop hover states */
@media (min-width: 1280px) {
  .project-item:not(.no-popover):hover .project-popover {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  .project-item:not(.no-popover):hover .project-text {
    color: var(--theme-hover);
  }
}

/* Mobile click states - base visibility */
.project-popover.mobile-active {
  opacity: 1;
  visibility: visible;
}

.project-text.mobile-active {
  color: var(--theme-hover);
}

/* Desktop pinned state - click to persist */
.project-popover.pinned {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.project-text.pinned {
  color: var(--theme-hover);
}

/* Experience list (for smaller entries) */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.experience-list .company {
  font-size: 36px;
}

/* Footer */
.footer {
  width: 900px;
  max-width: 100%;
  margin: 0 auto;
  padding: 60px 0 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-bow {
  width: 60px;
  height: auto;
  flex-shrink: 0;
}

.footer p {
  font-size: 14px;
  font-weight: 400;
  color: var(--theme-text);
  line-height: 1.5;
  transition: color 0.3s ease;
}

/* Mobile/Tablet layout (375px - 1279px) */
@media (max-width: 1279px) {
  .container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 120px 40px 120px;
  }

  .footer {
    width: 100%;
    max-width: 600px;
    padding: 40px 40px 30px;
  }

  .header {
    margin-bottom: 300px;
  }

  .header h1 {
    font-size: 44px;
    letter-spacing: 1.76px;
    flex-wrap: wrap;
    white-space: normal;
    gap: 0 8px;
  }

  .header .name {
    letter-spacing: 1.76px;
  }

  .header .dash,
  .header .title {
    letter-spacing: -0px;
  }
  
  .header .title {
    font-size: 32px;
  }

  .photo-popover {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    height: 200px;
    margin-top: 10px;
    transform: scale(0.9);
  }

  .photo-popover.mobile-active {
    transform: scale(1);
  }

  .dash-popover {
    position: fixed;
    top: auto;
    bottom: auto;
    left: 20px;
    right: 20px;
    width: auto;
    max-width: none;
    max-height: 50vh;
    overflow-y: auto;
    margin-top: 10px;
    padding: 30px;
    transform: scale(0.95);
  }

  .dash-popover.mobile-active {
    transform: scale(1);
  }

  .dash-popover p,
  .title-popover p,
  .flower-popover p {
    font-size: 14px;
    line-height: 1.5;
  }

  .title-popover {
    position: absolute;
    top: 100%;
    left: -20px;
    right: auto;
    bottom: auto;
    width: calc(100vw - 40px);
    max-width: 400px;
    max-height: 50vh;
    overflow-y: auto;
    margin-top: 10px;
    padding: 30px;
    transform: scale(0.95);
  }

  .title-popover.mobile-active {
    transform: scale(1);
  }

  .experience {
    gap: 80px;
  }

  .company {
    font-size: 30px;
    letter-spacing: 2.4px;
  }

  .projects {
    margin-top: 24px;
    gap: 20px;
    max-width: none;
  }

  .projects li {
    font-size: 34px;
    line-height: 36px;
    letter-spacing: 0.34px;
  }

  .project-popover {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.95);
    width: 80vw !important;
    height: auto !important;
    max-width: 600px !important;
    max-height: 70vh !important;
  }

  .project-popover.mobile-active {
    transform: translate(-50%, -50%) scale(1) !important;
  }

  .experience-list {
    gap: 28px;
  }

  .experience-list .company {
    font-size: 30px;
  }

  /* Bead buttons repositioned for mobile/tablet */
  .bead-button img {
    width: 200px;
    height: 200px;
  }

  .bead-1 {
    left: calc(16.67% + 4px);
    top: 540px;
  }

  .bead-1 img {
    width: 173px;
    height: 173px;
  }

  .bead-2 {
    left: calc(50% + 37px);
    top: 550px;
  }

  .bead-2 img {
    width: 220px;
    height: 220px;
  }

  .bead-3 {
    left: 40px;
    top: 370px;
  }

  .bead-3 img {
    width: 160px;
    height: 160px;
  }

  .bead-4 {
    left: calc(50% + 35px);
    top: 400px;
  }

  .bead-4 img {
    width: 160px;
    height: 160px;
  }

  .bead-5 {
    left: calc(75% - 10px);
    top: 450px;
  }

  .bead-5 img {
    width: 180px;
    height: 180px;
  }

  /* Static mode adjustments for tablet */
  .bead-buttons-wrapper.static-mode {
    top: 220px;
    width: 100%;
    max-width: calc(100% - 80px);
    padding: 20px 0;
    gap: 20px;
  }

  .bead-buttons-wrapper.static-mode .bead-button img {
    width: 120px;
    height: 120px;
  }
}

/* Small mobile (375px - 480px) */
@media (max-width: 480px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .motion-toggle-wrapper {
    right: 10px;
    top: 10px;
  }

  .motion-toggle {
    font-size: 11px;
  }

  .container {
    max-width: 100%;
    padding: 100px 20px 80px;
  }

  .header {
    margin-bottom: 300px;
  }

  .intro p {
    font-size: 16px;
  }

  .header h1 {
    font-size: 28px;
    letter-spacing: 1px;
    flex-wrap: wrap;
    white-space: normal;
    gap: 0 8px;
  }

  .header .name {
    letter-spacing: 1px;
  }

  .header .dash,
  .header .title {
    letter-spacing: 0;
  }
  
  .header .title {
    font-size: 24px;
  }

  .photo-popover {
    width: 160px;
    height: 160px;
  }

  .photo-popover img {
    box-shadow: 
      0px 24px 60px 0px rgba(0, 0, 0, 0.3),
      0px 15px 35px 0px rgba(0, 0, 0, 0.22),
      0px 9px 18px 0px rgba(0, 0, 0, 0.18),
      0px 5px 10px 0px rgba(0, 0, 0, 0.12),
      0px 2px 5px 0px rgba(0, 0, 0, 0.1),
      0px 1px 2px 0px rgba(0, 0, 0, 0.08);
  }

  .dash-popover {
    width: calc(100vw - 24px);
    padding: 20px;
  }

  .dash-popover p,
  .title-popover p,
  .flower-popover p {
    font-size: 14px;
    line-height: 1.5;
  }

  .title-popover {
    width: calc(100vw - 24px);
    padding: 20px;
  }

  .flower-popover {
    width: 280px;
    max-width: calc(100vw - 24px);
    padding: 16px;
  }

  .project-popover {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 60vh !important;
    left: 0 !important;
    top: 50% !important;
    padding: 16px;
    transform: translateX(0) translateY(-50%) scale(0.95) !important;
  }

  .project-popover.mobile-active {
    transform: translateX(0) translateY(-50%) scale(1) !important;
  }

  .project-popover .project-description {
    font-size: 14px;
    margin-top: 12px;
  }

  .photo-popover {
    width: 160px;
    height: 160px;
  }

  .company {
    font-size: 20px;
    letter-spacing: 1.5px;
  }

  .projects li {
    font-size: 22px;
    line-height: 28px;
  }

  .experience-list .company {
    font-size: 20px;
  }

  .bead-button img {
    width: 140px;
    height: 140px;
  }

  .bead-1 {
    left: 10%;
    top: 420px;
  }

  .bead-1 img {
    width: 130px;
    height: 130px;
  }

  .bead-2 {
    left: 55%;
    top: 440px;
  }

  .bead-2 img {
    width: 160px;
    height: 160px;
  }

  .bead-3 {
    left: 24px;
    top: 300px;
  }

  .bead-3 img {
    width: 120px;
    height: 120px;
  }

  .bead-4 {
    left: 55%;
    top: 320px;
  }

  .bead-4 img {
    width: 120px;
    height: 120px;
  }

  .bead-5 {
    left: 70%;
    top: 380px;
  }

  .bead-5 img {
    width: 140px;
    height: 140px;
  }

  /* Static mode adjustments for small mobile - 2x2 grid */
  .bead-buttons-wrapper.static-mode {
    top: 120px;
    max-width: calc(100% - 40px);
    padding: 10px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    justify-items: center;
    align-items: center;
  }

  /* Preserve motion-on sizes in static mode */
  .bead-buttons-wrapper.static-mode .bead-1 img {
    width: 130px;
    height: 130px;
  }
  
  .bead-buttons-wrapper.static-mode .bead-2 img {
    width: 160px;
    height: 160px;
  }
  
  .bead-buttons-wrapper.static-mode .bead-3 img {
    width: 120px;
    height: 120px;
  }
  
  .bead-buttons-wrapper.static-mode .bead-4 img {
    width: 120px;
    height: 120px;
  }
  
  .bead-buttons-wrapper.static-mode .bead-5 img {
    width: 140px;
    height: 140px;
  }
}

/* Contact Modal */
.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.contact-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.contact-modal {
  background-color: var(--theme-bg);
  padding: 48px;
  width: 480px;
  max-width: calc(100% - 40px);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  position: relative;
  box-shadow: 
    0px 36px 89px 0px rgba(0, 0, 0, 0.35),
    0px 23px 52px 0px rgba(0, 0, 0, 0.25),
    0px 14px 28px 0px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact-modal-overlay.active .contact-modal {
  transform: scale(1);
}

.contact-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--theme-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.contact-modal-close:hover {
  color: var(--theme-hover);
}

.contact-modal h2 {
  font-family: var(--font-family);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--theme-text);
  margin-bottom: 32px;
  transition: color 0.3s ease;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-text);
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.form-group input,
.form-group textarea {
  font-family: var(--font-family);
  font-size: 16px;
  padding: 12px 16px;
  border: 2px solid var(--theme-text);
  background-color: transparent;
  color: var(--theme-text);
  transition: border-color 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--theme-hover);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-submit {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 24px;
  background-color: var(--theme-text);
  color: var(--theme-bg);
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  margin-top: 8px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contact-submit:hover {
  background-color: var(--theme-hover);
  color: white;
  transform: translateY(-2px);
}

.contact-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.contact-success.show {
  display: block;
}

.contact-success.show + .contact-form,
.contact-form.hidden {
  display: none;
}

.contact-success p {
  font-family: var(--font-family);
  font-size: 18px;
  color: var(--theme-text);
  line-height: 1.5;
}

/* Email bead clickable */
.bead-button.bead-1 {
  cursor: pointer;
  pointer-events: auto;
}

.bead-button.bead-1:hover {
  transform: scale(1.1) !important;
}

/* LinkedIn bead clickable */
.bead-button.bead-2 {
  cursor: pointer;
  pointer-events: auto;
}

.bead-button.bead-2:hover {
  transform: scale(1.1) !important;
}

/* Mobile contact modal */
@media (max-width: 480px) {
  .contact-modal-overlay {
    padding: 12px;
  }

  .contact-modal {
    width: 100%;
    max-width: calc(100vw - 24px);
    padding: 24px 20px;
    max-height: calc(100vh - 48px);
  }

  .contact-modal h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .contact-modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }

  .form-group input,
  .form-group textarea {
    padding: 10px 12px;
    font-size: 14px;
  }

  .contact-submit {
    padding: 12px 20px;
    font-size: 14px;
  }
}

