/* ==========================================================================
   PUPSKA PORTFOLIO — 2.5D ROULETTE DRUM WITH TACTILE TENSION
   Pitch Black Canvas (#000000) & Charcoal Cards (#141418)
   Cards THEMSELVES form the Peeking Top/Bottom Lips
   ========================================================================== */

:root {
  /* Palette */
  --bg-body: #000000;
  --card-bg: #141418;
  --card-bg-elevated: #1A1A22;
  --card-bg-hover: #1F1F2A;
  --card-border: #27272E;
  --card-border-subtle: #1E1E24;

  /* Typography Colors */
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-tertiary: #71717A;

  /* Single Violet Accent */
  --accent: #8B5CF6;
  --accent-hover: #A78BFA;
  --accent-subtle: #241A3D;
  --accent-text: #FFFFFF;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout & Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-card: 26px;
  --radius-full: 9999px;
  --nav-height: 64px;

  /* Tension Springs & Transitions */
  --spring-settle: cubic-bezier(0.34, 1.45, 0.64, 1);
  --transition-fast: 0.15s ease;
  --transition-roulette: 0.52s var(--spring-settle);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessible Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--accent);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 1000;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   Interactive Cryptographic Background Canvas
   ========================================================================== */

#crypto-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ==========================================================================
   Click to Enter Gateway Overlay
   ========================================================================== */

.enter-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(10, 10, 14, 0.45) 0%, rgba(0, 0, 0, 0.88) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease, visibility 0.5s ease;
}

.enter-gate:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.enter-gate.is-exiting {
  opacity: 0;
  transform: scale(1.06);
  filter: blur(8px);
  pointer-events: none;
  visibility: hidden;
}

.enter-gate-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
  max-width: 90vw;
}

.enter-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.enter-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: enterDotPulse 1.8s ease-in-out infinite;
}

@keyframes enterDotPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
    box-shadow: 0 0 14px rgba(139, 92, 246, 1);
  }
}

.enter-gate-kicker {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.enter-gate-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #FFFFFF;
  text-shadow: 0 0 24px rgba(139, 92, 246, 0.7), 0 0 48px rgba(139, 92, 246, 0.35);
  animation: promptBreathe 2.4s ease-in-out infinite;
  transition: transform 0.25s ease, text-shadow 0.25s ease;
}

.gate-bracket {
  color: var(--accent);
  font-weight: 800;
  transition: transform 0.3s cubic-bezier(0.34, 1.5, 0.64, 1);
  display: inline-block;
}

.enter-gate:hover .gate-bracket:first-child {
  transform: translateX(-5px);
}

.enter-gate:hover .gate-bracket:last-child {
  transform: translateX(5px);
}

.enter-gate:hover .enter-gate-prompt {
  transform: scale(1.03);
  text-shadow: 0 0 32px rgba(139, 92, 246, 0.95), 0 0 60px rgba(139, 92, 246, 0.55);
}

@keyframes promptBreathe {
  0%, 100% {
    opacity: 0.86;
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 28px rgba(139, 92, 246, 0.85), 0 0 54px rgba(139, 92, 246, 0.45);
  }
}

.enter-gate-subtext {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(220, 220, 235, 0.55);
  letter-spacing: 0.08em;
}

/* Pre-enter visibility control */
body:not(.is-entered) .floating-nav-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-28px);
  animation: none;
}

body:not(.is-entered) .roulette-viewport {
  opacity: 0;
  pointer-events: none;
}

body.is-entered .floating-nav-dock {
  animation: dockEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.32s backwards;
}

body.is-entered .roulette-viewport {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   Floating Button Capsule Dock (Separated Navbar)
   ========================================================================== */

@keyframes dockEntrance {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-28px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.floating-nav-dock {
  position: fixed;
  top: max(18px, env(safe-area-inset-top, 18px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 6px 12px 6px 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  max-width: calc(100vw - 28px);
}

.brand-btn {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.brand-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
  transition: transform 0.25s var(--spring-settle), box-shadow 0.25s ease;
}

.brand-btn:hover .brand-dot {
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.9);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--card-border);
}

.nav-buttons-group {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-buttons-group::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: var(--radius-full);
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border-subtle);
  color: var(--text-secondary);
  transition: transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.nav-label-desktop {
  display: inline;
}

.nav-label-mobile {
  display: none;
}

.nav-btn:hover {
  color: var(--text-primary);
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.2);
}

.nav-btn:active {
  transform: translateY(0) scale(0.98);
}

.nav-btn.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}

