:root {
  --bg-color: #0a0a0a;
  --text-primary: #f5f5f5;
  --text-secondary: #a1a1aa;
  --accent: #3b82f6;
  --card-bg: rgba(15, 15, 15, 0.8);
  --card-border: rgba(255, 255, 255, 0.08);
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  margin: 0;
  cursor: default;
}

h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", sans-serif;
}

#vector-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.55;
}

.glass-nav {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: border-color 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.resume-section {
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}

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

.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff, #94a3b8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.filter-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
  color: #3b82f6;
}

.project-card-compact {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.project-card-compact:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(59, 130, 246, 0.1);
}

.card-visual {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--card-border);
}

.card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(139, 92, 246, 0.1) 0%,
      transparent 50%
    );
}

.card-visual[data-category="AI/ML"] {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(15, 15, 15, 1) 100%
  );
}

.card-visual[data-category="Web"] {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.1) 0%,
    rgba(15, 15, 15, 1) 100%
  );
}

.card-visual[data-category="MLOps"] {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.1) 0%,
    rgba(15, 15, 15, 1) 100%
  );
}

.card-visual-icon {
  font-size: 3rem;
  opacity: 0.8;
  transition: transform 0.4s ease, opacity 0.3s ease;
  position: relative;
  z-index: 1;
}

.project-card-compact:hover .card-visual-icon {
  transform: scale(1.1);
  opacity: 1;
}

.card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  font-size: 0.7rem;
  font-family: monospace;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  font-size: 0.7rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: #a1a1aa;
}

.card-links {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.card-link-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.card-link-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}

.card-link-btn i {
  font-size: 0.9rem;
}

#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0a0a0a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out, visibility 0.5s;
}

.terminal-loader-card {
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  font-family: "Courier New", Courier, monospace;
  width: 90%;
  max-width: 450px;
  border-radius: 8px;
  overflow: hidden;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 16px;
  display: flex;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red {
  background-color: #ef4444;
}

.dot-yellow {
  background-color: #f59e0b;
}

.dot-green {
  background-color: #10b981;
}

.loader-content {
  padding: 20px;
  height: 200px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.typing-line {
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
}

.cursor::after {
  content: "▋";
  animation: blink 1s step-start infinite;
  color: #3b82f6;
  margin-left: 2px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.status-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 36px;
  background: #0a0a0a;
  border-top: 1px solid #262626;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: "Space Grotesk", monospace;
  font-size: 10px;
  color: #737373;
  z-index: 9998;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .status-footer {
    padding: 0 20px;
    font-size: 12px;
    gap: 20px;
  }
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  z-index: 49;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-overlay.open {
  transform: translateX(0);
}

.mobile-link {
  font-size: 2rem;
  font-weight: 600;
  color: #a1a1aa;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
}

.mobile-menu-overlay.open .mobile-link {
  transform: translateY(0);
  opacity: 1;
  color: #fff;
}

.mobile-menu-overlay.open .mobile-link:nth-child(1) {
  transition-delay: 0.1s;
}

.mobile-menu-overlay.open .mobile-link:nth-child(2) {
  transition-delay: 0.2s;
}

.mobile-menu-overlay.open .mobile-link:nth-child(3) {
  transition-delay: 0.3s;
}

.mobile-menu-overlay.open .mobile-link:nth-child(4) {
  transition-delay: 0.4s;
}

.hamburger-line {
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-open .line-1 {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-open .line-2 {
  opacity: 0;
}

.nav-open .line-3 {
  transform: rotate(-45deg) translate(5px, -5px);
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

html {
  scroll-behavior: smooth;
}

#contact {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  position: relative;
}

#work {
  background: transparent;
  position: relative;
}

@keyframes scan {
  0% {
    top: -20%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 120%;
    opacity: 0;
  }
}

.animate-scan {
  animation: scan 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.animate-spin-slow {
  animation: spin 8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes flow-right {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200%);
  }
}

.animate-flow-right {
  animation: flow-right 1.5s linear infinite;
}

@keyframes blink-red {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.animate-pulse-fast {
  animation: blink-red 1s step-start infinite;
}

@keyframes breathe-red {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.animate-breathe-red {
  animation: breathe-red 4s ease-in-out infinite;
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-8deg);
  }
  50% {
    transform: rotate(8deg);
  }
}

.animate-sway {
  animation: sway 3.5s ease-in-out infinite;
  display: inline-block;
  transform-origin: bottom center;
}

@keyframes float-paper {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-6px) rotate(1deg);
  }
}

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

@keyframes type-width {
  0% {
    width: 0%;
    opacity: 0.5;
  }
  50% {
    width: 80%;
    opacity: 1;
  }
  90% {
    width: 80%;
    opacity: 1;
  }
  100% {
    width: 0%;
    opacity: 0.5;
  }
}

.animate-type-line {
  animation: type-width 2.5s ease-in-out infinite;
}

#back-to-top {
  position: fixed;
  bottom: 50px;
  right: 24px;
  z-index: 99;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

@media (min-width: 640px) {
  #back-to-top {
    bottom: 60px;
    right: 30px;
  }
}

/* Neural Network Simulation Styles */
.speech-bubble {
  position: relative;
  animation: float 3s ease-in-out infinite;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #1f2937;
}

@media (max-width: 768px) {
  .speech-bubble::after {
    right: 50%;
    top: 100%;
    transform: translateX(50%) rotate(90deg);
    border-width: 10px 0 10px 10px;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Flash Overlay Animation */
@keyframes flash {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.flash-active .flash-overlay {
  animation: flash 1s ease-out forwards;
  pointer-events: none;
}

/* Hide text when resetting */
.flash-active .reset-text {
  opacity: 0 !important;
  transition: opacity 0.2s ease;
}

.perspective-1000 {
  perspective: 1000px;
}
