/* =============================================================
   Anjala Shrestha — Resume Site Styles
   Two themes: light (default) and dark.
   All colour tokens live in :root and [data-theme="dark"].
   ============================================================= */

/* ── Light Mode Tokens (default) ────────────────────────────── */
:root {
  --bg:              #faf8f4;
  --surface:         #f0ebe1;
  --card:            #ffffff;
  --card-shadow:     0 1px 4px rgba(0,0,0,0.07), 0 6px 24px rgba(0,0,0,0.05);
  --border:          rgba(0, 0, 0, 0.09);
  --gold:            #a97028;
  --gold-lt:         #c8923c;
  --text:            #1c2332;
  --muted:           #6b7280;
  --sub:             #4a5568;

  --tag-bg:          rgba(169,112,40,0.08);
  --tag-border:      rgba(169,112,40,0.22);
  --tag-text:        #5d4520;
  --tag-hover-bg:    rgba(169,112,40,0.16);
  --tag-hover-bdr:   rgba(169,112,40,0.45);
  --tag-hover-text:  #a97028;

  /* Photo by Al-Amin Mir via Unsplash — amber geometric abstract, no people */
  --hero-img:        url('https://images.unsplash.com/photo-1746333540334-922f50a2748b?w=1920&q=80&fit=crop&auto=format');
  --hero-overlay:    linear-gradient(135deg, rgba(250,246,240,0.91) 0%, rgba(240,231,215,0.84) 100%);
  --hero-dot:        rgba(0,0,0,0.05);

  --nav-scrolled:    rgba(250,248,244,0.96);
  --nav-mobile:      rgba(250,248,244,0.98);

  --timeline-line:   linear-gradient(to bottom, #a97028 0%, rgba(169,112,40,0.08) 100%);
  --dot-shadow:      rgba(169,112,40,0.22);

  --stat-bg:         rgba(169,112,40,0.09);
  --stat-border:     rgba(169,112,40,0.25);

  --radius:          10px;
  --ease:            200ms ease;
}

/* ── Dark Mode Tokens ────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:              #07101c;
  --surface:         #0d1b2e;
  --card:            #112338;
  --card-shadow:     none;
  --border:          rgba(255,255,255,0.07);
  --gold:            #c8923c;
  --gold-lt:         #e0b468;
  --text:            #dde5ef;
  --muted:           #6e87a0;
  --sub:             #91aec5;

  --tag-bg:          rgba(200,146,60,0.07);
  --tag-border:      rgba(200,146,60,0.17);
  --tag-text:        #b0c8dd;
  --tag-hover-bg:    rgba(200,146,60,0.15);
  --tag-hover-bdr:   rgba(200,146,60,0.40);
  --tag-hover-text:  #e0b468;

  /* Photo by Lu Lu via Unsplash — Toronto skyline at night, no people */
  --hero-img:        url('https://images.unsplash.com/photo-1501761844139-01addf0af8af?w=1920&q=80&fit=crop&auto=format');
  --hero-overlay:    linear-gradient(135deg, rgba(7,16,28,0.87) 0%, rgba(13,27,46,0.80) 100%);
  --hero-dot:        rgba(255,255,255,0.03);

  --nav-scrolled:    rgba(7,16,28,0.96);
  --nav-mobile:      rgba(7,16,28,0.98);

  --timeline-line:   linear-gradient(to bottom, #c8923c 0%, rgba(200,146,60,0.08) 100%);
  --dot-shadow:      rgba(200,146,60,0.15);

  --stat-bg:         rgba(200,146,60,0.08);
  --stat-border:     rgba(200,146,60,0.22);
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Helpers ─────────────────────────────────────────────────── */
.gold { color: var(--gold); }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.9rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: var(--nav-scrolled);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

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

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  transition: color var(--ease);
  position: relative;
}

.nav-links a:hover { color: var(--text); }

/* Scrollspy active link */
.nav-links a.active {
  color: var(--gold);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.35rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.btn-primary {
  background: var(--gold);
  color: #faf8f4;
}

.btn-primary:hover {
  background: var(--gold-lt);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid rgba(169,112,40,0.4);
  color: var(--gold);
}

[data-theme="dark"] .btn-outline { border-color: rgba(200,146,60,0.4); }

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(169,112,40,0.08);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-outline:hover { background: rgba(200,146,60,0.08); }

/* ── Theme Toggle ────────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
  box-shadow: var(--card-shadow);
}

.theme-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: rotate(22deg) scale(1.08);
}

[data-theme="light"] .icon-sun  { display: none; }
[data-theme="dark"]  .icon-moon { display: none; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 0 5rem;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  pointer-events: none;
  transition: background 0.3s ease;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--hero-dot) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(169,112,40,0.38);
  background: rgba(169,112,40,0.07);
  margin-bottom: 1.4rem;
}

[data-theme="dark"] .hero-badge {
  border-color: rgba(200,146,60,0.38);
  background: rgba(200,146,60,0.07);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 0.55rem;
}

.hero-location {
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.025em;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--sub);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ── Hero Stats ──────────────────────────────────────────────── */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: var(--stat-bg);
  border: 1px solid var(--stat-border);
  border-radius: 100px;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.stat-pill:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.stat-n {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.stat-l {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sub);
  white-space: nowrap;
}

/* ── Hero Contacts ───────────────────────────────────────────── */
.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
}

.hero-contacts a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color var(--ease);
  cursor: pointer;
}

