/* ═══════════════════════════════════════════════
   DHRUBA PAUDEL PORTFOLIO — style.css
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Merriweather:wght@400;700&display=swap');

/* ── Variables ── */
:root {
  --teal:       #2eab8a;
  --teal-dark:  #1e8a6e;
  --teal-light: #e8f7f3;
  --orange:     #e8732a;
  --text:       #1c1c2e;
  --text-muted: #6b7280;
  --bg:         #f4f6f8;
  --white:      #ffffff;
  --border:     #e2e8f0;
  --nav-h:      56px;
  --sidebar-w:  220px;
  --radius:     14px;
  --shadow:     0 2px 12px rgba(0,0,0,0.07);
}

body.dark {
  --bg:         #0f1117;
  --white:      #1a1d27;
  --text:       #e8eaf0;
  --text-muted: #8b92a5;
  --border:     #2e3244;
  --teal-light: #0d2b22;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  transition: background 0.3s, color 0.3s;
}

/* ══ NAV ══ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  transition: background 0.3s, border-color 0.3s;
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; cursor: pointer;
}
.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.logo-text { font-size: 1rem; font-weight: 600; color: var(--text); }
nav ul { display: flex; gap: 0.25rem; list-style: none; }
nav a {
  display: block; padding: 0.45rem 1rem; border-radius: 6px;
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: all 0.2s; cursor: pointer;
}
nav a:hover, nav a.active { background: var(--teal-light); color: var(--teal-dark); }
.nav-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: var(--text-muted);
  transition: all 0.2s; user-select: none;
}
.nav-toggle:hover { border-color: var(--teal); color: var(--teal); }

/* ══ LAYOUT ══ */
.page-wrap {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 1.5rem) 1.5rem 3rem;
  align-items: start;
}

/* ══ SIDEBAR ══ */
.sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.sidebar-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.sidebar-photo { width: 100%; aspect-ratio: 1; overflow: hidden; }
.sidebar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder {
  width: 100%; height: 100%; min-height: 200px;
  background: linear-gradient(160deg, #c8e6de, #a0d4c5);
  display: flex; align-items: center; justify-content: center; font-size: 3.5rem;
}
.sidebar-info { padding: 1rem; text-align: center; border-top: 1px solid var(--border); }
.sidebar-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.15rem; }
.sidebar-role { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.9rem; }
.socials { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.social-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; text-decoration: none; color: var(--text-muted);
  transition: all 0.2s; font-weight: 700;
}
.social-btn:hover { background: var(--teal-light); border-color: var(--teal); color: var(--teal); }
.cv-btn {
  display: block; width: 100%; padding: 0.55rem;
  background: var(--teal); color: white; border-radius: 7px;
  text-align: center; font-size: 0.8rem; font-weight: 600;
  text-decoration: none; transition: background 0.2s;
}
.cv-btn:hover { background: var(--teal-dark); }

/* ══ MAIN ══ */
main { display: flex; flex-direction: column; gap: 1.5rem; }

/* ══ PAGE LOADING ══ */
#page-content { display: flex; flex-direction: column; gap: 1.5rem; }
.page-loader {
  display: flex; align-items: center; justify-content: center;
  padding: 4rem; color: var(--text-muted); font-size: 0.9rem; gap: 0.75rem;
}
.loader-dot {
  width: 8px; height: 8px; background: var(--teal);
  border-radius: 50%; animation: bounce 1.2s infinite;
}
.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-8px); opacity: 1; }
}

/* ══ CARDS ══ */
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}
.section-heading { font-size: 1.2rem; font-weight: 700; text-align: center; margin-bottom: 1.75rem; }
.section-heading span { color: var(--teal); }

/* ══ HERO ══ */
.available-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; color: var(--teal-dark); font-weight: 500; margin-bottom: 0.9rem;
}
.available-badge::before {
  content: ''; width: 8px; height: 8px;
  background: var(--teal); border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}
