/* Vivek Rajani: personal site. Palette: off-white, charcoal, one ochre accent. */
:root {
  --bg: #f5f3ee;
  --bg-tint: #ecE9e2;
  --ink: #181818;
  --ink-soft: #4a4a48;
  --ink-mute: #8a8883;
  --line: #d9d5cc;
  --dark: #141414;
  --accent: #a8741a;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
em { font-style: italic; color: var(--accent); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* NAV */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(245,243,238,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { font-family: var(--serif); font-size: 24px; text-decoration: none; letter-spacing: -.01em; }
.nav__menu { display: flex; gap: 36px; }
.nav__menu a { text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: .02em; color: var(--ink-soft); position: relative; padding: 6px 0; }
.nav__menu a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--ink); transition: right .3s var(--ease); }
.nav__menu a:hover { color: var(--ink); }
.nav__menu a:hover::after { right: 0; }
.nav__toggle { display: none; }

/* HERO */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 72px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 22px; }
.hero__name { font-family: var(--serif); font-size: clamp(56px, 8.4vw, 116px); line-height: .95; letter-spacing: -.025em; margin-bottom: 26px; }
.hero__headline { font-family: var(--serif); font-size: clamp(26px, 3vw, 38px); line-height: 1.15; margin: 0 0 22px; color: var(--ink-soft); }
.hero__lead { max-width: 30em; color: var(--ink-soft); margin: 0 0 38px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__photo { margin: 0; position: relative; }
.hero__photo::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  border: 1px solid var(--accent); opacity: .55; z-index: 0;
}
.hero__photo picture { position: relative; z-index: 1; display: block; overflow: hidden; background: var(--bg-tint); aspect-ratio: 4 / 5; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; font-size: 15px; font-weight: 500;
  text-decoration: none; border: 1px solid var(--ink); border-radius: 999px;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: scale(.98); }

/* SECTIONS */
.section { padding: 128px 0; }
.section--tint { background: var(--bg-tint); }
.section--dark { background: var(--dark); color: var(--bg); }
.label { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 40px; }
.label--light { color: #8f8c86; }
h2 { font-family: var(--serif); font-size: clamp(40px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 30px; }

/* ABOUT */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.about__body p { font-size: 20px; line-height: 1.6; color: var(--ink-soft); max-width: 34em; margin: 0 0 18px; }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.card { padding: 36px 28px 40px 0; border-right: 1px solid var(--line); padding-left: 28px; transition: background .3s var(--ease); }
.card:first-child { padding-left: 0; }
.card:last-child { border-right: 0; }
.card__num { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 22px; }
.card h3 { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin: 22px 0 14px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* JOURNEY */
.journey { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.journey__intro p { color: var(--ink-soft); max-width: 28em; }
.steps { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.step { position: relative; padding: 0 0 40px 36px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: -6px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--ink-mute); }
.step--active::before { background: var(--accent); border-color: var(--accent); }
.step__tag { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.step--active .step__tag { color: var(--accent); }
.step h3 { font-family: var(--serif); font-size: 32px; margin: 4px 0 8px; }
.step p { margin: 0; color: var(--ink-soft); }

/* CONNECT */
.connect { text-align: left; }
.connect h2 { font-size: clamp(52px, 8vw, 112px); }
.connect em { color: #d9a647; }
.connect__lead { color: #b9b5ad; font-size: 20px; max-width: 30em; margin: 0 0 52px; }
.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.socials a {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 26px;
  border: 1px solid #3a3a38; border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: 15px; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.socials a:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.socials li.is-hidden { display: none; }

/* FOOTER */
.footer { background: var(--dark); color: #7d7a74; font-size: 14px; border-top: 1px solid #262624; }
.footer__inner { display: flex; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--bg); }

/* REVEAL ANIMATIONS (only when JS + motion allowed) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal--photo { transform: translateY(0) scale(.985); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js .reveal--photo picture { clip-path: inset(8% 0 0 0); transition: clip-path 1.2s var(--ease); }
.js .reveal--photo.is-in picture { clip-path: inset(0 0 0 0); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal--photo, .js .reveal--photo picture { opacity: 1; transform: none; clip-path: none; transition: none; }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 32px 24px 36px 24px; border-bottom: 1px solid var(--line); }
  .card:nth-child(2n) { border-right: 0; }
  .card:nth-child(2n+1) { padding-left: 0; }
  .journey { gap: 56px; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap { padding: 0 22px; }
  .nav { background: rgba(245,243,238,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .nav__inner { height: 64px; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; margin-right: -10px; padding: 10px; background: none; border: 0; cursor: pointer;
  }
  .nav__toggle span { display: block; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__menu {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 22px 18px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav__menu.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav__menu a { font-size: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__menu a:last-child { border-bottom: 0; }
  .nav__menu a::after { display: none; }

  .hero { min-height: 0; padding: 96px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero__photo { order: -1; max-width: 420px; width: calc(100% - 18px); }
  .hero__photo::before { inset: 14px -14px -14px 14px; }
  .eyebrow { font-size: 11.5px; letter-spacing: .12em; margin-bottom: 16px; }
  .hero__name { margin-bottom: 18px; }
  .hero__cta .btn { flex: 1 1 auto; }

  .section { padding: 88px 0; }
  .label { margin-bottom: 28px; }
  .about { grid-template-columns: 1fr; gap: 0; }
  .about__body p { font-size: 18px; }
  .journey { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .card, .card:nth-child(2n+1) { padding: 28px 0 30px; border-right: 0; }
  .card h3 { font-size: 28px; margin-top: 14px; }
  .socials { flex-direction: column; }
  .socials a { width: 100%; justify-content: center; }
  .footer__inner { font-size: 13px; }
}
