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

body {
  background: #050505;
  /* Base color now on body, but z-index will handle layers */
  color: #fff;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
  position: relative;
}

/* ── Technical Background Textures ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* Layers: Grid + Vignette + Grain */
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.4) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 40px 40px, 40px 40px, 100% 100%, 200px 200px;
  opacity: 0.08;
  /* Increased for impact */
  pointer-events: none;
  z-index: -1;
  /* Above gears, below content */
}

/* ── 3D canvas fills everything ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  /* Absolute back layer */
}

/* ── CV panel — right 42%, no background box ── */
.cv-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 42%;
  height: 100vh;
  z-index: 10;
  padding: 52px 6% 40px 24px;
  overflow-y: auto;
  /* Mask edges so text fades into the darkness */
  -webkit-mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 4%,
      black 96%,
      transparent 100%);
  mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 4%,
      black 96%,
      transparent 100%);
  padding-bottom: 120px;
  /* More space to scroll up the footer */
  scrollbar-width: none;
}

/* ── Page Reveal State ── */
.cv-panel {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.lofi-widget {
  opacity: 0;
  transition: opacity 0.6s 1.2s ease;
}

body.revealed .cv-panel {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.2s;
}

body.revealed .lofi-widget {
  opacity: 1;
}

/* ── Side Motto ── */
/* ── Side Motto ── */
.side-motto {
  position: fixed;
  left: 25%;
  bottom: 60px;
  transform: translateX(-50%) translateY(20px);
  font-family: "Geist", monospace;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.8em;
  color: rgba(255, 255, 255, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 1.5s 1.2s ease, transform 1.5s 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  white-space: nowrap;
}

body.revealed .side-motto {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cv-panel::-webkit-scrollbar {
  display: none;
}

/* ── Avatar ── */
.cv-avatar {
  width: 180px;
  height: 260px;
  object-fit: cover;
  border-radius: 32px;
  /* Large squircle */
  filter: grayscale(1) contrast(1.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0;
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.03);
  order: 2;
  /* Move to right in flex */
}

.cv-avatar:hover {
  filter: grayscale(0.1) contrast(1.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.04);
}

/* ── Header ── */
.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.cv-header-text {
  order: 1;
  flex: 1;
}

.cv-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 10px;
}

.cv-name {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 8px;
}

.cv-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.cv-contacts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-contacts a,
.cv-contacts span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  font-weight: 300;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-contacts svg {
  opacity: 0.6;
}

.cv-contacts a:hover {
  color: rgba(255, 255, 255, 0.7);
}

.cv-contacts a:hover svg {
  opacity: 1;
}

/* ── Divider ── */
.cv-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 24px 0;
}

/* ── Block ── */
.cv-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cv-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 4px;
}

/* ── Skills ── */
.cv-skill-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cv-skill-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.15);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.cv-skills span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  position: relative;
  transition: color 0.3s;
  cursor: pointer;
}

.cv-skills span:hover {
  color: #fff;
}

.cv-skills span::after {
  content: '·';
  position: absolute;
  right: -10px;
  color: rgba(255, 255, 255, 0.15);
}

.cv-skills span:last-child::after {
  display: none;
}

/* ── Experience ── */
.cv-exp {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  margin-left: -16px;
  border-radius: 4px;
  transition: background 0.4s ease, transform 0.4s ease;
  cursor: default;
}

.cv-exp:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(4px);
}

.cv-exp:hover .cv-exp-header h3 {
  color: #fff;
}

.cv-exp-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  user-select: none;
}

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

.cv-icon {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.2);
  transition: transform 0.4s ease, color 0.4s ease;
}

.cv-exp.active .cv-icon {
  transform: rotate(180deg);
  color: #fff;
}

.cv-exp-header h3 {
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: -0.01em;
}

.cv-role {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.cv-exp p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.65;
  font-weight: 300;
}

.cv-demo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  pointer-events: auto;
}

.cv-demo {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 99px;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  white-space: nowrap;
}

.cv-demo:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.cv-cred {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.18);
  font-weight: 300;
  letter-spacing: 0.02em;
  font-family: monospace;
}

/* ── Accordion Content ── */
.cv-exp-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-top 0.4s ease;
  margin-top: 0;
}

.cv-exp.active .cv-exp-content {
  max-height: 500px;
  /* Big enough for bullets */
  opacity: 1;
  margin-top: 10px;
}

.cv-exp-content p {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.5);
}

