:root {
  --bg-color: #fbfbfb;
  --text-primary: #111;
  --text-secondary: #444;
  --text-tertiary: #666;
  --top-bar-bg: rgba(255, 255, 255, 0.8);
  --dock-bg: rgba(255, 255, 255, 0.8);
  --dock-item-hover: rgba(0, 0, 0, 0.05);
  --border-color: rgba(0, 0, 0, 0.05);
  --experience-hover: rgba(0, 0, 0, 0.02);
  --card-shadow: 0 14px 42px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-color: #0b0b0b;
  --text-primary: #f5f5f5;
  --text-secondary: #aaa;
  --text-tertiary: #888;
  --top-bar-bg: rgba(11, 11, 11, 0.8);
  --dock-bg: rgba(20, 20, 20, 0.8);
  --dock-item-hover: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.1);
  --experience-hover: rgba(255, 255, 255, 0.03);
  --card-shadow: 0 14px 42px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

body {
  margin: 0;
  background: var(--bg-color);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease, opacity 0.5s ease;
  opacity: 0;
}




.dock {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--dock-bg);
  border-radius: 999px;
  box-shadow:
    0 14px 42px rgba(0, 0, 0, .15),
    inset 0 0 0 1px var(--border-color);
  backdrop-filter: blur(12px);
  z-index: 999;
  width: max-content;
  max-width: 95vw;
  padding-bottom: 10px;
  /* Base padding */
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}


.dock-bg {
  position: absolute;
  width: 44px;
  height: 44px;
  top: 10px;
  left: 14px;
  border-radius: 50%;
  background: var(--text-primary);
  opacity: 0.05;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  z-index: 1;
}

[data-theme="dark"] .dock-bg {
  background: #fff;
  opacity: 0.15;
}

.dock-item {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}

.dock-item:hover {
  transform: translateY(-5px);
}



.dock-item i {
  font-size: 17px;
  color: var(--text-primary);
  opacity: .5;
  transition:
    transform .22s cubic-bezier(.2, .8, .2, 1),
    opacity .2s ease,
    filter .2s ease;
  will-change: transform;
}

.dock-item:hover i,
.dock-item.active i {
  transform: scale(1.6);
  opacity: 1;
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, .35)) contrast(1.1);
}

.dock-separator {
  width: 1px;
  height: 20px;
  background: var(--border-color);
  align-self: center;
  margin: 0 4px;
}

#theme-toggle {
  position: relative;
}

#theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] #theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] #theme-toggle .icon-moon {
  display: block;
}

.dock-item::after {
  content: attr(data-label);
  position: absolute;
  bottom: 58px;
  background: var(--text-primary);
  color: var(--bg-color);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(10px) scale(.92);
  pointer-events: none;
  white-space: nowrap;
  transition: .18s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.dock-item:hover::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}



.dock-item:hover+.dock-item i {
  transform: scale(1.3);
  opacity: .85;
}

.dock-item:has(+ .dock-item:hover) i {
  transform: scale(1.3);
  opacity: .85;
}

/* =========================
   REVEAL ANIMATIONS
========================= */

.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered children */
.reveal-stagger>* {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-stagger.active>* {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Add delays for children */
.reveal-stagger.active>*:nth-child(1) {
  transition-delay: 0.1s;
}

.reveal-stagger.active>*:nth-child(2) {
  transition-delay: 0.2s;
}

.reveal-stagger.active>*:nth-child(3) {
  transition-delay: 0.3s;
}

.reveal-stagger.active>*:nth-child(4) {
  transition-delay: 0.4s;
}

.reveal-stagger.active>*:nth-child(5) {
  transition-delay: 0.5s;
}

/* Remove old animations */
.hero,
.about,
.experience,
.projects,
.project-card {
  will-change: transform, opacity;
}