/* ==========================================================================
   ARDHI HADIYAN - UNIFIED DESIGN SYSTEM & STYLESHEET
   Consolidated styles for Portfolio, SplitBill, StoryMaker & Workout Tracker
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Warm Scrapbook / Neo-Brutalist Palette (Portfolio, SplitBill, StoryMaker) */
  --cream: #FFF6E5;
  --paper: #FFFDF5;
  --pink: #FFC4D6;
  --yellow: #FFE066;
  --mint: #B5EAD7;
  --lavender: #D9C7FF;
  --peach: #FFD8B5;
  --sky: #B5DEFF;
  --coral: #FF9E80;
  --ink: #0F0F0F;

  /* Brand Accents */
  --netflix-red: #E50914;
  --spotify-green: #1DB954;
  --maps-blue: #1A73E8;

  /* Dark Aesthetic Palette (Workout Tracker) */
  --bg: #0a0a0b;
  --bg-2: #0f0f11;
  --card: #15151a;
  --card-2: #1a1a20;
  --border: #24242c;
  --border-2: #2e2e38;
  --fg: #f5f5f7;
  --muted: #8a8a94;
  --muted-2: #5a5a64;
  --accent: #d4ff3f;
  --accent-2: #b8e832;
  --accent-glow: rgba(212, 255, 63, 0.4);
  --danger: #ff4d2e;
  --warning: #ff9d2e;
  --cyan: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.35);
}

/* --------------------------------------------------------------------------
   2. GLOBAL BASE & RESET
   -------------------------------------------------------------------------- */
* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrapbook Grid Pattern for Light-Themed Pages */
body.light-theme,
body:not(.dark-theme):not(.workout-body) {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background-color: var(--cream);
  color: var(--ink);
  background-image:
    linear-gradient(rgba(15, 15, 15, .07) 2px, transparent 2px),
    linear-gradient(90deg, rgba(15, 15, 15, .07) 2px, transparent 2px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}

/* Dark Radial Grid Pattern for Workout Page */
body.workout-body,
body.dark-theme {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Outfit', sans-serif;
  overscroll-behavior-y: none;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212, 255, 63, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 77, 46, 0.04), transparent 70%),
    none;
}

body.workout-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent 80%);
}

