/* 
 * Component Styles for Alfari Sidnan Ghilmana Portfolio
 * Style: Clean Editorial Tech (Light Theme Default + Dark Mode Switcher)
 */

/* ==========================================================================
   1. NAVIGATION BAR & THEME TOGGLE
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 1.25rem;
  left: 0;
  right: 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.4rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.site-nav.scrolled .nav-inner {
  border-color: var(--border-hover);
  background: var(--bg-surface);
  box-shadow: var(--shadow-hover);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-highlight);
  letter-spacing: -0.02em;
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(79, 70, 229, 0.12));
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: var(--primary-cyan);
  font-weight: 800;
  font-size: 0.88rem;
}

[data-theme="dark"] .brand-badge {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
  border-color: rgba(56, 189, 248, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 0.3rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-cyan);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-cyan-indigo);
  transition: width 0.3s ease;
  border-radius: 2px;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: var(--border-subtle);
  color: var(--primary-cyan);
  transform: scale(1.05);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ==========================================================================
   2. BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.45rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
  color: #ffffff;
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
}

[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border-hover);
  color: var(--primary-cyan);
  transform: translateY(-2px);
}

.btn-outline-emerald {
  background: rgba(5, 150, 105, 0.08);
  color: var(--primary-emerald);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.btn-outline-emerald:hover {
  background: rgba(5, 150, 105, 0.15);
  border-color: var(--primary-emerald);
  box-shadow: var(--glow-emerald);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.badge-cyan {
  background: rgba(2, 132, 199, 0.09);
  color: var(--primary-cyan);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-emerald {
  background: rgba(5, 150, 105, 0.09);
  color: var(--primary-emerald);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-purple {
  background: rgba(79, 70, 229, 0.09);
  color: var(--primary-indigo);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.badge-amber {
  background: rgba(217, 119, 6, 0.09);
  color: var(--primary-amber);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 9.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.25rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-emerald);
  margin-bottom: 1.75rem;
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-emerald);
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text-highlight);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 780px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.75rem;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -0.625rem;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-subtle);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-highlight);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   4. ABOUT & BACKGROUND SECTION
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.card-glass {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.card-glass:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid rgba(2, 132, 199, 0.25);
}

[data-theme="dark"] .timeline-item {
  border-left-color: rgba(56, 189, 248, 0.3);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-cyan);
  box-shadow: 0 0 0 3px var(--bg-surface);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-cyan);
  margin-bottom: 0.25rem;
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-highlight);
}

.timeline-org {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-indigo);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.timeline-bullets {
  list-style: none;
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.timeline-bullets li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-cyan);
  font-weight: bold;
}

/* ==========================================================================
   5. FEATURED PROJECTS SHOWCASE
   ========================================================================== */
.projects-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

[data-theme="dark"] .filter-btn:hover, [data-theme="dark"] .filter-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--primary-cyan);
  color: #ffffff;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.project-card-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card-header {
  margin-bottom: 1.5rem;
}

.project-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-highlight);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.project-subtitle {
  font-size: 1rem;
  color: var(--primary-indigo);
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.project-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.mini-stat {
  text-align: center;
}

.mini-stat-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-cyan);
}

.mini-stat-lbl {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tech-tag {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.project-card-footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.project-card-visual {
  background: var(--bg-code);
  border-left: 1px solid var(--border-subtle);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-visual-preview {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
  position: relative;
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.visual-title {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.ascii-architecture {
  white-space: pre;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #cbd5e1;
  overflow-x: auto;
}

/* ==========================================================================
   6. SKILLS MATRIX
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.skill-category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.skill-category-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.skill-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.skill-card-head h3 {
  font-size: 1.25rem;
  color: var(--text-highlight);
}

.skill-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary-cyan);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.skill-items-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.skill-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-percent {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary-cyan);
  font-weight: 700;
}

.skill-progress-track {
  height: 6px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--grad-cyan-indigo);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   7. CONTACT SECTION
   ========================================================================== */
.contact-card-main {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.contact-channels {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.contact-chip:hover {
  background: var(--bg-surface);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ==========================================================================
   8. CASE STUDY MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 2rem 2.5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 10;
}

.modal-close-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.modal-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 2.5rem;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 1rem 1.25rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.modal-tab-btn:hover, .modal-tab-btn.active {
  color: var(--primary-cyan);
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-cyan);
}

.modal-body {
  padding: 2.5rem;
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ==========================================================================
   9. TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  border: 1px solid var(--primary-emerald);
  color: #ffffff;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition-smooth);
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 3rem 0;
  margin-top: 6rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-muted);
}
