/* Rishi Mehta — personal site
   Palette: Onyx #0F0F14 / Alabaster #E8E8E8 / Sky Aqua #0CC7ED */

:root {
  --bg: #0F0F14;
  --bg-2: #15151C;
  --text: #E8E8E8;
  --text-2: rgba(232, 232, 232, 0.70);
  --text-3: rgba(232, 232, 232, 0.45);
  --line: rgba(232, 232, 232, 0.12);
  --accent: #0CC7ED;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1360px;
  --wrap-wide: 1720px;
  --pad: 40px;
  --section-y: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.wrap--wide { max-width: var(--wrap-wide); }

h2 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}
h3 { font-size: 20px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
.lead { font-size: 21px; line-height: 1.5; color: var(--text); }
p + p { margin-top: 16px; }
.section p:not(.lead) { color: var(--text-2); }
.meta { color: var(--text-3); font-size: 14px; font-weight: 400; white-space: nowrap; }
h2 .meta { margin-left: 14px; }

/* Header */
.header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  padding: 24px 0;
}
.header__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.name { color: var(--text); font-weight: 600; font-size: 17px; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 80px;
  padding-top: 120px;
  padding-bottom: 72px;
}
.hero__copy { position: relative; z-index: 2; }
.js .hero__copy > * { opacity: 0; transform: translateY(14px); animation: rise .8s cubic-bezier(.22, 1, .36, 1) forwards; }
.js .hero__copy > :nth-child(1) { animation-delay: .05s; }
.js .hero__copy > :nth-child(2) { animation-delay: .18s; }
.js .hero__copy > :nth-child(3) { animation-delay: .30s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Photo mosaic: tall | small small / tall | wide */
.mosaic {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  aspect-ratio: 5 / 3;
}
.mosaic figure {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #1C1C24;
  box-shadow: inset 0 0 0 1px rgba(232, 232, 232, 0.07);
}
.mosaic__tall { grid-row: 1 / 3; }
.mosaic__wide { grid-column: 2 / 4; }
.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
  transition: transform .8s cubic-bezier(.22, 1, .36, 1);
}
.mosaic__tall img { object-position: 50% 50%; }
.mosaic figure:nth-child(2) img { object-position: 50% 35%; }
.mosaic figure:nth-child(3) img { object-position: 50% 35%; }
.mosaic__wide img { object-position: 50% 42%; }
.mosaic figure:hover img { transform: scale(1.04); }
/* fade up on load, staggered */
.js .mosaic figure { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.22, 1, .36, 1) forwards; }
.js .mosaic figure:nth-child(1) { animation-delay: .20s; }
.js .mosaic figure:nth-child(2) { animation-delay: .32s; }
.js .mosaic figure:nth-child(3) { animation-delay: .44s; }
.js .mosaic figure:nth-child(4) { animation-delay: .56s; }

h1 {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero__sub { font-size: clamp(18px, 1.6vw, 22px); color: var(--text-2); max-width: 60ch; }
.hero__sub a { color: var(--text); }
.hero__cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--ghost { border-color: rgba(232, 232, 232, 0.3); color: var(--text); }

/* Sections */
.section { padding: var(--section-y) 0 0; }

/* Story bullets */
.section--bullets { padding-top: 72px; }
.creds { max-width: 760px; margin-bottom: 20px; font-size: 18px; color: var(--text-2); }
.creds a { color: var(--text); border-bottom: 1px solid rgba(232,232,232,.3); }
.creds a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.bullets { max-width: 760px; list-style: disc; padding-left: 28px; }
.bullets li {
  margin-bottom: 14px;
  font-size: 18px;
  padding-left: 6px;
}
.bullets li::marker { color: var(--accent); font-size: 1.1em; }
.bullets li:last-child { margin-bottom: 0; }
.bullets a { color: var(--text); border-bottom: 1px solid rgba(232,232,232,.3); }
.bullets a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* Reveal (JS adds .js to <html>; without JS everything is visible) */
.js .bullets li { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.js .bullets li.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .bullets li { opacity: 1; transform: none; transition: none; }
  .js .hero__copy > *, .js .mosaic figure { animation: none; opacity: 1; transform: none; }
  .mosaic img { transition: none; }
}

/* Press */
.press li a {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.press li:last-child a { border-bottom: 1px solid var(--line); }
.press li a:hover { text-decoration: none; }
.press li a:hover .press__title { text-decoration: underline; }
.press__outlet { color: var(--text-3); font-size: 14px; }

/* Contact */
.section--contact { padding-bottom: var(--section-y); }
.section--contact .lead { max-width: 48ch; margin-bottom: 28px; }
.email {
  display: inline-block;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  word-break: break-all;
}
.email:hover { color: var(--accent); text-decoration: none; }
.contact__links { margin-top: 24px; color: var(--text-3); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--text-3); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; }

/* Responsive */
@media (max-width: 960px) {
  :root { --section-y: 72px; --pad: 24px; }
  .hero { min-height: 0; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding-top: 112px; }
  /* simple 2x2 of squares on small screens */
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: auto; aspect-ratio: auto; gap: 10px; }
  .mosaic figure { aspect-ratio: 1 / 1; border-radius: 12px; }
  .mosaic__tall { grid-row: auto; }
  .mosaic__wide { grid-column: auto; }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .hero__inner { padding-bottom: 48px; }
  h2 { font-size: 28px; }
  .press li a { grid-template-columns: 1fr; gap: 4px; }
  .footer__inner { flex-direction: column; }
  h2 .meta { display: block; margin: 4px 0 0; }
}