.hero-headline {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700; line-height: 1.35; margin-bottom: 1rem;
}
.hero-headline .highlight { color: var(--orange); }
.hero-desc {
  font-size: 0.875rem; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 1.5rem; max-width: 580px;
}
.edu-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  padding-top: 1.25rem; border-top: 1px solid var(--border);
}
.edu-item { display: flex; align-items: flex-start; gap: 0.65rem; }
.edu-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.edu-icon.teal   { background: var(--teal-light); }
.edu-icon.orange { background: #fef0e6; }
.edu-label { font-size: 0.82rem; font-weight: 600; display: block; }
.edu-sub   { font-size: 0.72rem; color: var(--text-muted); display: block; }

/* ══ SERVICES ══ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.service-item {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 1.35rem 1rem; text-align: center; transition: all 0.22s; cursor: default;
}
.service-item:hover {
  border-color: var(--teal); background: var(--teal-light);
  transform: translateY(-3px); box-shadow: 0 6px 20px rgba(46,171,138,0.13);
}
.service-icon  { font-size: 1.7rem; margin-bottom: 0.6rem; display: block; }
.service-name  { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; }
.service-desc  { font-size: 0.73rem; color: var(--text-muted); line-height: 1.5; }

/* ══ PORTFOLIO ══ */
.portfolio-header { text-align: center; margin-bottom: 1.75rem; position: relative; padding: 0.5rem 0; }
.portfolio-bg-text {
  font-size: 2.8rem; font-weight: 900; color: rgba(0,0,0,0.05);
  letter-spacing: 5px; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); white-space: nowrap;
  user-select: none; pointer-events: none;
}
.portfolio-header h3 { font-size: 1.2rem; font-weight: 700; position: relative; z-index: 1; }
.portfolio-header h3 span { color: var(--teal); }
.port-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.port-tab {
  padding: 0.4rem 1rem; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--bg); font-family: 'Poppins', sans-serif;
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s;
}
.port-tab:hover { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-light); }
.port-tab.active { background: var(--teal); border-color: var(--teal); color: white; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.portfolio-item {
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
  transition: all 0.22s; cursor: pointer; background: var(--white);
}
.portfolio-item:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); border-color: var(--teal); }
.portfolio-thumb {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e8f4f0, #c8e6de);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; position: relative; overflow: hidden;
}
.portfolio-thumb-overlay {
  position: absolute; inset: 0; background: rgba(46,171,138,0.18);
  opacity: 0; transition: opacity 0.22s;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.portfolio-item:hover .portfolio-thumb-overlay { opacity: 1; }
.portfolio-meta { padding: 0.75rem; }
.portfolio-meta strong { font-size: 0.85rem; font-weight: 600; display: block; }
.portfolio-meta span   { font-size: 0.72rem; color: var(--text-muted); }

/* ══ ABOUT ══ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.about-text p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 0.9rem; }
.stats-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.stat-item .num { font-size: 1.6rem; font-weight: 700; color: var(--teal); line-height: 1; display: block; }
.stat-item .lbl { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }
.skill-section-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 1rem; }
.skill-bar { margin-bottom: 0.9rem; }
.skill-bar-label { display: flex; justify-content: space-between; font-size: 0.78rem; font-weight: 500; margin-bottom: 0.3rem; }
.skill-bar-track { height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.skill-bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-dark)); border-radius: 4px; width: 0; transition: width 1.2s ease; }

/* ══ TIMELINE ══ */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: 8px; width: 2px; height: calc(100% - 8px); background: var(--border); }
.tl-item { position: relative; padding-bottom: 1.75rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -1.5rem; top: 6px; width: 12px; height: 12px; background: var(--teal); border-radius: 50%; border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--teal); }
.tl-year  { font-size: 0.72rem; color: var(--teal-dark); font-weight: 600; margin-bottom: 0.2rem; }
.tl-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.tl-sub   { font-size: 0.82rem; color: var(--text-muted); }
.tl-note  { font-size: 0.78rem; color: var(--teal-dark); margin-top: 0.3rem; font-style: italic; }