.grid-bg {
  background-image:
    linear-gradient(rgba(15, 15, 15, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 15, 15, .06) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.font-display {
  font-family: 'Archivo Black', 'Bricolage Grotesque', sans-serif;
  letter-spacing: -.02em;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

.font-hand {
  font-family: 'Caveat', cursive;
}

.font-sans-ui {
  font-family: 'Inter', system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   4. NEO-BRUTALISM & SCRAPBOOK DESIGN SYSTEM
   -------------------------------------------------------------------------- */
/* Hard Brutal Shadows */
.shadow-brut {
  box-shadow: 6px 6px 0 0 var(--ink);
}

.shadow-brut-sm {
  box-shadow: 4px 4px 0 0 var(--ink);
}

.shadow-brut-lg {
  box-shadow: 10px 10px 0 0 var(--ink);
}

.shadow-brut-xl {
  box-shadow: 14px 14px 0 0 var(--ink);
}

/* Scrapbook Card with Paper Texture */
.card {
  border: 3px solid var(--ink);
  background: var(--paper);
  position: relative;
}

.paper-texture {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

/* Washi Tape Stickers */
.tape {
  position: absolute;
  width: 130px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 1px dashed rgba(0, 0, 0, 0.15);
  border-right: 1px dashed rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.tape-yellow {
  background-color: rgba(255, 224, 102, 0.7);
}

.tape-pink {
  background-color: rgba(255, 196, 214, 0.7);
}

.tape-mint {
  background-color: rgba(181, 234, 215, 0.7);
}

.tape-lavender {
  background-color: rgba(217, 199, 255, 0.7);
}

/* Highlighter Pen Markers */
.marker {
  background: linear-gradient(180deg, transparent 50%, var(--yellow) 50%);
  padding: 0 4px;
  display: inline-block;
  background-repeat: no-repeat;
}

.marker-pink {
  background: linear-gradient(180deg, transparent 50%, var(--pink) 50%);
  padding: 0 4px;
  display: inline-block;
  background-repeat: no-repeat;
}

/* Brutalist Inputs */
.input-brut {
  border: 3px solid var(--ink);
  background: var(--cream);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  width: 100%;
  border-radius: 0;
}

.input-brut:focus {
  outline: none;
  background: #fff;
  box-shadow: 4px 4px 0 0 var(--ink);
}

/* Tags & Badges */
.tag {
  border: 2px solid var(--ink);
  background: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 8px;
  text-transform: uppercase;
}

.placeholder-cross {
  background-image:
    linear-gradient(45deg, transparent 48%, rgba(15, 15, 15, .15) 48%, rgba(15, 15, 15, .15) 52%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(15, 15, 15, .15) 48%, rgba(15, 15, 15, .15) 52%, transparent 52%);
  background-size: 24px 24px;
}

.border-dashed-ink {
  border-style: dashed !important;
  border-color: var(--ink) !important;
}

/* --------------------------------------------------------------------------
   5. BUTTONS & INTERACTIVE ELEMENTS
   -------------------------------------------------------------------------- */
/* Brutalist Solid Action Button */
.btn-brut {
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.btn-brut:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 0 var(--ink);
}

.btn-brut:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--ink);
}

.hover-lift {
  transition: transform .15s ease, box-shadow .15s ease;
}

.hover-lift:hover {
  transform: translate(-3px, -3px) rotate(-1deg);
  box-shadow: 10px 10px 0 0 var(--ink);
}

/* Sleek UI Buttons */
.btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .2s, border-color .2s, transform .1s, color .2s, box-shadow .2s;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

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

.btn-ghost {
  background: var(--card-2);
  color: var(--fg);
  border-color: var(--border-2);
}

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

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(255, 77, 46, .3);
}

.btn-danger:hover {
  background: rgba(255, 77, 46, .1);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: rgba(212, 255, 63, 0.1);
}

.btn-cyan {
  background: var(--cyan);
  color: var(--bg);
}

.btn-cyan:hover {
  background: #0284c7;
}

/* Category Filter Pills */
.cat-pill {
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}

.cat-pill:hover {
  border-color: var(--muted-2);
  color: var(--fg);
}

.cat-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   6. SHARED UI UTILITIES & ANIMATIONS
   -------------------------------------------------------------------------- */
/* Continuous Ticker Marquee */
.marquee {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* Green Live Pulse Dot */
.pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.skill-bar {
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}

/* Scroll Reveals */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* View transitions */
.view {
  animation: fade-in .35s ease-out;
}

.view.hidden-view {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

/* Toast Notifications */
#toast,
.toast {
  position: fixed;
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  backdrop-filter: blur(10px);
}

/* Light Theme Toast (Bottom Right) */
body:not(.workout-body) #toast,
body:not(.workout-body) .toast {
  bottom: 24px;
  right: 24px;
  transform: translateY(100px);
}

/* Dark Theme Toast (Top Floating Banner) */
body.workout-body #toast,
body.workout-body .toast {
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: var(--card-2);
  border: 1px solid var(--border-2);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

#toast.show,
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.workout-body #toast.show,
body.workout-body .toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Global Floating Glow Effect */
.floating-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  opacity: .35;
  animation: float 9s ease-in-out infinite;
  z-index: 0;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(40px, -30px);
  }
}

/* Fullscreen Flash Trigger */
#flash {
  position: fixed;
  inset: 0;
  background: var(--accent);
  pointer-events: none;
  opacity: 0;
  z-index: 130;
  mix-blend-mode: overlay;
}

#flash.active {
  animation: flash 1s ease-out;
}

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

  15% {
    opacity: .55;
  }

  100% {
    opacity: 0;
  }
}

/* Modals & Bottom Sheets */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 92vh;
  background: var(--bg-2);
  border-top: 1px solid var(--border-2);
  border-radius: 28px 28px 0 0;
  z-index: 100;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}

.modal-sheet.active {
  transform: translateY(0);
}

.exercise-modal-overlay {
  z-index: 150 !important;
}

