/* Modern Portfolio CSS - Bibesh Basnet */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-black: #09090b;
  --bg-dark-card: #121215;
  
  --text-dark: #111111;
  --text-muted: #8e8a82;
  --text-light: #ffffff;
  --text-light-subtle: #a0a0a0;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 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 {
  font-family: var(--font-main);
  background-color: var(--bg-black);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography Helpers */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* Floating Light Pill Header */
.floating-pill-header {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: auto;
  max-width: 95vw;
  pointer-events: auto;
  transition: transform 0.3s ease, top 0.3s ease;
}

.pill-nav-container {
  background-color: #eae4d9;
  color: #1a1917;
  border-radius: 9999px;
  padding: 0.4rem 0.5rem 0.4rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.pill-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: #121212;
  text-decoration: none;
}

.pill-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #121212;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pill-username {
  letter-spacing: -0.01em;
  font-family: var(--font-main);
  font-weight: 700;
}

.pill-nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill-nav-link {
  color: #4a4740;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pill-nav-link:hover,
.pill-nav-link.active {
  color: #000000;
  font-weight: 600;
}

.pill-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pill-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #383530;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.pill-icon-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000000;
}

.pill-status-badge {
  background-color: #111111;
  color: #ffffff;
  border-radius: 9999px;
  padding: 0.32rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.12);
  margin-left: 0.2rem;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* SECTION 1: HERO SECTION (Reference Design Match) */
.hero-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #09090b;
  padding: 8rem 2rem 4rem 2rem;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: 0.7;
}

.hero-bg-glow {
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 55, 20, 0.25) 0%, rgba(9, 9, 11, 0) 70%);
  top: 35%;
  right: 15%;
  pointer-events: none;
  filter: blur(50px);
}

.hero-backdrop-wrapper {
  position: absolute;
  top: 4.5rem;
  left: 40%;
  transform: translateX(-48%);
  width: 100%;
  text-align: center;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.hero-backdrop-text {
  font-size: clamp(6.5rem, 19vw, 17.5rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin: 0;
  padding: 0;
}

.serif-bold {
  font-family: 'Rozha One', 'Martel', 'Playfair Display', serif;
  font-weight: 900;
  color: #e5dec9;
  opacity: 0.92;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.serif-italic {
  font-family: 'Martel', 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  color: #cca892;
  opacity: 0.92;
  margin-left: 0.05em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-main-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 4.5rem auto 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.hero-text-col {
  padding-right: 1rem;
}

.hero-subtitle-tag {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b0a99c;
  margin-bottom: 0.75rem;
}

.hero-headline {
  font-family: var(--font-main);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.serif-italic-highlight {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #dfd7c8;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.btn-pill-primary {
  background-color: #f3eee6;
  color: #111111;
  border-radius: 9999px;
  padding: 0.95rem 1.9rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.12);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-pill-primary:hover {
  transform: translateY(-3px);
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.22);
}

.btn-pill-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: #dedede;
  border-radius: 9999px;
  padding: 0.95rem 1.9rem;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn-pill-secondary:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.hero-portrait-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-card-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1.05;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-vignette-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 46%;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  mask-image: radial-gradient(circle at 50% 50%, black 52%, transparent 98%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 52%, transparent 98%);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  filter: brightness(0.96) contrast(1.04);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.portrait-card-wrapper:hover .portrait-img {
  transform: scale(1.04);
}

.portrait-vignette-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(9, 9, 11, 0.5) 80%, rgba(9, 9, 11, 0.95) 100%);
  pointer-events: none;
}

/* Mobile Responsiveness for Pill & Hero */
@media (max-width: 992px) {
  .hero-main-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3.5rem;
    margin-top: 3rem;
  }

  .hero-text-col {
    padding-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-backdrop-wrapper {
    top: 5.5rem;
  }

  .pill-nav-links {
    display: none;
  }
}

@media (max-width: 576px) {
  .floating-pill-header {
    top: 0.75rem;
    width: 92vw;
  }

  .pill-nav-container {
    padding: 0.35rem 0.5rem;
    gap: 0.6rem;
    justify-content: space-between;
    width: 100%;
  }

  .hero-section {
    padding: 6.5rem 1.25rem 3rem 1.25rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-pill-primary, .btn-pill-secondary {
    width: 100%;
    justify-content: center;
  }

  .portrait-card-wrapper {
    max-width: 300px;
  }
}

.btn-email:hover svg {
  stroke: var(--bg-taupe);
  transform: translateY(3px);
}


/* SECTION 2: HELLO SECTION (Exact Screenshot 1 Design) */
.hello-section {
  background-color: var(--bg-black);
  color: var(--text-light);
  padding: 9rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: flex-start;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hello-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 400;
  color: #d1d1d6;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hello-body {
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  font-weight: 400;
  line-height: 1.35;
  color: #ffffff;
  letter-spacing: -0.02em;
}


/* SECTION 3: QUALIFICATIONS & ACHIEVEMENTS SECTION */
.qualifications-section {
  background-color: #09090b;
  color: #ffffff;
  padding: 8rem 5rem 9rem 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.qualifications-header {
  margin-bottom: 5rem;
}

.qualifications-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.qualifications-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.qual-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: #121215;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.qual-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
}

.qual-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.8rem;
  color: #ffffff;
}

.qual-card-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.qual-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.qual-list li {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: #d8d8dc;
  font-weight: 400;
  line-height: 1.55;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.qual-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.qual-list li strong {
  font-weight: 700;
  color: #ffffff;
}


/* SECTION 4: PROJECTS SHOWCASE (Enhanced Computer Engineering Projects) */
.projects-section {
  background-color: #0d0d0d;
  color: var(--text-light);
  padding: 8rem 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #a4b4bf;
  margin-bottom: 1rem;
  font-weight: 600;
}

.section-heading-large {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 4rem;
  letter-spacing: -0.03em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background-color: var(--bg-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-smooth), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--bg-taupe), var(--bg-slate));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
}

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

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

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #d1d1d6;
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  color: #ffffff;
}

