/* ==========================================================================
   Jay Singhvi — portfolio
   Design tokens + component styles. Replaces the 336 inline style attributes
   carried over from the previous single-file build.
   ========================================================================== */

/* --- Fonts. Latin + latin-ext subsets only; the previous build shipped 15
       slices including Cyrillic, Greek and Vietnamese that this site never
       renders. Same woff2 serves several weights — these are variable fonts,
       hence the `font-weight` ranges. --------------------------------------- */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/public-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/public-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens ------------------------------------------------------------- */

:root {
  --paper: #fafaf8;
  --ink: #232326;
  --teal: #0f5c57;
  --mint: #5fd3c4;

  /* Ink on paper */
  --ink-88: rgba(35, 35, 38, 0.88);
  --ink-82: rgba(35, 35, 38, 0.82);
  --ink-78: rgba(35, 35, 38, 0.78);
  --ink-62: rgba(35, 35, 38, 0.62);
  --ink-55: rgba(35, 35, 38, 0.55);
  --rule: rgba(35, 35, 38, 0.13);

  /* Paper on ink */
  --paper-76: rgba(250, 250, 248, 0.76);
  --paper-58: rgba(250, 250, 248, 0.58);
  --paper-55: rgba(250, 250, 248, 0.55);
  --paper-50: rgba(250, 250, 248, 0.5);
  --paper-45: rgba(250, 250, 248, 0.45);
  --paper-40: rgba(250, 250, 248, 0.4);
  --paper-30: rgba(250, 250, 248, 0.3);
  --paper-16: rgba(250, 250, 248, 0.16);

  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Public Sans', ui-sans-serif, system-ui, sans-serif;

  --shell: 1280px;
  --gutter: 40px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* --- Base --------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* Was 360px in the previous build, which forced horizontal scrolling on
     320px-wide devices. The media queries below carry the layout down to 320. */
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--teal);
}

::selection {
  background: var(--teal);
  color: var(--paper);
}

/* The previous build set `outline:none` on every form field and replaced it
   with nothing, leaving keyboard users no visible focus point. */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.band :focus-visible,
.band-teal :focus-visible {
  outline-color: var(--mint);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.skip-link:focus {
  left: 0;
  color: var(--paper);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes wipe {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* --- Layout primitives -------------------------------------------------- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 96px var(--gutter) 48px;
}

.section-work {
  padding-top: 104px;
}

.section-close {
  padding-bottom: 104px;
}

.band {
  background: var(--ink);
  color: var(--paper);
}

.band-teal {
  background: var(--teal);
  color: var(--paper);
}

.rule {
  height: 1px;
  width: 100%;
  background: var(--ink);
  margin: 44px 0 0;
}

.rule-tight {
  margin: 28px 0 0;
}

.rule-work {
  margin: 48px 0 0;
}

.rule-grid {
  margin: 44px 0 52px;
}

/* --- Type --------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.eyebrow-dark {
  margin: 0 0 30px;
  color: rgba(250, 250, 248, 0.6);
}

.eyebrow a {
  color: var(--teal);
}

.eyebrow a .lbl {
  border-bottom: 1px solid rgba(15, 92, 87, 0.45);
}

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 7.6vw, 116px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-wrap: balance;
  animation: rise 0.7s var(--ease) 0.06s both;
}

.h2-xl {
  margin: 0;
  max-width: 24ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1;
  letter-spacing: -0.022em;
}

.h2-xl-tight {
  max-width: 22ch;
}

.h2-xl-wide {
  max-width: none;
}

.h2-principle {
  margin: 0;
  max-width: 30ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.9vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2-md {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.h2-contact {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--paper);
}

em {
  font-style: italic;
}

.h2-contact em {
  color: var(--mint);
}

.lede {
  margin: 0;
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-78);
  animation: rise 0.7s var(--ease) 0.16s both;
}

.intro {
  margin: 28px 0 0;
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-78);
}

.intro-dark {
  margin: 34px 0 0;
  max-width: 56ch;
  color: var(--paper-76);
}

.intro-contact {
  margin: 26px 0 0;
  max-width: 46ch;
  color: var(--paper-76);
}

.note {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* --- Buttons and link affordances --------------------------------------- */

.btn {
  display: inline-block;
  padding: 15px 28px;
  border: none;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
}

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

.btn-nav {
  padding: 11px 20px;
  font-size: 11px;
  background: var(--teal);
}

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

.btn-send {
  width: fit-content;
  font-size: 11px;
  background: var(--teal);
}

.btn-send:hover {
  background: var(--mint);
  color: var(--ink);
}

/* The underline sits on .lbl, not the anchor, so it stops at the label and
   does not run underneath a trailing PDF badge or arrow glyph. */
.link-ul {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.link-ul .lbl {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

.link-ul:hover {
  color: var(--teal);
}

.link-ul:hover .lbl {
  border-bottom-color: var(--teal);
}

.link-ul-sm {
  font-size: 11px;
}

.link-ul-dark {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper);
}

.link-ul-dark .lbl {
  border-bottom: 1px solid var(--paper-40);
  padding-bottom: 4px;
}

.link-ul-dark:hover,
.link-ul-dark:hover .arrow {
  color: var(--mint);
}

.link-ul-dark:hover .lbl {
  border-bottom-color: var(--mint);
}

.badge {
  display: inline-block;
  margin-left: 0.6em;
  padding: 4px 7px;
  background: var(--teal);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
}

.badge-mint {
  background: var(--mint);
  color: var(--ink);
}

.arrow {
  display: inline-block;
  margin-left: 0.4em;
  vertical-align: -0.02em;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--teal);
}

.arrow-mint {
  color: var(--mint);
}

.tag {
  display: inline-block;
  margin-left: 0.42em;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
}

/* --- Nav ---------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 250, 248, 0.94);
  -webkit-backdrop-filter: blur(8px); /* Safari / iOS still need the prefix */
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__brand {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-left: 16px;
}

.nav__link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-62);
}

