/* Vishal Singh — six-size scale, one reading column */

:root {
  --bg: #f6f1e8;
  --paper: #fffcf7;
  --ink: #14110e;
  --muted: #5e5850;
  --line: #e2d8c6;
  --line-strong: #cfc3ae;
  --accent: #b33a12;
  --accent-soft: rgba(179, 58, 18, 0.1);
  --header-h: 68px;
  --max: 1080px;
  --measure: 44rem;
  --gutter: 2.4rem;
  --gutter-sm: 1.4rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --font-caption: 0.8125rem; /* 13px — kicker, footer, table headers */
  --font-small: 0.875rem;    /* 14px — metric labels, org, dates, nav, buttons */
  --font-body: 1.1875rem;    /* 19px — reading text */
  --font-lede: 1.3125rem;    /* 21px — only under H1 */
  --font-h2: 1.5rem;         /* 24px — section titles */
  --font-display: clamp(2.1rem, 4vw, 3.25rem);
  --lh-body: 1.52;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: var(--font-body);
  line-height: var(--lh-body);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

button, input, textarea { font: inherit; color: inherit; }

h1 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
}

p, ul, ol, blockquote { margin: 0; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-size: var(--font-small);
}
.skip-link:focus { top: 0.8rem; }

.wrap {
  width: min(var(--max), calc(100% - var(--gutter)));
  margin-inline: auto;
}

.measure {
  width: min(var(--measure), calc(100% - var(--gutter)));
  margin-inline: auto;
}

