/* Reusable Components */

/* ==================== Header / Navbar ==================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-right: var(--space-2xl);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width var(--transition);
}

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

/* Mobile menu button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--text-primary);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition);
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .lang-switch {
    margin-left: 0;
    margin-right: auto;
  }
}

/* ==================== Language Switcher ==================== */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  margin-right: var(--space-md);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.lang-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.lang-btn.active {
  color: var(--accent);
  font-weight: 600;
}

.lang-divider {
  color: var(--border);
  font-size: 0.75rem;
  user-select: none;
}

/* ==================== Hero Section ==================== */

.hero {
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-3xl);
  text-align: center;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto var(--space-lg);
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-glow);
  object-fit: cover;
  background: var(--bg-card);
}

.hero-name {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-weight: 400;
}

.hero-bio {
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  color: var(--text-secondary);
  line-height: 1.8;
}

.hero-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ==================== Buttons ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  border-color: var(--border-light);
  color: var(--text-primary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

/* ==================== Cards ==================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-secondary);
}

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

/* ==================== Tags ==================== */

.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-secondary);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: var(--radius-full);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ==================== Project Grid ==================== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== Timeline ==================== */

.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl) + 4px);
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
}

.timeline-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  font-family: var(--font-mono);
}

.timeline-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.timeline-org {
  color: var(--accent);
  font-size: 0.9375rem;
  margin-bottom: var(--space-sm);
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  white-space: pre-line;
}

/* ==================== Skill Bars ==================== */

.skills-section {
  margin-bottom: var(--space-xl);
}

.skills-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skill-bar {
  margin-bottom: var(--space-md);
}

.skill-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  font-size: 0.9375rem;
}

.skill-bar-name {
  color: var(--text-primary);
  font-weight: 500;
}

.skill-bar-level {
  color: var(--text-muted);
}

.skill-bar-track {
  height: 6px;
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transition: width 1s ease;
}

/* ==================== Social Links ==================== */

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 140px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  color: var(--text-primary);
}

.social-link-icon {
  font-size: 1.5rem;
}

.social-link-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==================== Footer ==================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ==================== Filter Tabs ==================== */

.filter-tabs {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.filter-tab {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ==================== Toast ==================== */

.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  animation: toast-in 0.3s ease;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
}

.toast-success { background: #065f46; color: var(--success); border: 1px solid var(--success); }
.toast-error { background: #7f1d1d; color: var(--error); border: 1px solid var(--error); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