.nav__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.hero {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 96px var(--gutter) 104px;
  position: relative;
}

.hero__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  align-items: flex-end;
}

.hero__text {
  flex: 1 1 600px;
  min-width: 320px;
}

.hero__eyebrow {
  margin: 0 0 26px;
  animation: rise 0.6s var(--ease) both;
}

.hero__wipe {
  height: 1px;
  background: var(--ink);
  margin: 44px 0 30px;
  transform-origin: left;
  animation: wipe 0.8s var(--ease) 0.3s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 38px;
  align-items: center;
  animation: rise 0.7s var(--ease) 0.24s both;
}

.hero__portrait {
  flex: 0 1 288px;
  min-width: 220px;
  animation: rise 0.8s var(--ease) 0.34s both;
}

.portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.portrait::before {
  content: '';
  position: absolute;
  left: -18px;
  bottom: -18px;
  width: 100%;
  height: 100%;
  background: var(--teal);
}

.portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__caption {
  margin: 32px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: var(--ink-62);
}

/* --- Stat strip --------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  column-gap: 44px;
}

.stat {
  padding: 56px 0;
}

.stat__value {
  font-family: var(--serif);
  font-size: 62px;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.stat__label {
  margin-top: 16px;
  max-width: 22ch;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.08em;
  color: var(--paper-58);
}

.stat__label-wide {
  max-width: 24ch;
}

/* --- Principle ---------------------------------------------------------- */

.principle {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 116px var(--gutter) 124px;
}

/* --- Case studies (native <details>, no JS) ----------------------------- */

.case {
  border-bottom: 1px solid var(--rule);
  padding: 40px 0;
}

.case__head {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  align-items: flex-start;
  cursor: pointer;
  list-style: none;
}

.case__head::-webkit-details-marker {
  display: none;
}

.case__num {
  flex: 0 0 78px;
  font-family: var(--mono);
  font-size: 52px;
  font-weight: 400;
  line-height: 0.82;
  color: var(--teal);
}

.case__body {
  flex: 1 1 400px;
  min-width: 280px;
}

.case__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.06;
  letter-spacing: -0.018em;
}

.case__meta {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.07em;
  color: var(--ink-55);
}

.case__blurb {
  margin: 16px 0 0;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-82);
}

.case__stat {
  flex: 0 1 190px;
  min-width: 160px;
}

.case__stat-value {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

/* Longer values ("A/B tested", "Auditable") stepped down in the original. */
.case__stat-value-sm {
  font-size: 40px;
  line-height: 0.95;
}

.case__stat-label {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--ink-55);
}

.case__toggle {
  flex: 1 0 100%;
  margin-top: 26px;
  padding-left: 112px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
}

.case__toggle span {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

.case__head:hover .case__toggle span {
  border-bottom-color: var(--teal);
  color: var(--teal);
}

.case[open] .case__toggle-open,
.case__toggle-close {
  display: none;
}

.case[open] .case__toggle-close {
  display: inline;
}

.case__detail {
  margin-top: 26px;
  padding-left: 112px;
}

.case__points {
  margin: 0;
  padding: 0 0 0 26px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 1px solid var(--teal);
  animation: rise 0.34s var(--ease) both;
}

.case__points li {
  max-width: 80ch;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-88);
}

/* Research entry: the repo link sits on the title line rather than orphaned
   below the panel. It is inside the <summary>, so js/site.js stops its click
   from also collapsing the panel. `baseline` keeps the 11px mono link optically
   aligned with the 36px serif title instead of centred against it. */
.case__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
}

