c/**
 * Component Styles
 * 
 * Reusable UI components:
 * - Buttons
 * - Cards
 * - Navigation
 * - Forms (if needed)
 */

/* ===== BUTTONS ===== */

/**
 * Base button styles
 * Can be extended with modifier classes
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 2rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  user-select: none;
  white-space: nowrap;
}

/* Prevent double-tap zoom on mobile */
.btn {
  touch-action: manipulation;
}

/* Button variants */
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
  padding: 0.3rem;  /* Not sure if this will mess other things up.*/  /*ADDED*/
  border-radius: var(--border-radius-md); /*ADDED*/
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid var(--color-border);
  padding: 0.3rem;  /* Not sure if this will mess other things up.*/  /*ADDED*/
  border-radius: var(--border-radius-md); /*ADDED*/
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  background: rgba(14, 165, 233, 0.1);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

/* Button sizes */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: var(--font-size-lg);
}

/* Button states */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== NAVIGATION ===== */

/**
 * Navbar component
 * Fixed position with glass morphism effect
 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border-bottom: 1px solid var(--color-border);
  z-index: var(--z-index-sticky);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: var(--letter-spacing-tight);
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
  align-items: center;
}

.nav-links a {
  position: relative;
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-base);
}

/* Animated underline on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Active link state */
.nav-links a.active {
  color: var(--color-text-primary);
}

.nav-links a.active::after {
  width: 100%;
}

/* Social links in navbar */
.social-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.social-icon {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.social-icon:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-sm);
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: all var(--transition-base);
}

/* Mobile menu toggle animation */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== CARDS ===== */

/**
 * Project card component
 * Reusable card with hover effects
 */
.project-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.project-image-container {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-content {
  padding: var(--space-xl);
}

.project-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

.project-description {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-lg);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.tag {
  padding: 0.375rem 0.875rem;
  background: rgba(14, 165, 233, 0.1);
  color: var(--color-primary-light);
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: background var(--transition-base);
}

.tag:hover {
  background: rgba(14, 165, 233, 0.2);
}

.project-links {
  display: flex;
  gap: var(--space-md);
}

/**
 * Skill card component
 */
.skill-card {
  background: var(--color-bg-secondary);
  padding: var(--space-xl) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  text-align: center;
  transition: transform var(--transition-base), 
              box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.skill-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  transition: transform var(--transition-base);
}

.skill-card:hover .skill-icon {
  transform: scale(1.1);
}

.skill-name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

/* ===== BACK TO TOP BUTTON ===== */

.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), 
              visibility var(--transition-base),
              transform var(--transition-base);
  box-shadow: var(--shadow-md);
  z-index: var(--z-index-fixed);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* ===== CONTACT LINKS ===== */

.contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  transition: transform var(--transition-base);
}

.contact-link:hover {
  transform: translateY(-5px);
}

.contact-icon {
  width: 56px;
  height: 56px;
  opacity: 0.9;
  transition: opacity var(--transition-base);
}

.contact-link:hover .contact-icon {
  opacity: 1;
}

/* ===== LOADING SPINNER ===== */

/**
 * Optional loading spinner component
 * Useful for async content loading
 */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-bg-tertiary);
  border-top-color: var(--color-primary);
  border-radius: var(--border-radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== BADGE ===== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--border-radius-full);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

.badge-primary {
  background: var(--color-primary);
  color: white;
}

.badge-success {
  background: var(--color-success);
  color: white;
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}