/* dipankarbanik.com — plain, high-contrast résumé layout.
   Text colours are chosen to pass WCAG AA on their backgrounds:
   --text 17:1, --text-2 10:1, --muted 6.3:1, --accent 8.6:1 on white. */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --text: #16181d;
  --text-2: #363a42;
  --muted: #565c68;
  --line: #e1e4e9;
  --line-2: #c9ced6;
  --accent: #0f4c81;
  --accent-hover: #0a3963;
  --accent-soft: #e7eef6;
  --ok: #1e6b3a;
  --err: #a12a2a;

  --wrap: 1100px;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; color: var(--text); line-height: 1.2; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--text); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -0.01em;
  /* Hidden while the hero's own name is on screen; site.js toggles .show-brand. */
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.site-header.show-brand .brand { opacity: 1; visibility: visible; transform: none; }
.brand:hover { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 15.5px;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { color: var(--text); background: var(--bg-alt); }
.nav .nav-resume {
  margin-left: 8px; color: var(--accent); border: 1.5px solid var(--accent); padding: 6px 14px;
}
.nav .nav-resume:hover { background: var(--accent); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); padding: 6px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  padding: 11px 20px; border-radius: 8px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-secondary { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); }

/* ---------- intro ---------- */
.intro {
  position: relative; overflow: hidden;
  padding: 88px 0 80px; min-height: 640px;
  border-bottom: 1px solid var(--line);
}
.intro-grid { position: relative; z-index: 1; }
.intro-text { max-width: min(580px, 48vw); }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.intro h1 { font-size: clamp(40px, 5.2vw, 58px); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 8px; }
.role { font-size: 21px; font-weight: 600; color: var(--accent); margin-bottom: 20px; }
.lede { font-size: 18.5px; color: var(--text-2); max-width: 600px; margin-bottom: 28px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 22px; }
.hero-links { list-style: none; margin: 0 0 34px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.hero-links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 16px; color: var(--text-2); text-decoration: none;
}
.hero-links a svg { color: var(--accent); flex-shrink: 0; }
.hero-links a:hover { color: var(--accent); text-decoration: underline; }

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0;
  border-top: 1px solid var(--line);
}
.facts div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.facts dd { margin: 2px 0 0; font-weight: 500; color: var(--text); }

/* Photo spans the right half to the viewport edge. The gradients fade it to
   white on the left (behind the text) and at the bottom, so text always sits
   on white or near-white and keeps its contrast. */
.intro-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 54%; margin: 0; z-index: 0; }
.intro-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.intro-photo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.92) 14%, rgba(255,255,255,0.55) 30%, rgba(255,255,255,0.12) 48%, rgba(255,255,255,0) 62%),
    linear-gradient(0deg, #fff 0%, rgba(255,255,255,0.6) 10%, rgba(255,255,255,0) 26%);
}

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 28px; }
.section-intro { color: var(--text-2); margin: -14px 0 28px; }
#about p { font-size: 18px; color: var(--text-2); }

/* ---------- experience ---------- */
.job {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px;
  padding: 32px 0; border-top: 1px solid var(--line-2);
}
.job:first-of-type { border-top: 0; padding-top: 4px; }
.job-meta p { margin: 0; }
.job-dates { font-weight: 600; color: var(--text); }
.job-place { color: var(--muted); font-size: 15.5px; }
.job-body h3 { font-size: 22px; font-weight: 700; }
.job-title { font-weight: 600; color: var(--accent); margin: 4px 0 10px; }
.job-context { color: var(--muted); font-size: 16px; margin-bottom: 12px; }
.job-body ul { margin: 0 0 14px; padding-left: 20px; }
.job-body li { margin-bottom: 8px; color: var(--text-2); }
.job-body li::marker { color: var(--accent); }
.job-body li strong { color: var(--text); }
.tags { font-family: var(--mono); font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.7; }

/* ---------- projects ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 24px 26px;
}
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 16.5px; }
.card .stack { font-family: var(--mono); font-size: 13.5px; color: var(--muted); margin: 0; }

/* ---------- skills ---------- */
.skills { margin: 0 0 48px; border-top: 1px solid var(--line-2); }
.skills div { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.skills dt { font-weight: 600; color: var(--text); }
.skills dd { margin: 0; color: var(--text-2); }

.sub-heading { font-size: 19px; font-weight: 700; margin: 0 0 18px; }
.logos {
  list-style: none; margin: 0 0 48px; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
}
.logos li {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  height: 108px; padding: 14px 12px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 10px;
}
.logos img { height: 32px; max-width: 100%; width: auto; object-fit: contain; filter: grayscale(1) contrast(1.15); opacity: 0.9; transition: filter 0.2s, opacity 0.2s; }
.logos img.logo-cisco { height: 44px; }
.logos img.logo-light { filter: grayscale(1) brightness(0.45); opacity: 1; }
.logos li:hover img { filter: none; opacity: 1; }
.logos li > span { font-size: 13px; font-weight: 600; color: var(--text-2); text-align: center; line-height: 1.3; }
.logos li.text-only .logo-text { font-weight: 700; color: var(--text); font-size: 17px; text-align: center; }
.edu { font-weight: 500; margin: 0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.contact-grid > div > p { color: var(--text-2); font-size: 18px; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list span { font-weight: 600; color: var(--muted); font-size: 15.5px; }
.contact-list a { word-break: break-word; }

.contact-form {
  display: grid; gap: 6px; background: var(--bg-alt);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 26px;
}
.contact-form label { font-weight: 600; font-size: 15px; color: var(--text); margin-top: 8px; }
.contact-form label:first-child { margin-top: 0; }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: #fff; border: 1.5px solid var(--line-2); border-radius: 8px; padding: 11px 13px;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cf-captcha { margin: 14px 0 6px; min-height: 78px; }
.contact-form .btn { justify-self: start; margin-top: 4px; }
.cf-status { margin: 8px 0 0; font-weight: 500; font-size: 15.5px; min-height: 24px; color: var(--text-2); }
.cf-status.ok { color: var(--ok); }
.cf-status.err { color: var(--err); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 15px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-2); font-weight: 500; text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  /* Stacked: photo becomes a full-width banner that fades into the text below. */
  .intro { padding: 0 0 56px; min-height: 0; }
  .intro-photo { position: relative; width: 100%; height: 360px; }
  .intro-photo::after {
    background: linear-gradient(0deg, #fff 0%, rgba(255,255,255,0.85) 16%, rgba(255,255,255,0) 44%);
  }
  .intro-grid { margin-top: -8px; }
  .intro-text { max-width: none; }
  .job { grid-template-columns: 1fr; gap: 8px; }
  .job-meta { display: flex; gap: 14px; flex-wrap: wrap; }
  .cards { grid-template-columns: 1fr; }
  .skills div { grid-template-columns: 1fr; gap: 2px; }
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 17px; }
  .nav .nav-resume { margin: 8px 0 0; text-align: center; }
  .wrap { padding: 0 16px; }
  .intro { padding: 0 0 44px; }
  .intro-photo { height: 280px; }
  .section { padding: 56px 0; }
  .facts { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-list li { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