.cv-exp-content ul {
  list-style: none;
  padding-left: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.cv-exp-content li {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.5;
  position: relative;
  padding-left: 14px;
}

.cv-exp-content li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.12);
}

/* ── Footer quote ── */
.cv-footer {
  margin-top: 20px;
}

.cv-quote {
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.22);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 24px;
}

/* ── Page Load Fade-In ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 2.5s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Experience h3 transition ── */
.cv-exp-header h3 {
  transition: color 0.3s ease;
}

/* ── Lofi Widget ── */
.lofi-widget {
  position: fixed;
  top: 24px;
  left: 32px;
  z-index: 200;
  pointer-events: auto;
}

.lofi-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.lofi-icon {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.35);
}

.lofi-text {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 300;
}

.lofi-control:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

.lofi-control:hover .lofi-text,
.lofi-control:hover .lofi-icon {
  color: #fff;
}

/* Play state animation */
.lofi-widget.playing .lofi-icon {
  animation: pulse 1.5s infinite ease-in-out;
  color: #fff;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.15);
  }
}

/* ── Initiation Overlay ── */
#experience-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.95);
  /* Slightly darker for absolute coverage */
  backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Removed overlayIn keyframes to prevent flash */
#experience-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-40px) scale(0.98);
}

.overlay-content {
  text-align: center;
  max-width: 380px;
  padding: 48px 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 24px;
  animation: contentIn 0.7s 0.2s ease both;
}

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.overlay-title {
  font-size: 0.65rem;
  letter-spacing: 0.45em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 32px;
}

/* ── AirPods ── */
.airpods-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
  height: 120px;
}

.airpod {
  width: 52px;
  height: 100px;
}

.airpod-left {
  animation: floatL 3s ease-in-out infinite;
  transform-origin: center bottom;
}

.airpod-right {
  animation: floatR 3s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes floatL {

  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }

  50% {
    transform: translateY(-8px) rotate(-3deg);
  }
}

@keyframes floatR {

  0%,
  100% {
    transform: translateY(-4px) rotate(6deg);
  }

  50% {
    transform: translateY(4px) rotate(3deg);
  }
}

/* ── Sound Waves ── */
.sound-waves {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
}

.wave {
  display: block;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
}

.w1 {
  width: 2px;
  height: 28px;
  animation: wavePulse 1.2s 0.0s ease-in-out infinite;
}

.w2 {
  width: 2px;
  height: 44px;
  animation: wavePulse 1.2s 0.2s ease-in-out infinite;
}

.w3 {
  width: 2px;
  height: 28px;
  animation: wavePulse 1.2s 0.4s ease-in-out infinite;
}

@keyframes wavePulse {

  0%,
  100% {
    transform: scaleY(0.4);
    opacity: 0.3;
  }

  50% {
    transform: scaleY(1.0);
    opacity: 0.9;
  }
}

.overlay-msg {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 32px;
  line-height: 1.7;
}

.overlay-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 12px 36px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  cursor: pointer;
  border-radius: 99px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.overlay-btn:hover {
  background: #fff;
  color: #050505;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.15);
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .side-motto {
    display: none;
  }

  .lofi-widget {
    top: 12px;
    left: 12px;
    transform: scale(0.85);
    transform-origin: top left;
  }

  .cv-panel {
    width: 100%;
    padding: 80px 24px 120px 24px;
    top: 0;
    left: 0;
    height: 100vh;
    /* Ultra-transparent overlay to keep gears clearly visible */
    background: rgba(5, 5, 5, 0.4);
    backdrop-filter: blur(2px);
    -webkit-mask-image: none;
    mask-image: none;
  }

  .cv-header {
    flex-direction: column-reverse;
    /* Text on top of Avatar on mobile */
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .cv-header-text {
    width: 100%;
  }

  .cv-avatar {
    width: 120px;
    height: 170px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
  }

  .cv-contacts {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .overlay-content {
    max-width: 90%;
    padding: 32px 20px;
  }

  .overlay-title {
    letter-spacing: 0.3em;
  }

  .overlay-msg {
    font-size: 0.95rem;
  }
}
.cv-owner{font-size:.8rem;color:rgba(255,255,255,.5);margin:8px 0 12px;letter-spacing:.04em}.cv-owner a{color:#ddd;text-decoration:none;border-bottom:1px solid #ffffff30;padding-bottom:2px}.cv-owner a:hover{color:white;border-color:white}
