/* aturmehta.com
   Hand-written. No framework, no build step, no external requests.
   Dials: variance 5, motion 3, density 3. Restraint is the brief. */

:root {
  color-scheme: light dark;

  /* Warm monochrome. One accent, used for links and focus only. */
  --canvas: #fbfaf8;
  --surface: #ffffff;
  --line: #e6e3dd;
  --line-soft: #efede8;
  --ink: #17150f;
  --ink-soft: #55514a;
  --ink-muted: #86807a;
  --accent: #8a5a12;
  --accent-hover: #6d4709;

  --measure: 63ch;
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --rhythm: clamp(3.5rem, 9vw, 6rem);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #12110f;
    --surface: #171613;
    --line: #2b2924;
    --line-soft: #221f1b;
    --ink: #f2efe9;
    --ink-soft: #b6b1a8;
    --ink-muted: #8b857c;
    --accent: #d9a441;
    --accent-hover: #eab95e;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- shell ---------- */

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--canvas);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  z-index: 10;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
}

/* ---------- typography ---------- */

h1,
h2,
h3 {
  font-weight: 620;
  letter-spacing: -0.021em;
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  letter-spacing: -0.032em;
}

h2 {
  font-size: 0.75rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.6rem;
}

h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1.15rem;
  max-width: var(--measure);
  color: var(--ink-soft);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

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

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

strong {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(3.5rem, 9vw, 5.5rem) 0 0;
}

.hero-head {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.portrait {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--line-soft);
  border: 1px solid var(--line);
}

.hero .standfirst {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 0;
}

.hero .standfirst a {
  color: var(--ink);
}

/* ---------- sections ---------- */

section {
  padding: var(--rhythm) 0;
  border-top: 1px solid var(--line-soft);
}

section:first-of-type {
  border-top: 0;
  padding-top: clamp(2.75rem, 7vw, 4rem);
}

/* ---------- entry list (work, projects) ---------- */

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.25rem;
}

.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.entry-head h3 {
  margin: 0;
}

.meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.entry p {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

.role {
  color: var(--ink);
  font-weight: 550;
}

/* ---------- press ---------- */

.press {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.press li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
}

.press .outlet {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 0.2rem;
}

.press .headline {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

@media (max-width: 34rem) {
  .press li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ---------- elsewhere ---------- */

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

.elsewhere a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--surface);
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.elsewhere a:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.elsewhere a:active {
  transform: scale(0.98);
}

/* ---------- footer ---------- */

footer {
  padding: var(--rhythm) 0 clamp(3rem, 7vw, 4.5rem);
  border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

footer p {
  font-size: inherit;
  color: inherit;
  max-width: 58ch;
}

footer a {
  color: var(--ink-soft);
}

.colophon {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* ---------- press kit page ---------- */

.kit {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(1.25rem, 4vw, 1.75rem);
  margin-bottom: 1.25rem;
}

.kit:last-child {
  margin-bottom: 0;
}

.kit-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 0.85rem;
}

.kit p {
  max-width: none;
  color: var(--ink);
  font-size: 0.9375rem;
}

.credit-line {
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  margin: 0;
  max-width: none;
  overflow-wrap: break-word;
}

.backlink {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  margin-bottom: 2.5rem;
}

.backlink:hover {
  color: var(--ink);
}

.headshot-grab {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.headshot-grab p {
  flex: 1 1 16rem;
  margin: 0;
}

.headshot-grab img {
  width: 104px;
  height: 104px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* ---------- motion: one gesture, gated ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

/* Content must never depend on JS to become visible. */
.no-js .reveal,
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

@media print {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
