/* Shalman Shah — personal site
   Monochrome interface. Original portfolio images keep their own colors. */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --mute: #595959;      /* 7:1 on white */
  --rule: #d6d6d6;
  --rule-strong: #000000;
  --wash: #f5f5f5;

  --sans: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 80rem;
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
a { color: inherit; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Focus */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn:focus-visible, .nav-cta:focus-visible { outline-offset: 4px; box-shadow: 0 0 0 2px var(--paper); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .75rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.brand { display: inline-block; line-height: 0; }
.brand img { width: 4.25rem; height: auto; }
.brand-footer img { width: 3.2rem; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { display: flex; gap: 2rem; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: .98rem; }
.site-nav ul a { padding: .5rem 0; border-bottom: 1px solid transparent; }
.site-nav ul a:hover { border-bottom-color: var(--ink); }

.nav-cta {
  border: 1px solid var(--ink); padding: .55rem 1.1rem; font-weight: 600 !important;
  transition: background-color .15s, color .15s;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }

.menu-toggle { display: none; }

@media (max-width: 52rem) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .6rem;
    background: none; border: 1px solid var(--ink); color: var(--ink);
    font: 600 .95rem var(--sans); padding: .55rem .9rem; cursor: pointer; min-height: 2.75rem;
  }
  .menu-toggle-icon, .menu-toggle-icon::before {
    display: block; width: 1.1rem; height: 2px; background: currentColor; position: relative;
  }
  .menu-toggle-icon::before { content: ""; position: absolute; top: -5px; left: 0; }
  .menu-toggle-icon { box-shadow: 0 5px 0 currentColor; transition: box-shadow .15s; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon { box-shadow: none; }

  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--ink);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.5rem;
  }
  .js .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 1rem 0; font-size: 1.25rem; border-bottom: 1px solid var(--rule); }
  .nav-cta { margin-top: 1.25rem; text-align: center; padding: .9rem; }
  /* Without JavaScript the nav simply wraps below the logo */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: .75rem; }
  html:not(.js) .menu-toggle { display: none; }
  html:not(.js) .site-nav { width: 100%; flex-wrap: wrap; gap: 1rem; }
  html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  html:not(.js) .site-nav ul a { font-size: 1rem; border: 0; padding: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  padding: 1rem 1.6rem; min-height: 3rem; border: 1px solid var(--ink);
  transition: background-color .15s, color .15s;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--paper); color: var(--ink); }
