/* rehanshaik.com: one deliberate theme: warm paper, ink, vermilion. */

:root {
  --paper: #f1ede4;
  --paper-2: #e8e2d5;
  --ink: #16140f;
  --ink-2: #4a463d;
  --ink-3: #7a7466;
  --rule: #cfc7b6;
  --accent: #d1400e;
  --accent-ink: #fff8f1;
  --night: #121a26;

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Hanken Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(20px, 5vw, 64px);
  --max: 1240px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  /* paper grain, inline so it needs no request */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

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

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- top bar ---------- */
.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mark {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  padding: 5px 7px 4px;
  line-height: 1;
}
.top nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.top nav a {
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  color: var(--ink-2);
}
.top nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.hero { padding: clamp(40px, 9vh, 110px) 0 clamp(56px, 9vh, 96px); border-bottom: 1px solid var(--ink); }

.kicker, .index, .section-label, .stack, .shots-note, .swap-label,
.jobs .when, .facts dt, .tally dt, .foot, figcaption {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.kicker { margin: 0 0 18px; color: var(--ink-2); text-wrap: balance; }
.kicker::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: 1px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(60px, 21vw, 212px);
  line-height: .86;
  letter-spacing: -.025em;
  margin: 0 0 clamp(28px, 4vw, 48px);
  margin-left: -.04em;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(30px, 3.9vw, 52px);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0;
  max-width: 16ch;
}
.lede em { font-style: italic; color: var(--accent); }

.facts { margin: 0; border-top: 1px solid var(--rule); }
.facts div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.facts dt { color: var(--ink-3); padding-top: 3px; }
.facts dd { margin: 0; font-size: 15.5px; line-height: 1.45; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(32px, 4vw, 48px); }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1.5px solid var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .18s, color .18s, transform .18s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-quiet { border-color: transparent; text-decoration: underline; text-underline-offset: 4px; padding: 0 12px; }
.btn-quiet:hover { background: transparent; color: var(--accent); }

/* ---------- section labels ---------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  margin: 0 0 clamp(28px, 4vw, 44px);
  color: var(--ink-2);
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ---------- projects ---------- */
.work { padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }

.project { padding-bottom: clamp(48px, 7vw, 88px); margin-bottom: clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--rule); }

.index { margin: 0 0 10px; color: var(--accent); font-weight: 500; }
.index span { color: var(--ink-3); margin-left: 10px; }

.project h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 6vw, 84px);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}
.pitch { font-size: clamp(18px, 1.7vw, 21px); font-weight: 500; margin: 0; max-width: 30ch; line-height: 1.35; }

.project-body > p:first-child { margin-top: 0; }
.project-body p { color: var(--ink-2); max-width: 60ch; }

.points { list-style: none; margin: 18px 0; padding: 0; }
.points li {
  position: relative;
  padding: 10px 0 10px 26px;
  border-top: 1px solid var(--rule);
  font-size: 16px;
}
.points li:last-child { border-bottom: 1px solid var(--rule); }
.points li::before {
  content: "";
  position: absolute; left: 2px; top: 20px;
  width: 10px; height: 1.5px;
  background: var(--accent);
}

.stack { color: var(--ink-3); margin: 18px 0 0; text-transform: none; letter-spacing: .01em; line-height: 1.7; }

.link-out {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}
.link-out span { color: var(--accent); font-family: var(--sans); font-size: 22px; }
.link-out:hover { color: var(--accent); }

/* lead project: text left, screens break out wide */
.project-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  column-gap: clamp(32px, 6vw, 96px);
  row-gap: clamp(32px, 5vw, 56px);
}
.project-lead .project-head { grid-column: 1; }
.project-lead .project-body { grid-column: 2; grid-row: 1; }
.project-lead .shots { grid-column: 1 / -1; }

