/* ————————————————————————————————————————
   Nimitt Jain — personal site v2
   System: image-led dark editorial. Ivory on
   near-black, amber accent, Fraunces display
   + Archivo body. Full-bleed surf hero,
   magazine moments grid.
   ———————————————————————————————————————— */

:root {
  --bg: #0a0908;
  --bg-soft: #131110;
  --ink: #ece6dc;
  --ink-dim: #97917f;
  --line: #262320;
  --accent: #d9a441;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", Helvetica, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Progress bar */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 100; background: transparent;
}
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem clamp(1.2rem, 4vw, 3.5rem);
  mix-blend-mode: difference;
}
.nav-name {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600; letter-spacing: 0.01em;
}
.nav-links { display: flex; gap: 1.8rem; font-size: 0.85rem; }
.nav-links a {
  text-transform: uppercase; letter-spacing: 0.14em;
  opacity: 0.75; transition: opacity 0.25s;
}
.nav-links a:hover { opacity: 1; }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 6rem clamp(1.2rem, 4vw, 3.5rem) 5.5rem;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%;
  filter: saturate(0.92) contrast(1.02);
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,9,8,0.55) 0%, rgba(10,9,8,0.05) 30%, rgba(10,9,8,0.12) 55%, rgba(10,9,8,0.82) 100%),
    linear-gradient(100deg, rgba(10,9,8,0.5) 0%, rgba(10,9,8,0) 45%);
}
.hero-content { max-width: 1280px; }
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.78rem; color: var(--ink); opacity: 0.85; margin-bottom: 1.2rem;
}
.hero-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.6rem, 13vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(10,9,8,0.45);
}
.hero-name .line { display: block; overflow: hidden; }
.hero-name .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: riseUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-name .line + .line > span { animation-delay: 0.12s; }
.accent-dot { color: var(--accent); font-style: normal; }

@keyframes riseUp { to { transform: translateY(0); } }

.hero-sub {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 30em; color: var(--ink);
  text-shadow: 0 1px 24px rgba(10,9,8,0.6);
}
.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; }
.btn {
  display: inline-block; padding: 0.85rem 1.7rem;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em;
  border-radius: 999px; transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); }
.btn-ghost { border: 1px solid rgba(236,230,220,0.55); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-credit {
  position: absolute; right: clamp(1.2rem, 4vw, 3.5rem); bottom: 1.6rem;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); opacity: 0.55;
}

.scroll-cue {
  position: absolute; bottom: 1.4rem; left: 50%;
  width: 1px; height: 48px; overflow: hidden;
}
.scroll-cue span {
  display: block; width: 1px; height: 100%;
  background: rgba(236,230,220,0.7);
  animation: cueDrop 1.8s ease-in-out infinite;
}
@keyframes cueDrop {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* Marquee */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  padding: 0.9rem 0;
}
.marquee-track { display: inline-flex; animation: slide 28s linear infinite; }
.marquee-track span {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: 1.1rem; color: var(--ink-dim); padding-right: 1rem;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.section {
  padding: clamp(5rem, 12vh, 9rem) clamp(1.2rem, 4vw, 3.5rem);
  max-width: 1280px; margin: 0 auto;
}
.section-head {
  display: flex; align-items: baseline; gap: 1.2rem;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.section-num { font-size: 0.8rem; color: var(--accent); letter-spacing: 0.15em; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -0.01em;
}
.section-lede {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--ink-dim);
  margin: -1.5rem 0 3rem;
}

/* Work list */
.work-list { list-style: none; border-top: 1px solid var(--line); }
.work-item { border-bottom: 1px solid var(--line); }
.work-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  align-items: baseline; gap: 1.5rem;
  padding: 1.6rem 0.4rem;
  cursor: pointer;
  transition: padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-row:hover, .work-item.open .work-row { padding-left: 1.4rem; }
.work-year { font-size: 0.85rem; color: var(--ink-dim); }
.work-name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.1;
  transition: color 0.3s;
}
.work-row:hover .work-name, .work-item.open .work-name { color: var(--accent); }
.work-role {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.work-detail {
  max-height: 0; overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-item.open .work-detail { max-height: 220px; }
.work-detail p {
  padding: 0 0.4rem 1.8rem; max-width: 46em;
  color: var(--ink-dim); font-size: 1rem;
}

/* Moments grid */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
}
.moment { display: flex; flex-direction: column; }
.moment-img {
  overflow: hidden; border-radius: 4px; background: var(--bg-soft);
}
.moment-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s ease;
  filter: saturate(0.9);
}
.moment:hover .moment-img img { transform: scale(1.04); filter: saturate(1); }
.moment figcaption { padding: 1.1rem 0.2rem 0; }
.moment-tag {
  display: block;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent); margin-bottom: 0.5rem;
}
.moment h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.2;
  margin-bottom: 0.55rem;
}
.moment p { font-size: 0.95rem; color: var(--ink-dim); max-width: 38em; }