/* ══ CONTACT ══ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-info-block { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem; background: var(--bg); border-radius: 8px; font-size: 0.85rem; }
.contact-row .ci { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.contact-row .cl { font-size: 0.7rem; color: var(--text-muted); display: block; }
.contact-row .cv { font-weight: 500; }
.contact-form { display: flex; flex-direction: column; gap: 0.85rem; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.cf-group { display: flex; flex-direction: column; gap: 0.3rem; }
.cf-group label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.cf-group input, .cf-group textarea {
  padding: 0.65rem 0.85rem; border: 1.5px solid var(--border); border-radius: 7px;
  font-family: 'Poppins', sans-serif; font-size: 0.85rem; color: var(--text);
  background: var(--white); outline: none; transition: border-color 0.2s; resize: vertical;
}
.cf-group input:focus, .cf-group textarea:focus { border-color: var(--teal); }
.cf-group textarea { min-height: 110px; }
.submit-btn {
  align-self: flex-start; padding: 0.65rem 1.5rem;
  background: var(--teal); color: white; border: none; border-radius: 7px;
  font-family: 'Poppins', sans-serif; font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.submit-btn:hover { background: var(--teal-dark); }

/* ══ MODAL ══ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius);
  max-width: 700px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2); animation: modalIn 0.28s ease;
  border: 1px solid var(--border);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border); gap: 1rem;
}
.modal-title { font-family: 'Merriweather', serif; font-size: 1.1rem; font-weight: 700; line-height: 1.4; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; flex-shrink: 0; transition: all 0.2s;
}
.modal-close:hover { background: #fee2e2; border-color: #fca5a5; }
.modal-body { padding: 1.5rem; }
.modal-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 3px 10px; border-radius: 20px; font-size: 0.72rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1rem;
}
.modal-badge.thesis  { background: var(--teal-light); color: var(--teal-dark); }
.modal-badge.paper   { background: #eff6ff; color: #2563eb; }
.modal-badge.project { background: #fef0e6; color: #c2601a; }
.modal-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1.25rem; }
.modal-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.modal-meta-item { background: var(--bg); border-radius: 8px; padding: 0.75rem; }
.modal-meta-item .mlbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 0.2rem; }
.modal-meta-item .mval { font-size: 0.85rem; font-weight: 500; }
.modal-findings { background: var(--teal-light); border-left: 3px solid var(--teal); border-radius: 0 8px 8px 0; padding: 1rem; margin-bottom: 1.25rem; }
.modal-findings h4 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--teal-dark); margin-bottom: 0.5rem; }
.modal-findings ul { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.modal-findings li { font-size: 0.82rem; color: var(--text); display: flex; align-items: flex-start; gap: 0.5rem; }
.modal-findings li::before { content: '→'; color: var(--teal); flex-shrink: 0; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1.1rem; border-radius: 7px; font-size: 0.82rem; font-weight: 600; text-decoration: none; transition: all 0.2s; border: none; cursor: pointer; font-family: 'Poppins', sans-serif; }
.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-outline { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-outline:hover { background: var(--teal-light); }

/* ══ ANIMATIONS ══ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.45s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ══ FOOTER ══ */
footer { background: var(--white); border-top: 1px solid var(--border); text-align: center; padding: 1.25rem; font-size: 0.78rem; color: var(--text-muted); }
footer span { color: var(--teal); font-weight: 600; }

/* ══ RESPONSIVE ══ */
@media (max-width: 820px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .sidebar-card { display: flex; flex-direction: row; }
  .sidebar-photo { width: 160px; flex-shrink: 0; aspect-ratio: auto; }
  .sidebar-info { flex: 1; text-align: left; border-top: none; border-left: 1px solid var(--border); }
  .socials { justify-content: flex-start; }
  .services-grid  { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .modal-meta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  header { padding: 0 1rem; }
  nav ul { gap: 0; }
  nav a  { padding: 0.4rem 0.6rem; font-size: 0.78rem; }
  .page-wrap { padding: calc(var(--nav-h) + 1rem) 1rem 2rem; }
  .card { padding: 1.25rem; }
  .services-grid  { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .cf-row { grid-template-columns: 1fr; }
  .sidebar-card { flex-direction: column; }
  .sidebar-photo { width: 100%; }
  .sidebar-info { border-left: none; border-top: 1px solid var(--border); text-align: center; }
  .socials { justify-content: center; }
}
