:root {
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --bg: #0f172a;
  --sidebar-bg: rgba(30, 41, 59, 0.7);
  --card-bg: rgba(30, 41, 59, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(148, 163, 184, 0.2);
  --radius-lg: 24px;
  --radius-md: 16px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Animated Background */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  filter: blur(80px);
}

.blob {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  opacity: 0.15;
  animation: blob-float 20s infinite alternate;
}

.blob-1 {
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.blob-2 {
  background: var(--secondary);
  bottom: -100px;
  right: -100px;
  animation-delay: -5s;
}

.blob-3 {
  background: var(--accent);
  top: 40%;
  left: 30%;
  width: 300px;
  height: 300px;
  animation-delay: -10s;
}

@keyframes blob-float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(50px, 100px) scale(1.1);
  }

  100% {
    transform: translate(-50px, 50px) scale(0.9);
  }
}

/* Sidebar Styling */
.sidebar {
  width: 320px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  padding: 40px 30px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  z-index: 10;
}

.profile-container {
  position: relative;
  padding: 5px;
}

.profile-picture {
  width: 160px;
  height: 180px;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transform: scale(1);
  transition: var(--transition);
}

.profile-picture:hover img {
  transform: scale(1.1);
}

.profile-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  z-index: 3;
  pointer-events: none;
  animation: shimmer 3s infinite;
}

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

  100% {
    transform: translateX(200%) rotate(45deg);
  }
}

.sidebar-header {
  text-align: center;
}

.sidebar-header h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.sidebar-header p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

/* Navigation Links */
.nav-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.nav-button {
  background: transparent;
  border: 1px solid transparent;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  font-size: 15px;
  font-weight: 500;
}

.nav-button i {
  width: 18px;
  height: 18px;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transform: translateX(5px);
}

.nav-button.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 20px var(--primary-glow);
  transform: translateX(10px);
}

/* Social Links */
.social-links {
  margin-top: auto;
  display: flex;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  width: 100%;
  justify-content: center;
}

.social-links a {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
}

/* Content Area */
.content {
  flex: 1;
  padding: 60px 80px;
  overflow-y: auto;
  scroll-behavior: smooth;
  z-index: 1;
}

.section {
  display: none;
  max-width: 900px;
  margin: 0 auto;
}

.section.active {
  display: block;
  animation: section-fade 0.6s ease forwards;
}

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

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

.section h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 40px;
  background: linear-gradient(90deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

/* Cards and Boxes */
.box {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 30px;
  transition: var(--transition);
}

.cv-box {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 30px;
  transition: var(--transition);
  position: relative;
}

.cv-box::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 4px 0 0 4px;
  opacity: 0.6;
}

.box:hover,
.cv-box:hover {
  border-color: var(--border-hover);
  background: rgba(30, 41, 59, 0.6);
}

.box p {
  line-height: 1.8;
  font-size: 17px;
  color: var(--text-main);
}

.box ul,
.cv-box ul {
  margin-left: 30px;
  margin-top: 15px;
  margin-bottom: 20px;
  list-style-type: none;
}

.box li,
.cv-box li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--text-main);
  font-size: 16px;
}

.box li::before,
.cv-box li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* CV Items */
.cv-box h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cv-box p {
  margin-bottom: 15px;
  font-size: 16px;
}

.cv-box strong {
  color: var(--text-main);
  font-weight: 600;
}

.cv-box .date {
  float: right;
  font-size: 14px;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

/* Portfolio Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.05), transparent);
  transform: translateX(-100%);
  transition: 0.6s;
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card:hover::before {
  transform: translateX(100%);
}

.card h3 {
  font-size: 22px;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.3;
}

.card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Project Detail Page */
.project-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  /* Center everything including the image */
}

.project-image {
  width: 100%;
  max-width: 800px;
  background: var(--card-bg);
  padding: 15px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  border-radius: var(--radius-md);
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.project-image img:hover {
  transform: scale(1.02);
}

/* White background for PNGs (useful for transparency) */
img[src$=".png"],
img[src$=".PNG"] {
  background-color: #ffffff !important;
}

.image-caption {
  text-align: center;
  margin-top: 15px;
  color: var(--text-muted);
  font-size: 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
}

.project-grid .project-image {
  max-width: 100%;
}

.project-grid .project-image img {
  height: 250px;
  background: rgba(0, 0, 0, 0.1);
}

/* Modal / Lightbox for Zoom */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius-md);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.image-modal.active {
  display: flex;
}

.image-modal.active img {
  transform: scale(1);
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
  body {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 30px;
  }

  .content {
    padding: 40px 20px;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-button {
    width: auto;
  }
}