.project-desc {
  color: var(--text-light-subtle);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.project-link-btn {
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--bg-slate);
  transition: color var(--transition-fast);
}

.project-link-btn:hover {
  color: #ffffff;
}


/* SECTION 5: CONTACT & FOOTER */
.contact-section {
  background-color: var(--bg-black);
  padding: 7rem 5rem 4rem 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 5rem;
}

.contact-info h2 {
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  margin-bottom: 1.2rem;
}

.contact-info p {
  color: var(--text-light-subtle);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
}

.detail-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-form {
  background-color: var(--bg-dark-card);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--text-light-subtle);
}

.form-control {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--bg-slate);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background-color: var(--bg-taupe);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-submit:hover {
  background-color: #c4b9aa;
  transform: translateY(-2px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-light-subtle);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  color: var(--text-light-subtle);
  transition: color var(--transition-fast);
}

.social-link:hover {
  color: #ffffff;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #1c1c1e;
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  z-index: 2000;
}

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

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: #171717;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--text-light-subtle);
  font-size: 1.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.email-copy-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  padding: 1rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;

}

.email-text {
  font-family: monospace;
  font-size: 1.05rem;
  color: var(--bg-slate);
}

.btn-copy {
  padding: 0.4rem 0.9rem;
  background-color: var(--bg-taupe);
  color: #111;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);

}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-image-col {
    min-height: 60vh;
  }

  .hero-content-col {
    padding: 4rem 3rem;
  }

  .hello-section {
    grid-template-columns: 1fr;
    padding: 6rem 3rem;
    gap: 2rem;
  }

  .qualifications-section {
    padding: 6rem 3rem;
  }

  .qualifications-grid {
    gap: 3rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background-color: #0c0c0e;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    transition: right 0.4s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  }

  .nav-links.open {
    right: 0;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .hero-content-col,
  .hello-section,
  .qualifications-section,
  .projects-section,
  .contact-section {
    padding: 4rem 1.5rem;
  }

  .qualifications-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }
}