/* ==========================================================================
   Roulette Drum Viewport & Stage
   ========================================================================== */

.roulette-viewport {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: max(84px, calc(env(safe-area-inset-top, 0px) + 68px)) max(20px, env(safe-area-inset-right, 20px)) max(24px, env(safe-area-inset-bottom, 24px)) max(20px, env(safe-area-inset-left, 20px));
  perspective: 1200px;
  -webkit-perspective: 1200px;
  touch-action: none; /* Custom touch tension drag handler */
}

.roulette-stage {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: 100%;
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

/* Decryption Shutter Laser Slit Line */
.roulette-stage::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -2%;
  right: -2%;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(167, 139, 250, 0.85) 15%, #FFFFFF 50%, rgba(167, 139, 250, 0.85) 85%, transparent 100%);
  box-shadow: 0 0 16px #8B5CF6, 0 0 32px #8B5CF6, 0 0 48px rgba(255, 255, 255, 0.8);
  transform: translateY(-50%) scaleX(0);
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  border-radius: var(--radius-full);
}

body.is-entered .roulette-stage::before {
  animation: laserSlitFlash 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes laserSlitFlash {
  0% {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
  }
  20% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
  }
  50% {
    opacity: 0.9;
    transform: translateY(-50%) scaleX(1.03);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scaleX(1.06);
  }
}

body.is-entered .roulette-stage {
  animation: shutterUnfurl 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shutterUnfurl {
  0% {
    opacity: 0;
    transform: scaleY(0.015) scaleX(0.7) translateZ(-60px);
    filter: brightness(3.2) contrast(1.5) drop-shadow(0 0 35px rgba(139, 92, 246, 0.9));
  }
  32% {
    opacity: 1;
    transform: scaleY(0.04) scaleX(1.02) translateZ(-30px);
    filter: brightness(2.4) drop-shadow(0 0 25px rgba(139, 92, 246, 0.7));
  }
  68% {
    transform: scaleY(1.03) scaleX(1.01) translateZ(8px);
    filter: brightness(1.2);
  }
  100% {
    opacity: 1;
    transform: scaleY(1) scaleX(1) translateZ(0);
    filter: brightness(1);
  }
}

/* ==========================================================================
   Roulette Cards — The Cards THEMSELVES are the Lips
   ========================================================================== */

.roulette-card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  will-change: transform, opacity, filter;
  transition: transform var(--transition-roulette), opacity var(--transition-roulette), filter var(--transition-roulette), border-color 0.25s ease;
  user-select: none;
}

/* When dragging with tension, disable transitions for 1:1 tactile tracking */
.roulette-card.is-dragging {
  transition: none !important;
}

