/* iBeSig.com — Bibek Sigdel */

:root {
  --bg: #f0f5fa;
  --surface: #ffffff;
  --surface-2: #e3edf7;
  --border: #c2d4e8;
  --text: #0d1f40;
  --text-muted: #4a6882;
  --accent: #0077b6;
  --accent-light: #0ea5e9;
  --accent-glow: rgba(0, 119, 182, 0.18);
  --gold: #1e3a6e;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 12px;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Noise texture overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── Selection ─── */
::selection { background: var(--accent-glow); color: var(--text); }

/* ─── Navigation ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  transition: background var(--transition), backdrop-filter var(--transition);
}

nav.scrolled {
  background: rgba(240, 245, 250, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-logo .i { color: var(--accent); }
.nav-logo .be { color: var(--accent-light); }
.nav-logo .sig { color: var(--text); }

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

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}

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

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: var(--text) !important;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--accent-light) !important; transform: translateY(-1px); }

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0 2rem 5rem;
  overflow: hidden;
}

.hero-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 0;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    rgba(240, 245, 250, 0.7) 75%,
    rgba(240, 245, 250, 0.97) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 119, 182, 0.18), transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15), transparent 70%);
  bottom: 0;
  right: -5%;
  animation-delay: -3s;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(30, 58, 110, 0.1), transparent 70%);
  top: 40%;
  right: 20%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  33% { transform: translateY(-30px) scale(1.05); }
  66% { transform: translateY(20px) scale(0.97); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--transition) 0.2s forwards;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero-wordmark {
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s var(--transition) 0.4s forwards;
}

.hero-wordmark .i-part {
  color: var(--accent);
}

.hero-wordmark .be-part {
  color: var(--accent-light);
  position: relative;
}

.hero-wordmark .sig-part {
  color: var(--text);
}

.hero-name {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s var(--transition) 0.55s forwards;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s var(--transition) 0.6s forwards;
  font-weight: 400;
}

.hero-tagline strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s var(--transition) 0.8s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 0 50px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 1s ease 1.5s forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ─── Section base ─── */
section {
  position: relative;
  padding: 7rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ─── Reveal animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ─── About ─── */
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.about-content .section-subtitle {
  margin-bottom: 2rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.3s, transform 0.3s;
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-number span {
  color: var(--accent-light);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3/4;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

.about-card-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: white;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.about-card-name {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.about-card-role {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.about-card-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.skill-tag {
  padding: 0.25rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: border-color 0.2s, color 0.2s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.about-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 119, 182, 0.07), transparent 70%);
  pointer-events: none;
}

/* ─── Work / Projects ─── */
#work {
  padding-top: 0;
}

.work-header {
  margin-bottom: 4rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at var(--mx, 50%) var(--my, 50%), rgba(0, 119, 182, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 119, 182, 0.12);
}

.project-card:hover::before { opacity: 1; }

.project-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.project-tag {
  padding: 0.2rem 0.625rem;
  background: var(--surface-2);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.project-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--text-muted);
  font-size: 1.125rem;
  transition: transform 0.3s, color 0.3s;
}

.project-card:hover .project-arrow {
  transform: translate(3px, -3px);
  color: var(--accent-light);
}

/* ─── Values ─── */
#values {
  padding-top: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.3s;
}

.value-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.value-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.value-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.value-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── Timeline ─── */
#journey {
  padding-top: 0;
}

.timeline {
  margin-top: 3rem;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.375rem;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-org {
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
}

/* ─── Contact ─── */
#contact {
  text-align: center;
  max-width: 680px;
}

#contact .section-label { justify-content: center; }
#contact .section-label::before { display: none; }
#contact .section-label::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.contact-email {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--accent-light);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-block;
  margin: 1rem 0 2rem;
  transition: color 0.2s;
}

.contact-email:hover { color: var(--text); }

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

footer a { color: var(--accent-light); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ─── Divider ─── */
.divider {
  max-width: 1200px;
  margin: 0 auto;
  border: none;
  border-top: 1px solid var(--border);
  opacity: 0.5;
}

/* ─── Keyframes ─── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

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

/* ─── Cursor glow ─── */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 119, 182, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: transform 0.1s linear;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  #about {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual {
    order: -1;
  }

  .about-card {
    max-width: 320px;
    aspect-ratio: auto;
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  nav { padding: 1rem; }
  .nav-links { display: none; }
  section { padding: 5rem 1.25rem; }
  .hero { padding: 7rem 1.25rem 3rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .social-links { flex-wrap: wrap; }
}