main { min-height: calc(100vh - var(--header-h) - 72px); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, white 14%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: var(--font-caption);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-toggle { display: none; }

.nav-toggle-label {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 15px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-label span::before { top: -5px; }
.nav-toggle-label span::after { top: 5px; }

.site-nav ul {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: var(--font-small);
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

/* Hero */

.hero {
  padding: 3.5rem 0 0;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: var(--font-small);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.kicker span:not(:last-child)::after {
  content: "·";
  margin-inline: 0.65rem;
  color: var(--muted);
}

.hero h1,
.page-hero h1,
.case-hero h1 {
  max-width: var(--measure);
  font-size: var(--font-display);
}

.lede {
  margin-top: 1.15rem;
  max-width: var(--measure);
  font-size: var(--font-lede);
  line-height: 1.45;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  font-size: var(--font-small);
}

.hero-links a { font-weight: 600; }

/* Metrics */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 2rem 0 2.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.metric {
  padding: 1.15rem 1.1rem 1.1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics > .metric:nth-child(4n) { border-right: 0; }
.metrics > .metric:nth-last-child(-n+4) { border-bottom: 0; }

.metric b {
  display: block;
  font-family: var(--serif);
  font-size: var(--font-h2);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.metric span {
  display: block;
  margin-top: 0.4rem;
  color: var(--ink);
  font-size: var(--font-small);
  line-height: 1.4;
}

.measure .metrics {
  grid-template-columns: 1fr 1fr;
}

.measure .metrics > .metric:nth-child(4n) { border-right: 1px solid var(--line); }
.measure .metrics > .metric:nth-child(2n) { border-right: 0; }
.measure .metrics > .metric:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
.measure .metrics > .metric:nth-last-child(-n+2) { border-bottom: 0; }

/* Work list */

.section-head {
  margin-bottom: 0.25rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-size: var(--font-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-list {
  display: grid;
  margin-bottom: 4.5rem;
}

.work-item {
  display: grid;
  grid-template-columns: 8.5rem 1fr auto;
  gap: 1.2rem;
  align-items: start;
  padding: 1.5rem 1rem;
  margin-inline: -1rem;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.work-item:hover,
.work-item:focus-visible {
  background: var(--paper);
  outline: none;
}

.work-org {
  color: var(--muted);
  font-size: var(--font-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.2rem;
}

.work-title {
  font-size: var(--font-h2);
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--line-strong);
}

.work-item:hover .work-title,
.work-item:focus-visible .work-title {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.work-item p {
  margin-top: 0.7rem;
  color: var(--ink);
  font-size: var(--font-body);
  line-height: var(--lh-body);
}

.work-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  color: var(--muted);
  font-size: var(--font-small);
  white-space: nowrap;
  padding-top: 0.3rem;
}

.work-go {
  color: var(--ink);
  font-weight: 600;
}

.work-go::after {
  content: " →";
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: var(--font-small);
  font-weight: 600;
  cursor: pointer;
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Case study */

.case-hero {
  padding: 3.2rem 0 1.1rem;
}

.article { padding-bottom: 4.5rem; }

.article h2 {
  font-size: var(--font-h2);
  margin: 2.75rem 0 0.9rem;
}

.article h2:first-child { margin-top: 0; }

.article h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: var(--font-body);
}

.article p + p { margin-top: 1.5em; }

.article ul,
.article ol {
  padding-left: 1.5em;
}

.article p + ul,
.article p + ol,
.article ul + p,
.article ol + p { margin-top: 1.5em; }

.article li + li { margin-top: 0.85em; }

.article blockquote {
  margin: 1.75rem 0;
  padding: 1.35rem 0 1.35rem 1.15rem;
  border-left: 2px solid var(--accent);
  font-size: var(--font-body);
  font-style: italic;
  line-height: var(--lh-body);
}

.callout {
  margin: 1.75rem 0;
  padding: 1.15rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
}

.callout strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--font-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-wrap { overflow-x: auto; margin: 1.5rem 0 1.75rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-small);
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.65rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.next-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* About / resume */

.page-hero { padding: 3.2rem 0 1.25rem; }

.prose p + p { margin-top: 1.5em; }

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 2rem;
}

.side-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.15rem 1.2rem;
  font-size: var(--font-small);
  line-height: 1.45;
}

.side-card h2 {
  font-size: var(--font-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.side-card ul { list-style: none; padding: 0; }
.side-card li + li { margin-top: 0.45rem; }
.side-card a { font-weight: 600; }
.side-card p { color: var(--ink); }

.job {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.job:first-child { padding-top: 0; }

.job-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.job h2 { font-size: var(--font-h2); }
.job .org {
  color: var(--muted);
  font-size: var(--font-small);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.job .when {
  color: var(--muted);
  font-size: var(--font-small);
}
.job ul {
  margin-top: 0.85rem;
  padding-left: 1.5em;
}
.job li + li { margin-top: 0.75em; }

.form {
  position: relative;
  margin-top: 2.75rem;
  padding-top: 2rem;
  padding-bottom: 4rem;
  border-top: 1px solid var(--line);
}

/* Off-screen extra field. Bots fill it; people do not. */
.field-extra {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form h2 {
  font-size: var(--font-h2);
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field { margin-bottom: 0.9rem; }
.field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: var(--font-small);
  font-weight: 600;
}
.req { color: var(--accent); }

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
  outline: none;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field textarea { min-height: 130px; resize: vertical; }
.sublabel {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: var(--font-caption);
}

.archive-list { list-style: none; padding: 0 0 4rem; }
.archive-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.archive-list a { font-weight: 600; }
.archive-list small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: var(--font-small);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.15rem 0 1.4rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-inner a { text-decoration: none; }

@media (max-width: 860px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics > .metric:nth-child(4n) { border-right: 1px solid var(--line); }
  .metrics > .metric:nth-child(2n) { border-right: 0; }
  .metrics > .metric:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .metrics > .metric:nth-last-child(-n+2) { border-bottom: 0; }

  .work-item { grid-template-columns: 1fr; gap: 0.35rem; }
  .work-item p { margin-top: 0.6rem; }
  .work-meta {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    white-space: normal;
    width: 100%;
  }
  .meta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap,
  .wrap-wide,
  .measure {
    width: min(var(--max), calc(100% - var(--gutter-sm)));
  }

  .measure {
    width: min(var(--measure), calc(100% - var(--gutter-sm)));
  }

  .nav-toggle-label { display: grid; }
  .site-nav {
    position: absolute;
    top: calc(var(--header-h) - 0.4rem);
    right: 0;
    left: 0;
    display: none;
    padding: 0.5rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(20, 17, 14, 0.08);
  }
  .site-nav ul { flex-direction: column; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-top: 2.4rem; }
}

/* Archive pages */

.wrap-wide {
  width: min(var(--max), calc(100% - var(--gutter)));
  margin-inline: auto;
}

.case { padding-bottom: 3.5rem; }

.case-intro {
  width: min(var(--measure), 100%);
  margin: 0 auto 2rem;
}
.case-intro h1 { font-size: var(--font-display); }
.case-intro p { margin-top: 0.8rem; }

.archive-work { padding-bottom: 1rem; }

.feature-shot {
  margin: 0 auto 1.35rem;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}
.feature-shot img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.wireframes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 1.15rem;
  margin: 0 0 0.5rem;
  align-items: start;
}
.wireframes .feature-shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.wireframes a {
  display: flex;
  justify-content: center;
  width: 100%;
  line-height: 0;
}
.wireframes img {
  width: auto;
  max-width: 100%;
  max-height: min(68vh, 34rem);
  height: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}
.caption {
  padding: 0.65rem 0.85rem 0.85rem;
  color: var(--muted);
  font-size: var(--font-small);
  text-align: left;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}
.gallery a,
.gallery figure {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}
.gallery img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.gallery-label {
  margin: 2.4rem 0 1rem;
  font-size: var(--font-h2);
  text-align: left;
}
.archive-work > .gallery-label:first-child { margin-top: 0; }

.back-row {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.poem { width: min(var(--measure), 100%); margin: 0 auto 3rem; }
.poem-hero { overflow: hidden; margin-bottom: 1.6rem; border: 1px solid var(--line); }
.poem-hero img { width: 100%; max-height: 380px; object-fit: cover; }
.poem article p {
  margin: 0 0 1.5em;
  font-size: var(--font-body);
  line-height: var(--lh-body);
}

.blog-grid { display: grid; gap: 1rem; padding-bottom: 3rem; }
.blog-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  overflow: hidden;
}
.blog-card img { width: 100%; height: 180px; object-fit: cover; }
.blog-card .body { padding: 1rem; }
.blog-card h2 { font-size: var(--font-h2); }
.excerpt, .meta {
  color: var(--muted);
  font-size: var(--font-small);
}
.tag {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: var(--font-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 3rem;
}
.tags a {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: var(--font-caption);
  text-decoration: none;
}

@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
