/* =========================================================
   Rajan Bhandari — Portfolio
   Simple, restrained, grayscale + single navy accent.
   ========================================================= */

:root {
  --bg:        #ffffff;
  --bg-alt:    #f4f4f3;
  --ink:       #1c1c1e;
  --ink-muted: #4c4e50; /* darkened for WCAG AAA (7:1) on all backgrounds used in this site */
  --border:    #e0e0dd;
  --accent:    #22405f;   /* single accent, navy — matches the portrait */
  --accent-ink:#ffffff;
  --focus:     #22405f;
  --radius: 8px;
  --container: 880px;
  --font: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; color: var(--ink-muted); }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; display: block; }

/* Focus visibility */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  background: var(--ink);
  color: #fff;
  padding: 0.9em 1.2em;
  z-index: 1000;
  font-weight: 700;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 3.5rem 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 0 2rem; }
.section-head p { margin-bottom: 0; }
.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5em;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(140%) blur(4px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--ink-muted); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
}

.primary-nav ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: wrap;
}
.primary-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.6rem 0.1rem;
  border-bottom: 2px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.primary-nav a[aria-current="location"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.primary-nav a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1.25rem;
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0.1rem; }
  .primary-nav a { padding: 0.8rem 0.25rem; }
}

/* ---------- Hero ---------- */
.hero { padding: 3.5rem 0 3rem; }
.hero .container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-photo {
  width: 220px; height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hero h1 { margin-bottom: 0.15em; }
.hero .role { font-size: 1.05rem; color: var(--ink-muted); margin-bottom: 0.9em; }
.hero .location {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--ink-muted); font-size: 0.92rem; margin-bottom: 1.2rem;
}
.hero-ctas { display: flex; gap: 0.85rem; flex-wrap: wrap; }

@media (max-width: 640px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .hero-ctas, .hero .location { justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--accent);
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 44px;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1a3149; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--bg-alt); }

/* ---------- Experience timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.timeline li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.job-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 0.3em;
}
.job-title { font-weight: 700; font-size: 1.02rem; }
.job-org { color: var(--accent); font-weight: 600; font-size: 0.94rem; }
.job-meta { font-size: 0.85rem; color: var(--ink-muted); white-space: nowrap; }
.timeline p { margin-bottom: 0; font-size: 0.94rem; }

/* ---------- Expertise ---------- */
.expertise-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 700px) { .expertise-grid { grid-template-columns: 1fr; } }
.expertise-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  background: var(--bg);
}
.expertise-card h3 { margin-bottom: 0.7em; }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  color: var(--ink);
}
.stat-line {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.stack-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.stack-table th, .stack-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  vertical-align: top;
}
.stack-table th { width: 160px; color: var(--ink); font-weight: 700; }
.stack-table td { color: var(--ink-muted); }

/* ---------- Focus / What I bring ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 700px) { .focus-grid { grid-template-columns: 1fr; } }
.focus-item { display: flex; gap: 1rem; }
.focus-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.focus-item h3 { margin-bottom: 0.25em; font-size: 0.98rem; }
.focus-item p { margin-bottom: 0; font-size: 0.92rem; }

.philosophy {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.4rem;
  margin: 0;
}
.philosophy p { font-size: 1.05rem; color: var(--ink); font-style: italic; }
.philosophy p:last-child { margin-bottom: 0; }

/* ---------- Education ---------- */
.edu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.edu-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.edu-list h3 { margin-bottom: 0.2em; }
.edu-list p { margin-bottom: 0; font-size: 0.92rem; }

/* ---------- Contact / footer ---------- */
.contact-section { background: var(--ink); color: #e6e6e4; }
.contact-section .eyebrow { color: #9db3c6; }
.contact-section h2 { color: #fff; }
.contact-section p { color: #c7c7c4; }
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: 0.85rem; align-items: center; }
.contact-list .c-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.contact-list a { color: #fff; font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-section .btn-outline { border-color: #fff; color: #fff; }
.contact-section .btn-outline:hover { background: rgba(255,255,255,0.1); }
.contact-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 1.75rem; }
.copy-status { margin: 0.75rem 0 0; font-size: 0.88rem; color: #c7c7c4; min-height: 1.2em; }

.site-footer-bottom {
  text-align: center;
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
}

.icon { width: 1.1em; height: 1.1em; }