/* --- Research ----------------------------------------------------------- */

.research-note {
  padding: 40px 0 0;
}

.research-note p {
  margin: 0 0 18px;
  max-width: 66ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-82);
}

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

.role {
  border-bottom: 1px solid var(--rule);
  padding: 40px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}

.role__when {
  flex: 0 1 250px;
  min-width: 200px;
}

.role__dates {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.role__org {
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.5;
}

.role__org span {
  color: var(--ink-55);
}

.role__what {
  flex: 1 1 480px;
  min-width: 300px;
}

.role__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.role__points {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.role__points li {
  max-width: 76ch;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-88);
}

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

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 52px 44px;
}

.skill__name {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.skill__list {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-88);
}

/* --- Education and publications ----------------------------------------- */

.two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
}

.two-col > * {
  flex: 1 1 420px;
  min-width: 300px;
}

.entry {
  border-bottom: 1px solid var(--rule);
  padding: 26px 0;
}

.entry__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.entry__meta {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--ink-55);
}

.pub__venue {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.pub__title {
  margin: 0;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.55;
}

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

.contact__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  align-items: flex-start;
  padding: 100px 0;
}

.contact__intro {
  flex: 1 1 420px;
  min-width: 300px;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 36px;
}

.contact__email {
  width: fit-content;
  font-family: var(--serif);
  font-size: 27px;
  color: var(--paper);
}

.contact__email .lbl {
  border-bottom: 1px solid var(--paper-40);
}

.contact__email:hover,
.contact__email:hover .tag {
  color: var(--mint);
}

.contact__email:hover .lbl {
  border-bottom-color: var(--mint);
}

.contact__phone {
  width: fit-content;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--paper-76);
}

.contact__phone .lbl {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--paper-30);
}

.contact__phone:hover,
.contact__phone:hover .tag {
  color: var(--mint);
}

.contact__phone:hover .lbl {
  border-bottom-color: var(--mint);
}

.contact__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 14px;
}

.form {
  flex: 1 1 380px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-55);
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 2px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--paper-40);
  font-family: var(--sans);
  font-size: 17px;
  color: var(--paper);
}

.field textarea {
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--paper-40);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--mint);
}

.form__note {
  margin: 0;
  max-width: 46ch;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.05em;
  color: var(--paper-50);
}

/* --- Footer ------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--paper-16);
}

.footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 52px var(--gutter) 40px;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-end;
  justify-content: space-between;
}

.footer__name {
  font-family: var(--serif);
  font-size: 46px;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.footer__blurb {
  margin: 0;
  max-width: 36ch;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.85;
  letter-spacing: 0.07em;
  color: var(--paper-55);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--paper-16);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--paper-45);
}

/* --- Responsive. The previous build shipped no media queries at all and
       relied entirely on flex-wrap, which left the 40px gutters and the
       112px case-study indent intact on a phone. ------------------------- */

@media (max-width: 900px) {
  .case__toggle,
  .case__detail {
    padding-left: 0;
  }

  .case__num {
    flex: 0 0 auto;
    font-size: 40px;
  }

  .case__head {
    gap: 20px;
  }

  .hero__grid,
  .two-col,
  .contact__grid {
    gap: 48px;
  }

  .hero {
    padding-bottom: 72px;
  }

  .contact__grid {
    padding: 72px 0;
  }

  .principle {
    padding: 80px var(--gutter) 88px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 22px;
  }

  /* These min-widths shape the desktop flex layout, but below 640px they can
     exceed the available content width and force the whole page to scroll
     sideways. Releasing them lets flex-shrink do its job. */
  .hero__text,
  .hero__portrait,
  .case__body,
  .case__stat,
  .role__when,
  .role__what,
  .two-col > *,
  .contact__intro,
  .form {
    min-width: 0;
  }

  .nav__inner {
    flex-wrap: wrap;
    gap: 14px 20px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav__links {
    order: 3;
    margin-left: 0;
    gap: 16px;
  }

  .nav__actions {
    gap: 16px;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 32px;
  }

  .section-work {
    padding-top: 72px;
  }

  .hero {
    padding-top: 64px;
  }

  .hero__grid {
    align-items: flex-start;
  }

  .stat {
    padding: 40px 0;
  }

  .stat__value {
    font-size: 52px;
  }

  .case__title {
    font-size: 30px;
  }

  .role__title {
    font-size: 27px;
  }

  .footer__name {
    font-size: 38px;
  }

  .footer__bottom {
    margin-top: 36px;
  }
}

/* Respect a stated preference for less motion — the entrance animations and
   smooth scrolling are decorative. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
}

@media print {
  .nav,
  .form,
  .case__toggle,
  .skip-link {
    display: none;
  }

  .case__detail {
    padding-left: 0;
  }

  body {
    background: #fff;
  }
}