.hero-contacts a:hover { color: var(--gold); }

/* "Copied!" ripple flash on the element */
.hero-contacts a.copied {
  color: var(--gold);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* ── Sections ────────────────────────────────────────────────── */
.section     { padding: 5rem 0; }
.section-alt { background: var(--surface); transition: background 0.3s ease; }

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 2.25rem; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* ── Summary ─────────────────────────────────────────────────── */
.summary-text {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--sub);
  max-width: 780px;
}

/* ── Competency Tags ─────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag {
  padding: 0.4rem 0.95rem;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--tag-text);
  cursor: default;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.tag:hover {
  background: var(--tag-hover-bg);
  border-color: var(--tag-hover-bdr);
  color: var(--tag-hover-text);
  transform: translateY(-1px);
}

/* ── Experience Timeline ─────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem; bottom: 0.6rem;
  width: 1px;
  background: var(--timeline-line);
}

.timeline-company { margin-bottom: 2.75rem; }
.timeline-company:last-child { margin-bottom: 0; }

.company-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.company-header::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 9px; height: 9px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--dot-shadow);
}

.company-name     { font-size: 1.08rem; font-weight: 700; }
.company-location { font-size: 0.8rem;  color: var(--muted); }

.roles {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.role {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--card-shadow);
  transition: border-color var(--ease), transform var(--ease);
}

.role:hover { border-color: rgba(169,112,40,0.35); transform: translateX(3px); }
[data-theme="dark"] .role:hover { border-color: rgba(200,146,60,0.25); }

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 0.9rem;
}

.role-title  { font-size: 0.95rem; font-weight: 600; }
.role-period { font-size: 0.78rem; color: var(--gold); font-weight: 500; letter-spacing: 0.02em; white-space: nowrap; }

.role-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.role-bullets li {
  font-size: 0.875rem;
  color: var(--sub);
  line-height: 1.65;
  padding-left: 1.1rem;
  position: relative;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.role-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 600;
}

/* Hidden bullet items (expand/collapse) */
.role-bullets li.hidden { display: none; }

/* Expand / collapse toggle button */
.expand-btn {
  margin-top: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  padding: 0;
  transition: color var(--ease), gap var(--ease);
}

.expand-btn:hover { color: var(--gold-lt); gap: 0.5rem; }

.expand-btn::after {
  content: '›';
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.expand-btn[aria-expanded="true"]::after { transform: rotate(90deg); }

/* ── Education Cards ─────────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.15rem;
}

.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: border-color var(--ease), transform var(--ease);
}

.edu-card:hover { border-color: rgba(169,112,40,0.38); transform: translateY(-2px); }
[data-theme="dark"] .edu-card:hover { border-color: rgba(200,146,60,0.28); }

.edu-institution { font-size: 1rem;   font-weight: 700; margin-bottom: 0.35rem; }
.edu-degree      { font-size: 0.875rem; color: var(--sub); margin-bottom: 0.6rem; }

.edu-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
}

.edu-year { color: var(--gold); font-weight: 500; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-credit {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.7;
}

.footer-credit a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--ease);
}

.footer-credit a:hover { color: var(--gold); }

/* ── Scroll-to-top ───────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 90;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, color var(--ease), border-color var(--ease);
}

.scroll-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* ── Toast notification ──────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--text);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Animations ──────────────────────────────────────────────── */
.fade-in {
  animation: fadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.1s;
}

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

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ── Mobile nav toggle ───────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--nav-mobile);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.1rem 1.5rem 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a.active::after { display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle     { display: flex; }

  .hero { padding: 6rem 0 4rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero-tagline { font-size: 0.95rem; }

  .timeline { padding-left: 1rem; }
  .company-header::before { left: -1rem; }

  .role { padding: 1rem 1.1rem; }
  .role-header { flex-direction: column; gap: 0.15rem; }

  .section { padding: 3.5rem 0; }

  .scroll-top { bottom: 1.25rem; right: 1.25rem; }
}
