/* ==========================================================================
   Oza Meilendra — 3D Creative Graphic Designer Portfolio
   Upgraded 3D Claymorphism, Specular Glass & Motion Stylesheet
   ========================================================================== */

:root {
  --oza-ink: #1A1B3A;
  --oza-violet: #7C69EF;
  --oza-sky: #38A1F3;
  --oza-peach: #FF9E7D;
  --oza-amber: #F59E0B;
  --oza-teal: #14B8A6;
  --oza-cream: #FAF8FF;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--oza-cream);
  color: var(--oza-ink);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* Scroll Progress Bar */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #7C69EF 0%, #38A1F3 50%, #F97316 100%);
  z-index: 90;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* Dreamy 3D Render Hero Backdrop */
.hero-3d-stage {
  background:
    radial-gradient(circle at 14% 20%, rgba(167, 139, 250, 0.34) 0%, transparent 46%),
    radial-gradient(circle at 86% 18%, rgba(255, 179, 148, 0.38) 0%, transparent 46%),
    radial-gradient(circle at 52% 85%, rgba(125, 211, 252, 0.28) 0%, transparent 52%),
    linear-gradient(135deg, #ECE8FF 0%, #E6F0FF 52%, #FFEFE6 100%);
  position: relative;
}

/* 3D Claymorphism Glass Surfaces */
.clay-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.98),
    inset 0 -5px 12px rgba(124, 105, 239, 0.08),
    0 18px 40px -12px rgba(45, 39, 98, 0.14);
}

.clay-card-soft {
  background: linear-gradient(145deg, #FFFFFF 0%, #F5F2FF 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.96),
    inset 0 -6px 14px rgba(124, 105, 239, 0.09),
    0 14px 32px -10px rgba(45, 39, 98, 0.12);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.clay-card-soft:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.98),
    inset 0 -6px 14px rgba(124, 105, 239, 0.12),
    0 22px 40px -12px rgba(76, 65, 165, 0.18);
}

/* 3D Tactile Clay Buttons */
.btn-3d-dark {
  background: linear-gradient(180deg, #2A2C60 0%, #161736 100%);
  color: #ffffff;
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.24),
    inset 0 -4px 8px rgba(0, 0, 0, 0.38),
    0 12px 24px -6px rgba(26, 27, 58, 0.36);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-3d-dark:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.3),
    inset 0 -4px 8px rgba(0, 0, 0, 0.36),
    0 16px 30px -6px rgba(124, 105, 239, 0.44);
}
.btn-3d-dark:active {
  transform: translateY(1px) scale(0.985);
}

.btn-3d-peach {
  background: linear-gradient(180deg, #FFB36B 0%, #F97316 100%);
  color: #ffffff;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.58),
    inset 0 -4px 8px rgba(194, 65, 12, 0.36),
    0 12px 24px -6px rgba(249, 115, 22, 0.42);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}
.btn-3d-peach:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.68),
    inset 0 -4px 8px rgba(194, 65, 12, 0.36),
    0 16px 32px -6px rgba(249, 115, 22, 0.5);
}
.btn-3d-peach:active {
  transform: translateY(1px) scale(0.985);
}

.btn-3d-violet {
  background: linear-gradient(180deg, #9685FF 0%, #6C5CE7 100%);
  color: #ffffff;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.48),
    inset 0 -4px 8px rgba(67, 56, 202, 0.36),
    0 12px 24px -6px rgba(108, 92, 231, 0.42);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}
.btn-3d-violet:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.55),
    inset 0 -4px 8px rgba(67, 56, 202, 0.36),
    0 16px 30px -6px rgba(108, 92, 231, 0.5);
}
.btn-3d-violet:active {
  transform: translateY(1px) scale(0.985);
}

/* 3D Glossy Decorative Orbs */
.orb-3d {
  border-radius: 9999px;
  box-shadow:
    inset -10px -12px 24px rgba(0, 0, 0, 0.16),
    inset 8px 8px 18px rgba(255, 255, 255, 0.76),
    0 18px 34px -8px rgba(45, 39, 98, 0.24);
}

/* Floating Glass Navbar */
.nav-pill {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.92),
    0 10px 30px -8px rgba(45, 39, 98, 0.14);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.nav-pill.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    0 14px 36px -8px rgba(45, 39, 98, 0.2);
}

.nav-link-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--oza-ink);
  box-shadow: 0 2px 10px -2px rgba(124, 105, 239, 0.22);
}

/* Floating & Gentle Motion */
.floating-slow {
  animation: floatY 5.2s ease-in-out infinite;
}
.floating-delay {
  animation: floatY 6.4s ease-in-out 1.4s infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1.2deg); }
}

/* Marquee Ticker */
.marquee-mask {
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 3D Interactive Tilt Frame */
.tilt-3d {
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* Portfolio Work Cards */
.work-card {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.work-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2rem;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 105, 239, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.work-card:hover::after {
  opacity: 1;
}
.work-card:hover {
  transform: translateY(-7px) scale(1.012);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.96),
    0 26px 50px -14px rgba(76, 65, 165, 0.24);
}
.work-card img {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card:hover img {
  transform: scale(1.06);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skill Bars Animated Fill */
.skill-bar-fill {
  width: 0%;
  transition: width 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Interactive Kitten 3D Canvas */
#kittenCanvas {
  touch-action: none;
  cursor: pointer;
}

/* Custom Range Sliders */
input[type="range"] {
  accent-color: #7C69EF;
  cursor: pointer;
}

/* Lightbox Modal Transitions */
#lightboxModal {
  transition: opacity 0.25s ease;
}
#lightboxModal .lightbox-shell {
  animation: modalPop 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Lightbox Zoom State */
#lbImage.zoomed {
  max-height: none;
  width: 100%;
  cursor: zoom-out;
}
#lbImage:not(.zoomed) {
  cursor: zoom-in;
}

/* Toast Notification */
.toast-enter {
  animation: toastSlide 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes toastSlide {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Back to Top Button */
#backToTop {
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
#backToTop.hidden-btn {
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .floating-slow, .floating-delay, .marquee-track { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .work-card, .clay-card-soft, .tilt-3d { transition: none !important; }
}
