/* ===================================================
   Sunita Tamang — Portfolio Styles
   Modern, clean, light theme
   =================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1f2a44;
  --muted: #6b7280;
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-soft: #eef0ff;
  --border: #e6e9f0;
  --shadow: 0 12px 30px rgba(31, 42, 68, 0.08);
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(1100px, 90%);
  margin-inline: auto;
}

section[id] {
  scroll-margin-top: 80px;
}

.print-header {
  display: none;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo span {
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.nav-links a.active {
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

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

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

.btn-lg {
  font-size: 1rem;
  padding: 1em 2em;
  white-space: nowrap;
}

/* ---------- Hero / Home ---------- */
.hero {
  padding-block: 6rem 4.5rem;
}

.greeting {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 700;
}

.hero h1 span {
  color: var(--accent);
}

.tagline {
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.intro {
  margin-top: 1rem;
  max-width: 560px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ---------- Generic sections ---------- */
.section {
  padding-block: 4.5rem;
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -1px;
}

.section-subtitle {
  color: var(--muted);
  margin-top: 0.4rem;
  margin-bottom: 2.5rem;
}

.note {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.5rem;
  align-items: start;
}

.about-card,
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow);
}

.about-card p + p {
  margin-top: 1.1rem;
}

.about-card p {
  color: var(--muted);
}

.mini-title {
  margin-top: 1.8rem;
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
}

.info-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
}

.info-card dl div {
  display: flex;
  flex-direction: column;
  padding-block: 0.6rem;
  border-top: 1px solid var(--border);
}

.info-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.info-card dd {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ---------- Cards / Skills / Soft skills ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 14px;
  margin-bottom: 1rem;
}

.icon-html { background: #fff0e9; color: #e44d26; }
.icon-css  { background: #e9f2ff; color: #1572b6; }
.icon-js   { background: #fff9df; color: #c99b00; }
.icon-git  { background: #fbede8; color: #e34c26; }
.icon-py   { background: #e9f1fb; color: #2b6ba6; }

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.92rem;
  color: var(--muted);
}

.soft-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.soft-card .card-icon {
  font-size: 1.4rem;
}

/* ---------- Empty states (Projects / Experience) ---------- */
.empty-state {
  border: 2px dashed #cbd2e3;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 3.5rem 2rem;
  text-align: center;
}

.empty-state-small {
  padding: 2.75rem 2rem;
}

.empty-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--muted);
  max-width: 480px;
  margin-inline: auto;
  font-size: 0.95rem;
}

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

.project-card .tech {
  font-size: 0.8rem;
  color: var(--accent-dark);
  margin-top: 0.8rem;
}

.project-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.project-link:hover {
  text-decoration: underline;
}

/* ---------- Blogs ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.blog-tag {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.blog-status {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.blog-card h3 {
  font-size: 1.1rem;
  line-height: 1.4;
}

.blog-card h3 a:hover {
  color: var(--accent);
}

.blog-card p {
  flex: 1;
}

.blog-date {
  display: block;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Timeline (Education / Experience) ---------- */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 2rem;
  max-width: 760px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 0.45rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.timeline-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.timeline-item h3 {
  font-size: 1.15rem;
}

.timeline-meta {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-dark);
  margin-bottom: 0.35rem;
}

.timeline-item p:last-child {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Resume / Contact ---------- */
.resume-wrap,
.contact-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--accent-soft), #f4f5ff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
}

.resume-wrap .section-subtitle,
.contact-wrap .section-subtitle {
  margin-bottom: 0.8rem;
}

.contact-text {
  color: var(--muted);
  max-width: 520px;
}

.contact-detail {
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

.contact-detail a {
  color: var(--accent-dark);
  font-weight: 500;
}

.contact-detail a:hover {
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.8rem;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.back-to-top {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 520px;
  }

  .nav-links li {
    padding: 0.75rem 5%;
    border-top: 1px solid var(--border);
  }

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

@media (max-width: 820px) {
  .hero {
    text-align: center;
    padding-block: 4rem 3rem;
  }

  .intro {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: 3.5rem;
  }

  .about-card,
  .info-card,
  .resume-wrap,
  .contact-wrap {
    padding: 1.75rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -1.9rem;
  }

  .empty-state {
    padding: 2.5rem 1.25rem;
  }
}

/* ---------- Print / Save as PDF ---------- */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .print-header {
    display: block;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #333;
    font-size: 12pt;
  }

  .site-header,
  .nav-toggle,
  .hero-actions,
  .btn,
  .empty-state,
  .note,
  .site-footer,
  .back-to-top {
    display: none !important;
  }

  .container {
    width: 100%;
  }

  .hero {
    padding: 0 0 1rem;
  }

  .section,
  .section-alt {
    padding: 1rem 0;
    background: #fff;
    border: none;
    break-inside: avoid;
  }

  .section-subtitle {
    margin-bottom: 0.75rem;
  }

  .card,
  .about-card,
  .info-card,
  .resume-wrap,
  .contact-wrap {
    box-shadow: none;
    background: #fff;
    break-inside: avoid;
  }

  .card-grid,
  .about-grid,
  .soft-grid {
    gap: 0.75rem;
  }

  a {
    text-decoration: none;
  }
}
