:root {
  --bg-color: #1e1e2e; /* Catppuccin Mocha Base */
  --text-color: #cdd6f4; /* Catppuccin Text */
  --accent-color: #cba6f7; /* Catppuccin Mauve */
  --link-color: #89b4fa; /* Catppuccin Blue */
  --hover-color: #f5c2e7; /* Catppuccin Pink (matches sunset) */
  
  /* Glassmorphism Variables */
  --card-bg: linear-gradient(135deg, rgba(30, 30, 46, 0.6), rgba(30, 30, 46, 0.3)); /* Darker tint */
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --card-hover-border: rgba(255, 255, 255, 0.25);
  --card-hover-shadow: 0 8px 32px 0 rgba(245, 194, 231, 0.2); /* Pink glow */
}

* {
  font-family: 'JetBrains Mono', monospace;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  /* Darkened overlay + Background Image */
  background: linear-gradient(rgba(17, 17, 27, 0.6), rgba(17, 17, 27, 0.6)), url('../assets/images/background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  
  color: var(--text-color);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Bento Grid Layout */
.bento-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
  padding: 2rem;
}

/* Card Base Styles */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 1px solid rgba(255, 255, 255, 0.15); /* Top highlight */
  border-left: 1px solid rgba(255, 255, 255, 0.15); /* Left highlight */
  border-radius: 24px;
  
  /* Enhanced Glassmorphism */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--card-shadow);
  
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
}

.card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  border-color: var(--card-hover-border);
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--card-hover-shadow);
}

/* Highlight Name Style */
.highlight-name {
  font-weight: 700;
  background-image: linear-gradient(to right, #cba6f7, #89b4fa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Subtitle Name */
.subtitle-name {
  font-size: 1.3rem;
  margin-top: 0.5rem;
  color: #cdd6f4;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 1.5s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Profile Card (Large, spans 2 cols, 2 rows) */
.profile-card {
  grid-column: span 2;
  grid-row: span 2;
  padding: 2rem;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.img-container {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 30px rgba(203, 166, 247, 0.4); /* Stronger glow */
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-text h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(to right, #fff, #cba6f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  /* Typewriter Animation */
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 4px solid var(--accent-color);
  box-sizing: content-box;
  width: 0;
  animation: 
    typing 1.5s steps(10, end) 0.2s forwards,
    blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 10ch; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent-color); }
}

.tagline {
  margin: 0.5rem 0 0;
  color: #a6adc8;
  font-size: 1rem;
}

/* Navigation Cards (Square-ish) */
.nav-card {
  grid-column: span 1;
  grid-row: span 1;
  aspect-ratio: 1;
  padding: 1.5rem;
  justify-content: space-between;
  position: relative;
}

.nav-card .card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.icon-large {
  font-size: 2.5rem;
  color: var(--accent-color);
}

.nav-card span {
  font-size: 1.1rem;
  font-weight: 600;
}

.arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  opacity: 0;
  transform: translate(-10px, 10px);
  transition: all 0.3s ease;
  color: var(--hover-color);
}

.nav-card:hover .arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* Specific Nav Card Colors/Tweaks */
.about-card:hover .icon-large { color: #a6e3a1; /* Green */ }
.music-card:hover .icon-large { color: #f9e2af; /* Yellow */ }

/* Social Card (Wide bar at bottom) */
.social-card {
  grid-column: span 4;
  padding: 1.5rem;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.social-link {
  color: #a6adc8;
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  color: var(--hover-color);
  transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 1rem;
  }

  .profile-card {
    grid-column: span 1;
    grid-row: auto;
  }

  .nav-card {
    grid-column: span 1;
    aspect-ratio: auto;
    min-height: 150px;
  }

  .social-card {
    grid-column: span 1;
  }
}

/* Profile Circle */
.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.4);
  margin-bottom: 1.5rem;
  animation: float 6s ease-in-out infinite;
  overflow: hidden; /* Ensure image stays within circle */
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-pic span {
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
  text-align: center;
  color: #fff;
}

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

h1 {
  font-size: 3.5rem;
  margin: 0;
  font-weight: 400;
  letter-spacing: -1px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.subtitle {
  font-size: 1.2rem;
  color: #a6adc8;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 1.3rem;
  margin-bottom: 3rem;
}

.nav-links a {
  color: #89dceb; /* Sky blue */
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--hover-color);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--hover-color);
  text-shadow: 0 0 10px rgba(243, 139, 168, 0.5);
}

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

.separator {
  color: #585b70;
  font-size: 0.8rem;
}

/* Social Buttons Stack */
.social-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 450px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 1rem;
  background: rgba(30, 30, 46, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.social-btn:hover {
  background: rgba(49, 50, 68, 0.8);
  border-color: var(--accent-color);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.social-btn i {
  font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 2.5rem; }
  .subtitle { font-size: 1rem; }
  .nav-links { font-size: 1.1rem; }
  .profile-pic { width: 120px; height: 120px; }
}