.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 1.6vw, 20px);
  background: var(--night);
  padding: clamp(12px, 2vw, 28px);
  margin: 0 calc(var(--pad) * -.5);
  box-shadow: 0 30px 60px -30px rgba(22, 20, 15, .55);
}
.shot { margin: 0; }
.shot-main { grid-column: 1 / -1; }
.shot img { border: 1px solid #2a3647; }
.shot figcaption { color: #9aa8bb; margin-top: 8px; font-size: 11.5px; }
.shots-note { grid-column: 1 / -1; color: #6f7d91; margin: 0; font-size: 11px; text-align: right; }

/* split projects */
.project-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  column-gap: clamp(32px, 6vw, 96px);
  row-gap: 24px;
}

.swap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr);
  align-items: stretch;
  gap: 14px;
  margin-top: 24px;
}
.swap-col { padding: 16px 18px; border: 1.5px solid var(--ink); }
.swap-col p, .swap-col ul { margin: 0; }
.swap-label { color: var(--ink-3); margin-bottom: 8px !important; }
.swap-before { background: var(--paper-2); }
.swap-before p:last-child { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; }
.swap-after { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.swap-after .swap-label { color: #a59f90; }
.swap-after ul { list-style: none; padding: 0; }
.swap-after li { padding: 3px 0; }
.swap-after li::before { content: "✓"; color: #ff7a45; margin-right: 10px; font-weight: 600; }
.swap-arrow { align-self: center; font-size: 26px; color: var(--accent); }

.tally {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.tally div { padding: 14px 14px 14px 0; }
.tally div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.tally dt { color: var(--ink-3); font-size: 11.5px; }
.tally dd { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(34px, 4vw, 52px); line-height: 1; }

/* also shipped */
.more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: clamp(32px, 6vw, 96px); }
.more-title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.6vw, 44px); margin: 0 0 16px; line-height: 1; }
.more ul { list-style: none; margin: 0; padding: 0; }
.more li { padding: 14px 0; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 16px; }
.more li:last-child { border-bottom: 1px solid var(--rule); }
.more strong { color: var(--ink); font-weight: 600; }

/* ---------- history ---------- */
.history { padding: clamp(40px, 6vw, 72px) 0; }
.jobs { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.jobs li {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 8px 24px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.jobs .when { color: var(--ink-3); font-size: 12px; }
.jobs .role { font-weight: 600; }
.jobs .org { color: var(--ink-2); }

/* ---------- contact ---------- */
.contact {
  /* full-bleed band; text stays on the page grid */
  margin: clamp(32px, 5vw, 56px) calc(50% - 50vw) 0;
  padding: clamp(56px, 9vw, 120px) max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  background: var(--accent);
  color: var(--accent-ink);
}
.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.5vw, 96px);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 28px;
  max-width: 14ch;
}
.contact-mail {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 5.2vw, 64px);
  line-height: 1.1;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--ink); border-color: var(--ink); }
.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 36px 0 0; padding: 0; }
.contact-links a { font-family: var(--mono); font-size: 14px; text-underline-offset: 4px; }
.contact-links a:hover { color: var(--ink); }
.contact :focus-visible { outline-color: var(--ink); }

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad) 32px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 11.5px;
}

/* ---------- load motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero .reveal:nth-child(1) { animation-delay: .05s; }
  .hero .reveal:nth-child(2) { animation-delay: .15s; }
  .hero .reveal:nth-child(3) { animation-delay: .3s; }
  .hero .reveal:nth-child(4) { animation-delay: .45s; }
  .hero-grid .reveal:nth-child(2) { animation-delay: .4s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  .shot img { transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
  .shot:hover img { transform: translateY(-3px); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .project-lead,
  .project-split,
  .more { grid-template-columns: minmax(0, 1fr); }
  .project-lead .project-body,
  .project-lead .shots { grid-column: 1; grid-row: auto; }
  .lede { max-width: 18ch; }
  .jobs li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .jobs .when { order: -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .top { padding-top: 18px; padding-bottom: 18px; }
  .shots { grid-template-columns: minmax(0, 1fr); margin: 0 calc(var(--pad) * -1); }
  .swap { grid-template-columns: minmax(0, 1fr); }
  .swap-arrow { transform: rotate(90deg); justify-self: start; margin-left: 16px; }
  .facts div { grid-template-columns: 80px minmax(0, 1fr); }
  .btn { padding: 0 16px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .actions .btn { justify-content: center; }
  .actions .btn-quiet { min-height: 40px; }
  .tally dd { font-size: 30px; }
  .foot { flex-direction: column; gap: 4px; }
}