.exercise-modal-sheet {
  z-index: 160 !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
  border-left: 2px solid var(--ink);
}

::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 2px solid var(--cream);
}

.custom-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: var(--bg);
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   7. PORTFOLIO & SHOWCASE STYLES
   -------------------------------------------------------------------------- */
.sec-hero {
  background: transparent;
  position: relative;
}

.sec-stats {
  background: var(--mint);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.sec-about {
  background: transparent;
}

.sec-skills {
  background: var(--lavender);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.sec-exp {
  background: transparent;
}

.sec-proj {
  background: var(--peach);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.sec-gallery {
  background: transparent;
}

.sec-social {
  background: var(--pink);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

/* SaltyAom-inspired Hero Styling */
.sec-hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-big-title {
  font-family: 'Archivo Black', sans-serif;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: var(--ink);
  opacity: 0.08;
  text-transform: uppercase;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: min(16vw, 150px);
  white-space: nowrap;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink);
  opacity: 0.65;
  pointer-events: none;
  z-index: 25;
  animation: hintBounce 2s infinite ease-in-out;
}

@keyframes hintBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

.hero-vector-img {
  filter: drop-shadow(8px 12px 0px rgba(15, 15, 15, 0.95));
  transition: filter 0.25s ease-out;
  transform-origin: center bottom;
}

.hero-vector-img:hover {
  filter: drop-shadow(12px 18px 0px rgba(15, 15, 15, 1));
}

@keyframes heroFloat {

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

  50% {
    transform: translateY(-20px) rotate(0.6deg);
  }
}

.hero-float-anim {
  animation: heroFloat 6s ease-in-out infinite;
}

.hero-badge-tag {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.hero-badge-tag:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 4px 4px 0 0 var(--ink);
}

.mobile-menu {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity .3s ease, transform .3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.num-marker {
  font-family: 'Archivo Black', sans-serif;
  -webkit-text-stroke: 2px var(--ink);
  color: transparent;
}

/* --------------------------------------------------------------------------
   8. STORYMAKER STUDIO COMPONENTS
   -------------------------------------------------------------------------- */
.template-btn.active {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 0 var(--ink);
  font-weight: 700;
  transform: translate(-1px, -1px);
}

.template-btn.active[data-template="netflix"] {
  background-color: var(--pink);
  color: var(--ink);
}

.template-btn.active[data-template="map"] {
  background-color: var(--sky);
  color: var(--ink);
}

.template-btn.active[data-template="spotify"] {
  background-color: var(--mint);
  color: var(--ink);
}

.canvas-wrapper {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 4px var(--ink);
  border-radius: 0px;
  transition: width 0.3s ease, height 0.3s ease;
  background: #000;
  user-select: none;
  max-width: 100%;
}

.ratio-story {
  width: 360px;
  max-width: 100%;
  aspect-ratio: 9 / 16;
}

.ratio-portrait {
  width: 360px;
  max-width: 100%;
  aspect-ratio: 4 / 5;
}

.ratio-square {
  width: 360px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
}

.canvas-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  transition: filter 0.1s ease;
  cursor: grab;
}

.canvas-photo:active {
  cursor: grabbing;
}

.filter-netflix-active {
  filter: contrast(1.25) saturate(1.1) brightness(0.92);
}

.netflix-gradient-top {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0) 100%);
}

.netflix-gradient-bottom {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 35%, rgba(0, 0, 0, 0.4) 65%, rgba(0, 0, 0, 0) 100%);
}