.btn-line { background: var(--paper); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

.text-link { font-weight: 500; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero-grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: end;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
}

.hero h1 {
  font-weight: 700; letter-spacing: -.045em; line-height: .92;
  font-size: clamp(3.1rem, 10.5vw, 9rem);
}
.hero-line { display: block; }
.hero-serif {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  letter-spacing: -.02em; line-height: 1;
  font-size: .94em;
  margin-top: .04em;
}
.hero-intro {
  max-width: 34rem; margin-top: clamp(1.75rem, 3vw, 2.5rem);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.hero-portrait { max-width: 25rem; width: 100%; justify-self: end; }
.portrait-frame {
  position: relative; border: 1px solid var(--ink); background: var(--paper);
  padding: clamp(.75rem, 2vw, 1.25rem) clamp(.75rem, 2vw, 1.25rem) 0;
  aspect-ratio: 5 / 6; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
}
.portrait-frame picture { display: block; width: 100%; height: 100%; }
.portrait-frame img { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }
.hero-portrait figcaption { margin-top: .75rem; font-size: .9rem; color: var(--mute); border-top: 1px solid var(--rule); padding-top: .6rem; }

@media (max-width: 61.99rem) {
  .hero-portrait { justify-self: start; max-width: 22rem; }
}

/* Single orchestrated entrance: hero lines, once, fast */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-line { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
  .js .hero-line:nth-child(2) { animation-delay: .07s; }
  .js .hero-line:nth-child(3) { animation-delay: .14s; }
  @keyframes rise { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }
}

/* ---------- Strip ---------- */
.strip { border-block: 1px solid var(--ink); padding-block: 1.75rem 2rem; }
.strip-title { font-size: .95rem; font-weight: 600; color: var(--mute); margin-bottom: 1rem; }
.strip-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.strip-list li { padding: .85rem 1rem; font-weight: 500; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.strip-note { margin-top: 1.25rem; max-width: 58rem; color: var(--mute); font-size: .95rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section + .section { border-top: 1px solid var(--rule); }
.strip + .section { border-top: 0; }

.section-head {
  display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 52rem) {
  .section-head { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; column-gap: clamp(2rem, 6vw, 6rem); }
}
.section-head h2 {
  font-size: clamp(2.5rem, 6.5vw, 5.5rem); font-weight: 700; letter-spacing: -.04em; line-height: .98;
}
.lede { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.3; max-width: 32rem; }

.fineprint { font-size: .92rem; color: var(--mute); max-width: 46rem; }

/* ---------- Services ---------- */
.service-list { border-top: 1px solid var(--ink); }
.service {
  display: grid; gap: 1.25rem 3rem; padding-block: 2rem 2.25rem; border-bottom: 1px solid var(--rule);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 62rem) {
  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); }
}
.service h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.service-body { display: grid; gap: .9rem; align-content: start; }
.suited { color: var(--ink); }
.suited strong { font-weight: 600; }
.deliverables { border-left: 1px solid var(--ink); padding-left: 1.25rem; display: grid; gap: .55rem; align-content: start; font-size: .98rem; }
.deliverables li { position: relative; }
@media (max-width: 61.99rem) {
  .deliverables { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1rem; }
}

.fees {
  margin-top: clamp(2.5rem, 5vw, 4rem); border: 1px solid var(--ink); padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid; gap: 1.5rem; justify-items: start;
}
.fees h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.025em; line-height: 1.15; font-weight: 600; }
.fees-grid { display: grid; gap: 1.25rem 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .fees-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fees-grid strong { display: block; font-weight: 600; margin-bottom: .2rem; }

/* ---------- Work ---------- */
.work-list { border-top: 1px solid var(--ink); }
.work {
  display: grid; gap: 1.5rem 3rem; padding-block: 2.25rem; border-bottom: 1px solid var(--rule);
  grid-template-columns: minmax(0, 1fr); align-items: center;
}
@media (min-width: 52rem) {
  .work { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .work:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
  .work:nth-child(even) .work-thumb { order: 2; }
}
.work-thumb {
  display: block; padding: 0; border: 1px solid var(--ink); background: var(--wash);
  cursor: pointer; line-height: 0; overflow: hidden; width: 100%;
}
.work-thumb img { width: 100%; height: auto; transition: transform .3s ease; }
.work-thumb:hover img { transform: scale(1.015); }
.work-text h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
.work-meta { font-family: var(--serif); font-style: italic; font-size: 1.25rem; margin: .5rem 0 1rem; color: var(--mute); }
.work-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 1.5rem; }

.download-row {
  margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
}
.download-row p { max-width: 34rem; }

/* ---------- Dialog ---------- */
html.dlg-open { overflow: hidden; }
.project-dialog {
  padding: 0; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  width: min(62rem, calc(100% - 1.5rem)); max-width: none; max-height: calc(100dvh - 1.5rem);
  overflow: hidden;
}
.project-dialog[open] { display: flex; }
.project-dialog::backdrop { background: rgba(255,255,255,.88); }
@media (prefers-reduced-motion: no-preference) {
  .project-dialog[open] { animation: dlg-in .18s ease-out; }
  @keyframes dlg-in { from { opacity: 0; transform: translateY(.75rem); } to { opacity: 1; transform: none; } }
}
.dlg-inner { overflow-y: auto; width: 100%; padding: 0 clamp(1.25rem, 3vw, 2.25rem) 2rem; overscroll-behavior: contain; }
.dlg-bar {
  position: sticky; top: 0; background: var(--paper); z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.25rem 1rem; border-bottom: 1px solid var(--ink);
}
.dlg-bar h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -.03em; line-height: 1.1; font-weight: 700; }
.dlg-close {
  flex: none; background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  font: 600 .95rem var(--sans); padding: .6rem 1.1rem; min-height: 2.75rem; cursor: pointer;
}
.dlg-close:hover { background: var(--paper); color: var(--ink); }
.dlg-facts { margin-top: 1.5rem; display: grid; gap: 1.1rem; }
.dlg-facts div { display: grid; gap: .25rem 2rem; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--rule); padding-bottom: 1.1rem; }
@media (min-width: 40rem) { .dlg-facts div { grid-template-columns: 9rem minmax(0, 1fr); } }
.dlg-facts dt { font-weight: 600; }
.dlg-evidence { display: grid; gap: 1.75rem; margin-top: 1.75rem; }
.dlg-evidence figure img { width: 100%; border: 1px solid var(--rule); }
.dlg-evidence figcaption { margin-top: .5rem; font-size: .92rem; color: var(--mute); }
.dlg-foot { margin-top: 1.75rem; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 3rem clamp(2rem, 6vw, 6rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) { .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.about-main { display: grid; gap: 1.25rem; align-content: start; max-width: 36rem; font-size: 1.15rem; }
.about-industries h3, .credentials h3 { font-size: 1.5rem; letter-spacing: -.02em; font-weight: 600; margin-bottom: 1rem; }
.about-industries dl { border-top: 1px solid var(--ink); }
.about-industries dl > div { display: grid; gap: .25rem 1.5rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .about-industries dl > div { grid-template-columns: 11rem minmax(0, 1fr); } }
.about-industries dt { font-weight: 600; }
.about-industries .fineprint { margin-top: 1rem; }

.credentials { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 2.5rem; border-top: 1px solid var(--ink); }
.cred-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 2rem 1.5rem; margin-bottom: 1.5rem; }
.cred-list li { display: grid; gap: .9rem; align-content: start; justify-items: start; }
.cred-list img { height: 8.5rem; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.cred-list span { font-weight: 500; line-height: 1.35; }

/* ---------- Process ---------- */
.process { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); }
@media (min-width: 52rem) { .process { grid-template-columns: repeat(4, minmax(0, 1fr)); } .process li + li { border-left: 1px solid var(--rule); } }
.process li { padding: 1.75rem 1.5rem 2rem 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 52rem) { .process li { padding: 1.75rem 1.5rem 2rem 1.5rem; } .process li:first-child { padding-left: 0; } }
.process h3 { font-size: 1.6rem; letter-spacing: -.025em; font-weight: 700; display: flex; align-items: baseline; gap: .6rem; margin-bottom: .75rem; }
.step-no { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.5rem; color: var(--mute); }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--ink); max-width: 56rem; }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 1.35rem 3rem 1.35rem 0; position: relative;
  font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: .25rem; top: 50%; width: .9rem; height: 2px; background: currentColor;
  box-shadow: 0 0 0 0 currentColor; transform: translateY(-50%);
}
.faq-list summary::before {
  content: ""; position: absolute; right: calc(.25rem + .45rem - 1px); top: 50%; width: 2px; height: .9rem; background: currentColor;
  transform: translateY(-50%); transition: transform .15s;
}
.faq-list details[open] summary::before { transform: translateY(-50%) scaleY(0); }
.faq-list summary:focus-visible { outline-offset: -3px; }
.faq-list details p { padding: 0 3rem 1.6rem 0; max-width: 44rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 3rem clamp(2rem, 6vw, 6rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) { .contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); align-items: start; } }
.contact-details h3, .brief h3 { font-size: 1.5rem; letter-spacing: -.02em; font-weight: 600; margin-bottom: 1rem; }
.contact-details ul { border-top: 1px solid var(--ink); }
.contact-details li { display: grid; gap: .15rem 1.5rem; padding-block: 1.1rem; border-bottom: 1px solid var(--rule); grid-template-columns: minmax(0, 1fr); font-size: 1.15rem; }
@media (min-width: 30rem) { .contact-details li { grid-template-columns: 6.5rem minmax(0, 1fr); } }
.contact-details .label { color: var(--mute); font-size: .95rem; padding-top: .15rem; }
.contact-details a { overflow-wrap: anywhere; font-weight: 500; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.contact-details a:hover { text-decoration-thickness: 2px; }

.brief { border: 1px solid var(--ink); padding: clamp(1.25rem, 3.5vw, 2.5rem); display: grid; gap: 1.25rem; }
.form-note { color: var(--mute); font-size: .95rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .98rem; }
.req, .opt { font-weight: 400; color: var(--mute); font-size: .88rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink); border-radius: 0; padding: .8rem .9rem; min-height: 3rem;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.field [aria-invalid="true"] { border-width: 2px; background: var(--wash); }
.hint { font-size: .88rem; color: var(--mute); }
.error { font-size: .93rem; font-weight: 600; color: var(--ink); border-left: 3px solid var(--ink); padding-left: .6rem; }
.brief .btn { justify-self: start; }
.form-status:empty { display: none; }
.form-status { border: 1px solid var(--ink); padding: 1rem 1.1rem; display: grid; gap: .75rem; background: var(--wash); }
.form-status p { margin: 0; }
.form-status .btn { padding: .65rem 1rem; min-height: 2.5rem; }
.form-status textarea { width: 100%; font: inherit; font-size: .92rem; padding: .6rem; border: 1px solid var(--rule); background: var(--paper); min-height: 8rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--ink); padding-block: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; justify-content: space-between; }
.footer-inner p { color: var(--mute); font-size: .95rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-weight: 500; text-underline-offset: .25em; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 24rem) {
  body { font-size: 1rem; }
  .btn { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .brief .btn { justify-self: stretch; }
  .dlg-bar h2 { font-size: 1.25rem; }
}

.work-note { margin-top: 1.5rem; }
