:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.7);
  --border: rgba(56, 189, 248, 0.1);
  --text: #e2e8f0;
  --muted: #94a3b8;
}

* {
  scroll-behavior: smooth;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animated background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(14, 165, 233, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 30%,
      rgba(56, 189, 248, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 90%,
      rgba(14, 165, 233, 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 10% 10%,
      rgba(125, 211, 252, 0.03) 0%,
      transparent 40%
    );
  pointer-events: none;
  z-index: 0;
  animation: liquidShift 8s ease-in-out infinite;
}

@keyframes liquidShift {
  0%,
  100% {
    opacity: 1;
  }
  25% {
    opacity: 0.8;
  }
  50% {
    opacity: 1.1;
  }
  75% {
    opacity: 0.9;
  }
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* Liquid Glass Effect */
.liquid-glass {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.liquid-glass:hover {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow:
    0 12px 40px rgba(14, 165, 233, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.glass {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  transition: all 0.3s ease;
}
.glass:hover {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 15px 40px -12px rgba(14, 165, 233, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 3rem;
  padding: 0.75rem 2rem;
  transition: all 0.3s;
  box-shadow: 0 0 25px -6px rgba(14, 165, 233, 0.5);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  letter-spacing: 0.3px;
}
.btn-primary:hover {
  box-shadow: 0 0 40px -5px rgba(14, 165, 233, 0.7);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border: 2px solid rgba(14, 165, 233, 0.4);
  color: #0ea5e9;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 3rem;
  padding: 0.75rem 2rem;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.btn-outline:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: #0ea5e9;
}

.gradient-text {
  background: linear-gradient(135deg, #0ea5e9, #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.8);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-float {
  animation: float 7s ease-in-out infinite;
}

/* Desktop Sidebar */
.desktop-sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background: rgba(2, 6, 23, 0.98);
  backdrop-filter: blur(30px);
  z-index: 150;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(14, 165, 233, 0.1);
}
.desktop-sidebar.open {
  left: 0;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 140;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}
.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Section nav dots */
.section-nav {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(12px);
  padding: 10px 7px;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.section-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.section-dot.active {
  background: #0ea5e9;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.8);
  transform: scale(1.6);
}
.section-dot:hover {
  background: #38bdf8;
  transform: scale(1.4);
}
.section-dot .tooltip {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(2, 6, 23, 0.95);
  color: #e2e8f0;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
.section-dot:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* Sticky Header */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 40;
  padding: 1.5rem 1.25rem 0 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.sticky-header.header-hidden {
  transform: translateY(-120%);
  opacity: 0;
}

.sticky-header.header-scrolled {
  padding: 0.5rem 1.25rem 0 1.25rem;
}

.sticky-header.header-scrolled .liquid-glass {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-color: rgba(14, 165, 233, 0.2);
  box-shadow:
    0 10px 40px -10px rgba(14, 165, 233, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  animation: headerGlow 0.6s ease-out;
}

@keyframes headerGlow {
  0% {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    box-shadow:
      0 15px 50px -5px rgba(14, 165, 233, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  100% {
    box-shadow:
      0 10px 40px -10px rgba(14, 165, 233, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

/* Redesigned Timeline */
.timeline-new {
  position: relative;
  padding-left: 2rem;
}

.timeline-new::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(14, 165, 233, 0.4) 0%,
    rgba(14, 165, 233, 0.2) 50%,
    rgba(14, 165, 233, 0.05) 100%
  );
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.35rem;
  top: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  background: #0ea5e9;
  border-radius: 50%;
  border: 2px solid #020617;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-item:hover::before {
  box-shadow:
    0 0 0 6px rgba(14, 165, 233, 0.4),
    0 0 20px rgba(14, 165, 233, 0.6);
  transform: scale(1.2);
}

.timeline-year {
  display: inline-block;
  background: rgba(14, 165, 233, 0.08);
  color: #0ea5e9;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 1rem;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(14, 165, 233, 0.15);
}

.timeline-item:hover .timeline-year {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.3);
}

/* About stats cards */
.about-stat-card {
  background: rgba(14, 165, 233, 0.03);
  border: 1px solid rgba(14, 165, 233, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.about-stat-card:hover {
  background: rgba(14, 165, 233, 0.06);
  border-color: rgba(14, 165, 233, 0.2);
  transform: translateY(-2px);
}

/* Redesigned Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.skill-card {
  background: rgba(14, 165, 233, 0.04);
  border: 1px solid rgba(14, 165, 233, 0.1);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(14, 165, 233, 0.08),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.skill-card:hover {
  border-color: rgba(14, 165, 233, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -10px rgba(14, 165, 233, 0.2);
  background: rgba(14, 165, 233, 0.07);
}

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

.skill-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.skill-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.skill-card:hover .skill-name {
  color: #fff;
}

/* Legend */
.skills-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(14, 165, 233, 0.03);
  border: 1px solid rgba(14, 165, 233, 0.08);
  border-radius: 2rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.legend-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
}

/* Skills */
.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s;
  cursor: default;
}
.skill-badge:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: #0ea5e9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(14, 165, 233, 0.3);
}
.skill-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Project card */
.project-card-new {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.project-card-new:hover {
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -15px rgba(14, 165, 233, 0.2);
}
.project-card-new .card-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.project-card-new .card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9) 0%, transparent 60%);
}
.project-card-new:hover .card-image {
  transform: scale(1.05);
  transition: transform 0.5s ease;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
  padding: 1rem;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #0ea5e9;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  cursor: pointer;
  transition: 0.3s;
}
.scroll-top-btn:hover {
  background: #0ea5e9;
  color: #fff;
}

/* Liquid blob for contact */
.liquid-blob {
  position: absolute;
  border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
  background: radial-gradient(
    circle,
    rgba(14, 165, 233, 0.15) 0%,
    transparent 70%
  );
  filter: blur(40px);
  animation: blobMorph 10s ease-in-out infinite;
  pointer-events: none;
}
@keyframes blobMorph {
  0%,
  100% {
    border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
  }
  25% {
    border-radius: 40% 60% 40% 60% / 60% 40% 60% 40%;
  }
  50% {
    border-radius: 50% 50% 60% 40% / 40% 50% 50% 60%;
  }
  75% {
    border-radius: 55% 45% 45% 55% / 55% 45% 55% 45%;
  }
}

@media (max-width: 768px) {
  .section-nav {
    right: 8px;
    gap: 10px;
    padding: 8px 5px;
  }
  .section-dot {
    width: 7px;
    height: 7px;
  }
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
  }
  .skill-card {
    padding: 0.7rem 0.8rem;
  }
  .skill-name {
    font-size: 0.7rem;
  }
}
