/* ============================================================
   resume.akashpanwar.dev

   Clean, neutral, high-contrast. Deliberately restrained: this
   site is read by hiring managers who are scanning, not
   browsing. Legibility and density beat visual flourish.

   Shares nothing with ../styles.css by design — the two sites
   diverge freely without merge risk.
   ============================================================ */

:root {
  --bg:          #ffffff;
  --bg-sunk:     #f6f7f8;
  --text:        #14181d;
  --text-muted:  #545c66;
  --text-faint:  #656d78;
  --rule:        #e2e5e9;
  --rule-strong: #c9cdd3;
  --accent:      #1c4fd8;
  --on-accent:   #ffffff;
  --tag-bg:      #f2f4f6;
  --live:        #157a42;

  --measure: 68ch;
  --shell: 62rem;

  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.89rem);
  --step-0:  clamp(0.97rem, 0.94rem + 0.16vw, 1.06rem);
  --step-1:  clamp(1.12rem, 1.05rem + 0.33vw, 1.32rem);
  --step-2:  clamp(1.35rem, 1.22rem + 0.62vw, 1.75rem);
  --step-3:  clamp(1.85rem, 1.5rem + 1.6vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0f1216;
    --bg-sunk:     #161b21;
    --text:        #e8ebee;
    --text-muted:  #a3acb6;
    --text-faint:  #7b848f;
    --rule:        #242b33;
    --rule-strong: #333c46;
    --accent:      #78a3ff;
    --tag-bg:      #1b2129;
    --live:        #46c47f;
    /* The dark-mode accent is light, so white label text on it fails
       contrast. Buttons take dark ink against that accent instead. */
    --on-accent:   #0f1216;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }

/* Links sitting inside a run of muted body text are underlined: colour alone
   does not clear 3:1 against the surrounding copy (WCAG 1.4.1). */
.bullets a, .contact__blurb a, .hero__blurb a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: .6rem 1rem;
  z-index: 100;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------------- Top bar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.5rem;
}

.topbar__name {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.topbar__name:hover { text-decoration: none; }

.topnav {
  display: flex;
  gap: 1.4rem;
  font-size: var(--step--1);
}
.topnav a { color: var(--text-muted); }
.topnav a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 46rem) {
  .topnav { display: none; }
}

/* ---------------- Hero ---------------- */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
}

.dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 18%, transparent);
}

.hero__name {
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 .75rem;
}

.hero__role {
  font-size: var(--step-1);
  font-weight: 400;
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
}

.hero__blurb {
  max-width: var(--measure);
  color: var(--text-muted);
  margin: 0 0 2rem;
}
.hero__blurb strong { color: var(--text); font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1.25rem;
  border-radius: 7px;
  font-size: var(--step--1);
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--text)); }

.btn--ghost {
  border-color: var(--rule-strong);
  color: var(--text);
}
.btn--ghost:hover { background: var(--bg-sunk); }

.btn svg { flex: none; }

/* Facts strip */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 9px;
  overflow: hidden;
}

.fact {
  background: var(--bg);
  padding: .95rem 1.1rem;
}

.fact__value {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.2;
}

.fact__label {
  font-size: var(--step--1);
  color: var(--text-faint);
  display: block;
  margin-top: .15rem;
}

/* ---------------- Section scaffolding ---------------- */

.section {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.section__title {
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.section__note {
  font-size: var(--step--1);
  color: var(--text-faint);
  margin: 0;
}

/* ---------------- Experience ---------------- */

.timeline { display: grid; gap: 2.5rem; }

.job {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 2rem;
}

@media (max-width: 52rem) {
  .job { grid-template-columns: 1fr; gap: .6rem; }
}

.job__when {
  font-size: var(--step--1);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  padding-top: .3rem;
}

.job__place { display: block; margin-top: .2rem; }

.job__title {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 .2rem;
}

.job__org {
  font-size: var(--step-0);
  color: var(--text-muted);
  margin: 0 0 .9rem;
}
.job__org a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.job__org a:hover { color: var(--accent); }

.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .5rem;
  max-width: var(--measure);
}

.bullets li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: .32rem;
  height: .32rem;
  border-radius: 50%;
  background: var(--rule-strong);
}

.bullets strong { color: var(--text); font-weight: 600; }

/* ---------------- Work / projects ---------------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.25rem;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: border-color .18s ease;
}
.card:hover { border-color: var(--rule-strong); }

.card__shot {
  display: block;
  width: 100%;
  /* height:auto is load-bearing, not decorative. The width/height attributes
     on the <img> are kept so the browser reserves space before the image
     loads, but without this the attribute height (1080px) beats aspect-ratio
     and the box renders ~315x1080 — cover then crops each screenshot to a
     narrow vertical sliver of its top-left corner. */
  height: auto;
  /* Sources are ~16:9 browser-viewport screenshots; matching that ratio
     shows each site roughly whole. */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  background: var(--bg-sunk);
  border-bottom: 1px solid var(--rule);
}

.card__body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}

.card__title {
  font-size: var(--step-0);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.card__desc {
  margin: 0;
  font-size: var(--step--1);
  color: var(--text-muted);
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  font-size: .72rem;
  letter-spacing: .015em;
  padding: .2rem .5rem;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--text-muted);
  white-space: nowrap;
}

.live {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--live);
  border: 1px solid color-mix(in srgb, var(--live) 35%, transparent);
  padding: .1rem .38rem;
  border-radius: 3px;
}

/* ---------------- Skills ---------------- */

.skills { display: grid; gap: 1.4rem; }

.skill-row {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 52rem) {
  .skill-row { grid-template-columns: 1fr; gap: .5rem; }
}

.skill-row__label {
  font-size: var(--step--1);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding-top: .2rem;
}

/* ---------------- Education / achievements ---------------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: clamp(2rem, 5vw, 3.5rem);
}

.subhead {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
}

.edu { display: grid; gap: 1.4rem; }

.edu__degree {
  font-size: var(--step-0);
  font-weight: 600;
  margin: 0 0 .15rem;
}

.edu__meta {
  margin: 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ---------------- Contact ---------------- */

.contact {
  padding: clamp(3rem, 7vw, 5rem) 0;
  background: var(--bg-sunk);
  border-top: 1px solid var(--rule);
}

.contact__title {
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 .6rem;
}

.contact__blurb {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 1.75rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--text);
}
.links a:hover { color: var(--accent); }

.foot {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
  font-size: var(--step--1);
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------------- Print ----------------
   Someone will hit Ctrl-P on this page. Give them the content
   without the site chrome rather than a broken screenshot. */

@media print {
  .topbar, .cta-row, .skip, .card__shot, .contact { display: none; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .section, .hero { border: 0; padding: .5rem 0; break-inside: avoid; }
  .shell { width: 100%; }
  a { color: #000; }
  .card { break-inside: avoid; }
}