/* Lip Indicator Strip inside cards */
.card-lip-strip {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Roulette 2.5D States
   -------------------------------------------------------------------------- */

/* Non-Selected Cards — Dimmed / Less Visible Content instead of complete blank */
.roulette-card:not(.is-active) {
  cursor: pointer;
  filter: brightness(0.7);
}

.roulette-card:not(.is-active) .card-scrollable-content {
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.roulette-card:not(.is-active) .card-anim-item {
  opacity: 0.35;
  transform: translateY(4px);
}

.roulette-card:not(.is-active):hover {
  filter: brightness(0.88);
}

.roulette-card:not(.is-active):hover .card-anim-item {
  opacity: 0.6;
}

/* Active Centered Card */
.roulette-card.is-active {
  transform: translateY(0) translateZ(0) rotateX(0deg) scale(1);
  opacity: 1;
  visibility: visible;
  filter: brightness(1);
  z-index: 10;
  cursor: grab;
}

.roulette-card.is-active:active {
  cursor: grabbing;
}

/* Top Peeking Lip (The Previous Card itself) */
.roulette-card.is-top-lip {
  transform: translateY(calc(-100% + 48px)) translateZ(-25px) scale(0.97);
  opacity: 1;
  filter: brightness(0.7);
  z-index: 6;
  cursor: pointer;
  transition: transform var(--transition-roulette), opacity 0.48s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease, border-color 0.25s ease;
}

.roulette-card.is-top-lip .card-scrollable-content {
  justify-content: flex-end;
}

.roulette-card.is-top-lip:hover {
  transform: translateY(calc(-100% + 56px)) translateZ(-15px) scale(0.975);
  filter: brightness(0.88);
  border-color: rgba(139, 92, 246, 0.6);
}

/* Bottom Peeking Lip (The Next Card itself) */
.roulette-card.is-bottom-lip {
  transform: translateY(calc(100% - 48px)) translateZ(-25px) scale(0.97);
  opacity: 1;
  filter: brightness(0.7);
  z-index: 6;
  cursor: pointer;
  transition: transform var(--transition-roulette), opacity 0.48s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease, border-color 0.25s ease;
}

.roulette-card.is-bottom-lip:hover {
  transform: translateY(calc(100% - 56px)) translateZ(-15px) scale(0.975);
  filter: brightness(0.88);
  border-color: rgba(139, 92, 246, 0.6);
}

/* Hidden Cards beyond the lips — Upward slide & fade behind navbar without abrupt popping */
.roulette-card.is-hidden-above {
  transform: translateY(-135%) scale(0.94);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.52s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
}

.roulette-card.is-hidden-below {
  transform: translateY(135%) scale(0.94);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.52s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
}

/* Internal Card Scrollable Container */
.card-scrollable-content {
  width: 100%;
  height: 100%;
  overflow: hidden; /* Fix internal scrolling on cards */
  padding: 22px clamp(20px, 3.5vw, 32px) 18px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Even headroom and footroom on all cards */
}

/* Card Internal Staggered Content Reveal */
.card-anim-item {
  opacity: 0.35;
  transform: translateY(4px);
  transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.roulette-card.is-active .card-anim-item {
  opacity: 1;
  transform: translateY(0);
}

.roulette-card.is-active .card-anim-item:nth-child(1) { transition-delay: 0.04s; }
.roulette-card.is-active .card-anim-item:nth-child(2) { transition-delay: 0.10s; }
.roulette-card.is-active .card-anim-item:nth-child(3) { transition-delay: 0.16s; }
.roulette-card.is-active .card-anim-item:nth-child(4) { transition-delay: 0.22s; }

/* ==========================================================================
   Card Content Layouts
   ========================================================================== */

.section-header {
  margin-bottom: 12px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.15;
}

.section-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 620px;
  line-height: 1.45;
}

/* Card 0: Hero */
#card-hero .card-scrollable-content {
  justify-content: center;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.98rem;
  font-weight: 500;
  color: rgba(222, 224, 238, 0.85);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-divider {
  color: rgba(139, 92, 246, 0.6);
  font-size: 0.82rem;
}

.hero-lead {
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.22s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--text-primary);
  color: #000000;
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.45);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary span[aria-hidden="true"] {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-primary:hover span[aria-hidden="true"] {
  transform: translateY(3px);
}

.btn-secondary {
  background: var(--card-bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: var(--card-bg-hover);
  border-color: rgba(139, 92, 246, 0.4);
  color: #FFFFFF;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(139, 92, 246, 0.15);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* Card 1: About */
.about-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
  max-width: 720px;
}

.about-body p + p {
  margin-top: 10px;
  color: var(--text-secondary);
}

.about-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.about-pill {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.about-pill:hover {
  color: var(--text-primary);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

/* Card 2: Work & Projects (Two-Row Principle Grid) */
.work-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.inner-work-card {
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: unset;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.28s ease, background-color 0.25s ease;
}

.inner-work-card:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background-color: var(--card-bg-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(139, 92, 246, 0.15);
}

.work-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.work-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.work-link-icon {
  color: var(--text-secondary);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.inner-work-card:hover .work-link-icon {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.work-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 8px;
}

.work-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.work-footer-link:hover {
  color: var(--accent);
}

.work-footer-link svg {
  transition: transform var(--transition-fast);
}

.work-footer-link:hover svg {
  transform: translateX(4px);
}

/* Card 3: Skills */
.skills-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.skill-col {
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.28s ease, background-color 0.25s ease;
}

.skill-col:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(139, 92, 246, 0.12);
}

.skill-col-heading {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 8px;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.skill-item:hover {
  transform: translateX(4px);
  color: #FFFFFF;
}

.skill-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-item:hover .skill-bullet {
  transform: scale(1.4);
  box-shadow: 0 0 10px var(--accent);
}

/* Card 4: Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-card-box {
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.28s ease, background-color 0.25s ease;
}

.contact-card-box:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(139, 92, 246, 0.12);
}

.contact-channel-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 2px;
}

.contact-value {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.contact-sub-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  transition: transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-sm:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

.btn-sm:active {
  transform: translateY(0) scale(0.97);
}

.btn-sm.copied {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

/* ==========================================================================
   Side Pagination Dots
   ========================================================================== */

@keyframes dotsEntrance {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.deck-dots-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
  animation: dotsEntrance 0.8s 0.25s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.deck-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--card-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s var(--spring-settle);
}

.deck-dot:hover {
  background: var(--text-primary);
  transform: scale(1.3);
}

.deck-dot.active {
  height: 26px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  transform: none;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */

.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card-bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--spring-settle), opacity 0.25s var(--spring-settle);
  z-index: 1000;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 820px) {
  .roulette-viewport {
    padding: max(72px, calc(env(safe-area-inset-top, 0px) + 58px)) 16px 16px;
  }

  .deck-dots-nav {
    display: none;
  }
}

@media (max-width: 680px), (max-height: 560px) {
  .nav-label-desktop {
    display: none;
  }

  .nav-label-mobile {
    display: inline;
  }

  .floating-nav-dock {
    top: max(8px, env(safe-area-inset-top, 8px));
    padding: 4px 6px 4px 10px;
    gap: 6px;
    max-width: calc(100vw - 16px);
  }

  .brand-btn {
    font-size: 0.95rem;
    padding: 4px;
    gap: 5px;
  }

  .brand-dot {
    width: 6px;
    height: 6px;
  }

  .nav-divider {
    height: 16px;
  }

  .nav-buttons-group {
    gap: 4px;
  }

  .nav-btn {
    padding: 5px 9px;
    font-size: 0.76rem;
    min-height: 36px;
  }

  .roulette-viewport {
    padding: max(62px, calc(env(safe-area-inset-top, 0px) + 52px)) 12px max(14px, env(safe-area-inset-bottom, 14px));
  }

  .roulette-stage {
    max-height: clamp(375px, 63vh, 450px);
  }

  .card-scrollable-content {
    padding: 16px 18px 14px;
    justify-content: center;
    overflow: hidden;
  }

  .section-header {
    margin-bottom: 8px;
  }

  .section-label {
    font-size: 0.72rem;
    margin-bottom: 2px;
  }

  .section-title {
    font-size: clamp(1.35rem, 5.2vw, 1.65rem);
  }

  .section-description {
    font-size: 0.8rem;
    line-height: 1.35;
    margin-top: 2px;
  }

  /* Hero Section */
  .hero-headline,
  .hero-title {
    font-size: clamp(1.6rem, 6.5vw, 2.1rem);
    line-height: 1.15;
    margin-bottom: 5px;
  }

  .hero-meta-row {
    gap: 8px;
    font-size: 0.86rem;
    margin-bottom: 10px;
  }

  .hero-bio {
    font-size: 0.86rem;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn {
    padding: 9px 16px;
    font-size: 0.84rem;
    min-height: 42px;
  }

  /* About Section */
  .about-body {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .about-body p + p {
    margin-top: 6px;
  }

  .about-pills-row {
    gap: 6px;
    margin-top: 10px;
  }

  .about-pill {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  /* Work Section */
  .work-cards-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .inner-work-card {
    padding: 9px 13px;
  }

  .work-title {
    font-size: 0.98rem;
  }

  .work-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 4px;
  }

  .work-footer-link {
    font-size: 0.78rem;
  }

  /* Skills Section */
  .skills-columns-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .skill-col {
    padding: 8px 12px;
  }

  .skill-col-heading {
    font-size: 0.72rem;
    margin-bottom: 4px;
    padding-bottom: 3px;
  }

  .skill-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .skill-item {
    font-size: 0.82rem;
  }

  /* Contact Section */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-card-box {
    padding: 9px 13px;
    gap: 6px;
  }

  .contact-channel-title {
    font-size: 0.68rem;
  }

  .contact-value {
    font-size: 0.88rem;
  }

  .contact-sub-value {
    font-size: 0.72rem;
  }

  .contact-actions {
    gap: 6px;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    min-height: 38px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .work-card-top {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Prefers-reduced-motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card-anim-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .floating-nav-dock,
  .deck-dots-nav,
  body.is-entered .roulette-stage,
  body.is-entered .roulette-stage::before,
  .enter-gate-prompt,
  .enter-pulse-dot {
    animation: none !important;
  }

  body.is-entered .roulette-stage::before {
    display: none !important;
  }
}