/* editorial placement: alternating spans + offsets */
.m-a { grid-column: 1 / span 7; }
.m-a .moment-img { aspect-ratio: 4 / 4.6; }
.m-b { grid-column: 8 / span 5; margin-top: clamp(2rem, 8vh, 6rem); }
.m-b .moment-img { aspect-ratio: 4 / 5.4; }
.m-c { grid-column: 1 / span 5; margin-top: clamp(1rem, 4vh, 3rem); }
.m-c .moment-img { aspect-ratio: 4 / 4.4; }
.m-d { grid-column: 6 / span 7; margin-top: clamp(2rem, 8vh, 6rem); }
.m-d .moment-img { aspect-ratio: 16 / 11; }
.m-e { grid-column: 4 / span 6; margin-top: clamp(2rem, 6vh, 4rem); }
.m-e .moment-img { aspect-ratio: 4 / 4.8; }

/* Numbers */
.numbers { padding-top: 2rem; padding-bottom: 2rem; }
.numbers-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.num-cell { padding: 2.6rem 1.5rem; border-right: 1px solid var(--line); }
.num-cell:last-child { border-right: none; }
.num {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem); color: var(--ink);
  display: block; line-height: 1;
}
.num-label {
  display: block; margin-top: 0.7rem;
  font-size: 0.82rem; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* About */
.about-grid {
  display: grid; grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about-photo { overflow: hidden; border-radius: 4px; }
.about-photo img {
  width: 100%; height: auto;
  filter: saturate(0.95);
}
.about-text .lede {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.35;
  margin-bottom: 1.6rem;
}
.about-text p + p { margin-top: 1.1rem; color: var(--ink-dim); }
.about-facts { margin-top: 2.2rem; border-top: 1px solid var(--line); }
.fact {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
}
.fact-k {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--accent);
}
.fact-v { font-size: 0.95rem; color: var(--ink); }

/* Contact */
.contact { text-align: center; padding-bottom: 6rem; }
.contact-eyebrow {
  text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.8rem; color: var(--ink-dim); margin-bottom: 2rem;
}
.contact-big {
  display: inline-block;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(3rem, 10vw, 8rem); line-height: 1.02;
  letter-spacing: -0.02em;
  transition: color 0.35s;
}
.contact-big em { font-style: italic; color: var(--accent); }
.contact-big:hover { color: var(--accent); }
.contact-big:hover em { color: var(--ink); }
.contact-links { display: flex; justify-content: center; gap: 2.5rem; margin-top: 3rem; }
.contact-links a {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em;
  border-bottom: 1px solid var(--line); padding-bottom: 0.3rem;
  transition: border-color 0.3s, color 0.3s;
}
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

/* Footer */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem clamp(1.2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
  font-size: 0.8rem; color: var(--ink-dim);
}
.footer a { transition: color 0.3s; }
.footer a:hover { color: var(--accent); }

/* Reveal on scroll */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Mobile */
@media (max-width: 760px) {
  .nav-links { gap: 1.1rem; }
  .nav-links a:nth-child(2) { display: none; }
  .hero { padding-bottom: 4.5rem; }
  .hero-media img { object-position: 62% 35%; }
  .hero-cta { flex-wrap: wrap; }
  .hero-credit { display: none; }
  .scroll-cue { display: none; }
  .work-row { grid-template-columns: 3.4rem 1fr; }
  .work-role { grid-column: 2; font-size: 0.72rem; }
  .moments-grid { display: block; }
  .moment + .moment { margin-top: 3rem; }
  .m-a .moment-img, .m-b .moment-img, .m-c .moment-img,
  .m-d .moment-img, .m-e .moment-img { aspect-ratio: auto; }
  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .num-cell:nth-child(2) { border-right: none; }
  .num-cell:nth-child(1), .num-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-name .line > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
