/* Animations */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes progressBar {
  from { width: 0; }
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.parallax-header {
  transition: transform 0.3s ease-out;
}

/* Glass morphism */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

/* Header */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 100;
  margin: 12px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  background: rgba(5, 6, 10, 0.95);
  border: 1px solid rgba(0, 217, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--duration) var(--transition);
}
.logo:hover { opacity: 0.9; transform: translateY(-1px); }

.logo-img { height: 48px; width: 48px; border-radius: var(--radius-md); object-fit: cover; box-shadow: 0 4px 16px rgba(0, 217, 255, 0.1); }

.logo-meta { display: flex; flex-direction: column; gap: 3px; }
.logo-text { font-weight: 800; font-size: 1rem; letter-spacing: 0.5px; color: var(--accent-1); }
.logo-sub { font-size: 0.8rem; color: var(--text-muted); }

/* Nav */
.nav { display: flex; align-items: center; gap: 12px; flex: 1; }

.nav-list {
  display: flex;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav-list a {
  padding: 8px 14px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all var(--duration) var(--transition);
}

.nav-list a:hover { 
  background: rgba(0, 217, 255, 0.1);
  color: var(--accent-1);
  transform: translateY(-2px);
}

.nav-actions { display: flex; gap: 10px; align-items: center; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--transition);
}

.nav-toggle:hover { 
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--accent-1);
}

/* Mobile nav */
.nav-list.nav-open {
  position: absolute;
  top: 72px;
  right: 12px;
  flex-direction: column;
  background: rgba(5, 6, 10, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  min-width: 220px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8);
  z-index: 200;
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 48px 0;
  animation: slideDown 600ms var(--transition);
}

.hero-brand { display: flex; gap: 16px; align-items: center; }

.hero-brand img {
  height: 64px;
  width: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.hero-content h1 { margin-bottom: 8px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Bot cards grid */
.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.bot-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius-md);
  transition: all var(--duration) var(--transition);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bot-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(123, 97, 255, 0.15);
}

.bot-card-header { display: flex; gap: 12px; align-items: center; }

.bot-img-wrapper {
  position: relative;
  flex-shrink: 0;
}

.bot-card-img {
  height: 64px;
  width: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.bot-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all var(--duration) var(--transition);
}

.bot-status.online {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.bot-status.offline {
  background: #6b7280;
  box-shadow: 0 0 8px rgba(107, 114, 128, 0.4);
}

.bot-status.idle {
  background: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.bot-status.dnd {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.bot-card-title { font-weight: 700; font-size: 1.1rem; }
.bot-card-desc { font-size: 0.95rem; color: var(--text-muted); }

.card-actions { display: flex; gap: 8px; margin-top: 8px; }

/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 24px;
  padding-bottom: 48px;
}

.contact-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--duration) var(--transition);
}

.contact-card:hover { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.12); }

.contact-card h3 { margin-bottom: 8px; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-list li { color: var(--text-muted); font-size: 0.95rem; }
.contact-list a { color: var(--accent-1); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.contact-meta { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }

.social { display: flex; gap: 8px; }

.chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all var(--duration) var(--transition);
}

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

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 48px 0 32px;
  border-top: 1px solid rgba(0, 217, 255, 0.15);
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.4), rgba(13, 14, 21, 0.8));
  display: block;
  width: 100%;
}

.footer-inner { 
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-brand { 
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 0 1 auto;
}

.footer-logo { 
  height: 48px;
  width: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 217, 255, 0.15);
  flex-shrink: 0;
}

.footer-brand strong {
  font-size: 1.1rem;
  color: var(--accent-1);
  font-weight: 800;
  letter-spacing: 0.5px;
  display: block;
}

.footer-brand .muted {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.5px;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all var(--duration) var(--transition);
  padding: 4px 0;
}

.footer-links-list a:hover {
  color: var(--accent-1);
  transform: translateX(4px);
}

.github-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.github-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.github-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-1);
}

.github-stat .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links { 
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex: 0 1 auto;
}

.footer-links a {
  padding: 10px 16px;
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent-1);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--duration) var(--transition);
  white-space: nowrap;
}

.footer-links a:hover { 
  background: rgba(0, 217, 255, 0.15);
  border-color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 217, 255, 0.15);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
}

#last-updated-date {
  color: var(--accent-1);
  font-weight: 600;
}

.form-actions { display: flex; gap: 8px; margin-top: 12px; }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* Bio Section */
.bio-section { margin: 48px 0; }

.bio-card {
  padding: 28px;
  line-height: 1.8;
  font-size: 1rem;
  color: var(--text-primary);
}

.bio-card p { color: var(--text-primary); }
.bio-card strong { color: var(--accent-1); font-weight: 700; }
.bio-card p:first-child { font-size: 1.05rem; }

/* Stats Section */
.stats-section { margin: 48px 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.stat-card {
  padding: 32px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--duration) var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transform: scaleX(0);
  transition: transform 0.6s ease-out;
}

.stat-card.animated::before {
  transform: scaleX(1);
}

.stat-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 217, 255, 0.3);
  box-shadow: 0 20px 50px rgba(0, 217, 255, 0.2);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  animation: scaleIn 0.6s ease-out;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-1);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Skills Section */
.skills-section { margin: 48px 0; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.skill-card {
  padding: 24px;
  border-radius: var(--radius-md);
  transition: all var(--duration) var(--transition);
}

.skill-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 217, 255, 0.3);
  box-shadow: 0 12px 32px rgba(123, 97, 255, 0.2);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.skill-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.skill-percentage {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-1);
}

.skill-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 999px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.skill-card.animated .skill-progress {
  animation: progressBar 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Projects Container */
.projects-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.projects-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.projects-main .section-subtitle {
  margin-top: 0;
  margin-bottom: 16px;
}

.projects-main iframe {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 500px;
  display: block;
}

.projects-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.projects-sidebar .section-subtitle {
  margin-top: 0;
  margin-bottom: 16px;
}

.construction-card {
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  text-align: center;
  transition: all var(--duration) var(--transition);
}

.construction-card:hover {
  background: rgba(0, 217, 255, 0.08);
  border-color: rgba(0, 217, 255, 0.3);
}

.construction-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.construction-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 16px; }
  .nav-list { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-content { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom { justify-content: center; flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-links-list { align-items: center; }
  .github-stats { justify-content: center; }
  .bots-grid { grid-template-columns: 1fr; }
  .projects-container { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; width: 100%; }
  .btn { width: 100%; justify-content: center; }
  .card-actions { flex-direction: column; }
  .card-actions .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
}