/* Nishant Khatri portfolio. Plain CSS, no external fonts or services. */

:root {
  --paper: #efeee9;
  --ink: #111111;
  --muted: #5b5a55;
  --line: #cfcdc5;
  --accent: #c8102e;
  --max: 1200px;
  --pad: clamp(18px, 4vw, 48px);
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  /* subtle grain, drawn in CSS so it costs no download */
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, iframe { display: block; max-width: 100%; }

a { color: inherit; }

/* ---------- top bar (like the reference's sticky order bar) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 15px;
}
.topbar__cta {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 16px;
  border-radius: 999px;
}

/* ---------- shared ---------- */
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
h1, h2, h3 { margin: 0; line-height: 1.02; text-transform: uppercase; letter-spacing: -0.01em; }
h2 { font-size: clamp(34px, 6vw, 64px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 800; }
p { margin: 0; }

/* 16:9 or 9:16 frame that holds a Drive preview */
.frame { position: relative; width: 100%; background: #000; overflow: hidden; }
.frame--169 { aspect-ratio: 16 / 9; }
.frame--916 { aspect-ratio: 4 / 5; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--pad) clamp(40px, 7vw, 88px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(48px, 10vw, 128px);
  font-weight: 900;
}
.lede {
  margin-top: 22px;
  max-width: 34em;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--ink);
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--line { background: transparent; color: var(--ink); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.hero__reel { margin: 0; }
.hero__reel figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- work ---------- */
.work, .skills, .about { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 8vw, 110px) var(--pad); }
.section-head { margin-bottom: clamp(24px, 4vw, 44px); }

.work__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
}
.card .card__meta { margin-top: 16px; }
.card h3 { margin-top: 10px; }
.card p { margin-top: 8px; color: var(--muted); max-width: 40em; }
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}

/* ---------- about ---------- */
.about { border-top: 1px solid var(--line); }
.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 56px);
}
.about h2 { font-size: clamp(30px, 4.6vw, 52px); }
.about__body p { color: var(--muted); max-width: 36em; }
.about__body p + p { margin-top: 16px; }
.facts { margin: 28px 0 0; display: grid; gap: 14px; }
.facts div { border-top: 1px solid var(--line); padding-top: 12px; }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 600; }

/* ---------- skills ---------- */
.skills { border-top: 1px solid var(--line); }
.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 2px solid var(--ink);
}
.skill-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.skill-list span { font-weight: 800; color: var(--accent); font-size: 15px; padding-top: 4px; }
.skill-list p { grid-column: 2; color: var(--muted); }
.tools { margin-top: 28px; color: var(--muted); }

/* ---------- contact ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  text-align: left;
  padding: clamp(64px, 10vw, 130px) var(--pad);
}
.contact .eyebrow { color: #a9a79f; }
.contact h2 { font-size: clamp(38px, 7vw, 88px); font-weight: 900; margin-bottom: 36px; }
.contact__mail {
  display: inline-block;
  font-size: clamp(20px, 3.4vw, 36px);
  font-weight: 700;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 4px;
  word-break: break-all;
}
.contact__mail:hover { color: var(--accent); }

/* ---------- footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px var(--pad);
  font-size: 14px;
  color: var(--muted);
  background: var(--ink);
  border-top: 1px solid #2a2a2a;
}
.footer a { color: var(--paper); }

/* ---------- motion: gentle reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- wider screens ---------- */
@media (min-width: 760px) {
  .hero { grid-template-columns: 1fr 1.1fr; }
  .work__grid { grid-template-columns: 1fr 1fr; }
  .about__inner { grid-template-columns: 1fr 1.2fr; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .facts div { border-top: 1px solid var(--line); }
  .skill-list { grid-template-columns: 1fr 1fr; }
  .skill-list li:nth-child(odd) { padding-right: 24px; }
}

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
