@import url('https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@300;400;500;700&display=swap');

/* Catppuccin Mocha Color Palette */
:root {
  /* Base Colors */
  --ctp-base: #1e1e2e;
  --ctp-mantle: #181825;
  --ctp-crust: #11111b;

  /* Surface Colors */
  --ctp-surface0: #313244;
  --ctp-surface1: #45475a;
  --ctp-surface2: #585b70;

  /* Text Colors */
  --ctp-text: #cdd6f4;
  --ctp-subtext0: #a6adc8;
  --ctp-subtext1: #bac2de;

  /* Accent Colors */
  --ctp-lavender: #b4befe;
  --ctp-blue: #89b4fa;
  --ctp-sapphire: #74c7ec;
  --ctp-sky: #89dceb;
  --ctp-teal: #94e2d5;
  --ctp-green: #a6e3a1;
  --ctp-yellow: #f9e2af;
  --ctp-peach: #fab387;
  --ctp-maroon: #eba0ac;
  --ctp-red: #f38ba8;
  --ctp-mauve: #cba6f7;
  --ctp-pink: #f5c2e7;
  --ctp-flamingo: #f2cdcd;
  --ctp-rosewater: #f5e0dc;

  /* Theme Variables using Catppuccin */
  --glass-border-color: rgba(205, 214, 244, 0.15);
  --glass-bg-color: rgba(205, 214, 244, 0.03);
  --backdrop-blur: 16px;
  --border-radius-card: 20px;
  --border-radius-btn: 999px;
  --card-bg-color: var(--ctp-surface0);
}

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

body {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  background-color: var(--ctp-base);
  background-image:
    radial-gradient(at 10% 20%, rgba(203, 166, 247, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 10%, rgba(137, 180, 250, 0.15) 0px, transparent 50%),
    radial-gradient(at 20% 90%, rgba(250, 179, 135, 0.15) 0px, transparent 50%),
    radial-gradient(at 80% 85%, rgba(148, 226, 213, 0.15) 0px, transparent 50%);
  color: var(--ctp-text);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, rgba(203, 166, 247, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(203, 166, 247, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  z-index: 100;
  background: rgba(24, 24, 37, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(205, 214, 244, 0.1);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--ctp-mauve), var(--ctp-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-logo:hover {
  filter: brightness(1.2);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--ctp-subtext1);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ctp-mauve), var(--ctp-blue));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--ctp-text);
}

.nav-links a:hover::after {
  width: 100%;
}

.main-content {
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: 4rem 0;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--ctp-mauve), var(--ctp-blue), var(--ctp-sapphire), var(--ctp-teal));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--ctp-subtext1);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 400;
}

.scroll-indicator {
  display: inline-flex;
  margin-top: 3rem;
  color: var(--ctp-subtext1);
  animation: bounce 2s infinite;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.scroll-indicator:hover {
  color: var(--ctp-mauve);
  opacity: 1;
  transform: translateY(5px);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--ctp-text);
  font-weight: 700;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--ctp-mauve), var(--ctp-blue));
  border-radius: 2px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg-color);
  border-radius: var(--border-radius-card);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 56px rgba(0,0,0,0.3);
}

.card-image {
  height: 350px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(180, 180, 255, 0.1);
  border-radius: 4px;
  margin: 1.5rem 1.5rem 0 1.5rem;
  position: relative;
  z-index: 2;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.1);
}

.card-glass-content {
  position: relative;
  padding: 1.5rem;
  z-index: 1;
}

.card-glass-content::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-top: 1px solid var(--glass-border-color);
  background: linear-gradient(135deg, var(--glass-border-color), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

.card-glass-content::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glass-bg-color);
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  background-image: inherit;
  background-attachment: fixed;
  z-index: -2;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.card-description {
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.card-tags span {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-btn);
  font-size: 0.8rem;
  font-weight: 500;
}

.card-actions {
  display: flex;
  gap: 1rem;
}

.glass-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: var(--border-radius-btn);
  padding: 0.75rem 1.5rem;
  color: white;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-grow: 1;
  text-align: center;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.glass-btn.secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 600px;
  background: rgba(33, 28, 48, 0.5);
  border-radius: var(--border-radius-card);
}

.card-content-placeholder {
  padding: 1.5rem;
}

.project-showcase {
  padding: 4rem 0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.showcase-item {
  background: var(--card-bg-color);
  border-radius: var(--border-radius-card);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.showcase-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ctp-mauve), var(--ctp-blue), var(--ctp-teal), var(--ctp-peach));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.showcase-item:hover::before {
  opacity: 1;
}

.showcase-item:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 24px 64px rgba(203, 166, 247, 0.2), 0 0 40px rgba(137, 180, 250, 0.1);
  border-color: rgba(203, 166, 247, 0.4);
}

.showcase-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
  filter: drop-shadow(0 0 20px rgba(203, 166, 247, 0.4));
  transition: all 0.4s ease;
}

.showcase-item:hover .showcase-icon {
  transform: scale(1.15) rotateY(10deg);
  filter: drop-shadow(0 0 30px rgba(203, 166, 247, 0.6));
}

.showcase-item h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ctp-text);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--ctp-mauve), var(--ctp-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.showcase-item p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ctp-subtext1);
  margin-bottom: 1.5rem;
}

.showcase-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.showcase-tech span {
  background: rgba(203, 166, 247, 0.2);
  color: var(--ctp-mauve);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(203, 166, 247, 0.3);
}

.showcase-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--ctp-mauve), var(--ctp-blue));
  color: white;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(203, 166, 247, 0.3);
  position: relative;
  overflow: hidden;
}

.showcase-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.showcase-link:hover::before {
  left: 100%;
}

.showcase-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(203, 166, 247, 0.4);
  background: linear-gradient(135deg, var(--ctp-blue), var(--ctp-sapphire));
}

.keyboard-navigation .showcase-item:focus {
  outline: 2px solid var(--ctp-mauve);
  outline-offset: 4px;
}

.keyboard-navigation .showcase-link:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.site-footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--ctp-subtext0);
  border-top: 1px solid rgba(205, 214, 244, 0.1);
  margin-top: 4rem;
  background: rgba(24, 24, 37, 0.5);
  backdrop-filter: blur(10px);
}

.site-footer p {
  font-size: 0.95rem;
  font-weight: 400;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background: var(--ctp-mauve);
  color: var(--ctp-base);
}

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

::-webkit-scrollbar-track {
  background: var(--ctp-mantle);
}

::-webkit-scrollbar-thumb {
  background: var(--ctp-surface1);
  border-radius: 6px;
  border: 2px solid var(--ctp-mantle);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ctp-surface2);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .nav-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-content {
    padding: 6rem 1.5rem 3rem;
  }
  
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .showcase-item {
    padding: 1.5rem;
  }
  
  .showcase-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }
  
  .showcase-item h3 {
    font-size: 1.3rem;
  }
  
  .showcase-tech {
    gap: 0.25rem;
    margin-bottom: 1.5rem;
  }
  
  .showcase-tech span {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .showcase-link {
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
  }
}