.spotify-glass {
  background: rgba(18, 18, 18, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.spotify-glass-dark {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(18, 18, 18, 0.92) 50%, rgba(18, 18, 18, 0.98) 100%);
}

.maps-glass {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 4px 4px 0 0 var(--ink);
}

.maps-glass-dark {
  background: rgba(32, 33, 36, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

input[type=range] {
  accent-color: var(--ink);
}

[contenteditable="true"]:hover {
  outline: 1px dashed rgba(255, 255, 255, 0.5);
  border-radius: 2px;
}

[contenteditable="true"]:focus {
  outline: 2px solid var(--yellow);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
}

.capturing .spotify-glass {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(18, 18, 18, 0.96) !important;
}

.capturing .maps-glass {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(255, 255, 255, 0.98) !important;
}

.capturing .maps-glass-dark {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(32, 33, 36, 0.98) !important;
}

.canvas-wrapper,
.canvas-wrapper * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

/* --------------------------------------------------------------------------
   9. WORKOUT TRACKER & TIMER COMPONENTS
   -------------------------------------------------------------------------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: rgba(10, 10, 11, 0.72);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.workout-card {
  position: relative;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  text-align: left;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
}

.workout-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.workout-card:hover,
.workout-card:focus-visible {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(212, 255, 63, .08);
  outline: none;
}

.workout-card:hover::before {
  opacity: 1;
}

.workout-card:active {
  transform: translateY(0);
  transition: transform .1s;
}

.workout-number {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 56px;
  font-weight: 700;
  line-height: .9;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .02));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
}

.progress-bar {
  height: 10px;
  background: var(--card-2);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 100px;
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
  position: relative;
  box-shadow: 0 0 14px var(--accent-glow);
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  animation: shimmer 2.2s linear infinite;
  border-radius: 100px;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.exercise-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  transition: border-color .3s, background .3s;
}

.exercise-card.complete {
  border-color: rgba(212, 255, 63, .45);
  background: linear-gradient(180deg, rgba(212, 255, 63, .04), var(--card));
}

.exercise-card.complete .exercise-name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.exercise-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}

.exercise-illustration {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform .2s;
  overflow: hidden;
}

.exercise-header:hover .exercise-illustration {
  transform: scale(1.05);
}

.exercise-illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.set-checkbox {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid var(--border-2);
  background: var(--card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s cubic-bezier(.2, .8, .2, 1), background .2s, border-color .2s, box-shadow .2s;
  flex-shrink: 0;
  position: relative;
}

.set-checkbox:hover {
  border-color: var(--muted);
  transform: scale(1.04);
}

.set-checkbox:active {
  transform: scale(.92);
}

.set-checkbox.checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
  animation: check-pop .35s cubic-bezier(.2, .8, .2, 1);
}

.set-checkbox.checked::after {
  content: '';
  width: 18px;
  height: 10px;
  border-left: 3px solid var(--bg);
  border-bottom: 3px solid var(--bg);
  transform: rotate(-45deg) translate(1px, -2px);
}

@keyframes check-pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}

.modal-image-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ffffff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.modal-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(10, 10, 11, 0.88) 90%);
  pointer-events: none;
}

.rest-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 11, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.rest-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.rest-content {
  text-align: center;
  transform: scale(0.9);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
  width: 100%;
  max-width: 380px;
  padding: 0 16px;
}

.rest-overlay.active .rest-content {
  transform: scale(1);
}

.large-timer-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 30px;
}

.large-timer-ring {
  transform: rotate(-90deg);
  transition: stroke-dashoffset .3s linear, stroke .3s;
}

.large-time-display {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}

.timed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.timer-btn-set {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1.5px solid var(--border-2);
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.timer-btn-set:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.timer-btn-set.active-timed {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
}

.timer-preset-chip {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}

.timer-preset-chip:hover,
.timer-preset-chip.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--cyan);
  color: var(--fg);
}

.db-exercise-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color .2s, transform .15s;
  cursor: pointer;
}

.db-exercise-card:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.db-exercise-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.db-exercise-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.builder-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

.pin-spacer {
  margin-top: -105px !important;
}

/* Project Carousel Styles */
.project-carousel-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-right: calc(100% - 320px);
}
.project-carousel-track::-webkit-scrollbar {
  display: none;
}
.project-card-item {
  flex-shrink: 0;
  width: 320px;
  max-width: 85vw;
}
@media (min-width: 640px) {
  .project-carousel-track {
    padding-right: calc(100% - 360px - 1.5rem);
  }
  .project-card-item {
    width: 360px;
  }
}
@media (min-width: 1024px) {
  .project-carousel-track {
    padding-right: calc(100% - 390px - 2rem);
  }
  .project-card-item {
    width: 390px;
  }
}
