/* ---------- Intro page: resume sheet + passport ---------- */
:root {
  --white: #ffffff;
  --paper: #f2f0ec;
  --sheet: #fdfcfa; /* the resume sheet: near-white paper */
  --soft: #4a4a4a;  /* secondary text on the page */
  --page: #ffffff;  /* the page itself; objects never redefine it */
  --ink: #141414;
  --muted: #8a8a8a;
  --line: rgba(20, 20, 20, 0.12);
  --navy: #1b2340;
  --gold: #c9a65a;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
  --fibers: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .18' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='.07'/%3E%3C/svg%3E");
  --fibers-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .18' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='.035'/%3E%3C/svg%3E");
  --helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hand: "Gochi Hand", "Comic Sans MS", sans-serif;
  --pad: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light; /* light only: no dark mode */
}

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

html, body { height: 100%; }
body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--helvetica);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ---------- Page frame ---------- */
.intro {
  position: relative;
  display: grid;
  place-items: center;
  padding: 110px var(--pad) 150px;
}

.brand {
  position: absolute;
  top: var(--pad); left: var(--pad);
  font-family: var(--helvetica);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.04em;
  display: inline-flex;
  align-items: center;
}
/* the logo: Rohit's hand-drawn face beside the name (black ink on transparent) */
.brand__mark { width: 34px; height: 34px; flex: none; margin-right: 8px; }

/* Small, quiet menu top right */
.menu {
  position: absolute;
  top: calc(var(--pad) + 6px); right: var(--pad);
  display: flex;
  gap: 18px;
  font-size: 11px;
  letter-spacing: -0.01em;
}
.menu a { color: var(--muted); transition: color 0.2s; }
.menu a:hover,
.menu .cta,
.menu .is-current { color: var(--ink); }
.menu .cta { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- The desk (everything that overlaps) ---------- */
.desk {
  position: relative;
  width: 440px;
}

/* Resume sheet */
.sheet {
  position: relative;
  background-color: var(--sheet);
  background-image:
    var(--grain-light),
    var(--fibers-light),
    linear-gradient(180deg, transparent 49.6%, rgba(0, 0, 0, 0.04) 50%, rgba(255, 255, 255, 0.6) 50.4%, transparent 51%),
    radial-gradient(ellipse at 90% 100%, rgba(0, 0, 0, 0.03), transparent 60%);
  border: 1px solid var(--line);
  padding: 44px 40px 48px;
  transform: rotate(-1deg);
}
.sheet__head {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 40px;
}
.sheet__head span { text-transform: none; letter-spacing: -0.03em; font-size: 12px; }
.field { width: 46%; margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ink {
  font-family: var(--hand);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  background: linear-gradient(transparent 23px, var(--line) 23px) 0 0 / 100% 24px;
}
.field--story { width: 100%; margin: 120px 0 0; }
.field--story .ink { font-size: 13.5px; min-height: 168px; }
.field--story .more {
  display: inline-block;
  margin-top: 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
}

/* Photo, paper-clipped to the sheet */
.photo {
  position: absolute;
  top: 64px;
  left: 52%;
  width: 210px;
  z-index: 3;
  padding: 8px 8px 30px;
  background: var(--white);
  border: 1px solid var(--line);
  transform: rotate(3deg);
}
.photo__img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  background: #e9e6e1;
  color: var(--muted);
  font-family: var(--hand);
  font-size: 16px;
}
.photo__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo figcaption {
  position: absolute;
  left: 10px; bottom: 7px;
  font-family: var(--hand);
  font-size: 13px;
}
.clip {
  position: absolute;
  top: -34px; left: 26px;
  width: 22px; height: 70px;
  z-index: 4;
}

/* Orange card peeking behind the photo */
.card {
  position: absolute;
  top: 40px;
  left: calc(52% + 104px);
  width: 170px;
  aspect-ratio: 85.6 / 54;
  z-index: 2;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  transform: rotate(12deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card__brand { font-weight: 700; font-size: 15px; letter-spacing: -0.04em; }
.card__meta { font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.9; }

/* ---------- Passport ---------- */
.passport {
  position: absolute;
  top: 300px;
  left: 18px;
  width: 200px;
  aspect-ratio: 88 / 125;
  z-index: 10;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  border-radius: 3px 9px 9px 3px;
  color: var(--gold);
  text-align: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--rot, -6deg));
  transition: transform 0.6s var(--ease);
}
.passport::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 8px;
  width: 1px;
  background: rgba(0, 0, 0, 0.4);
}
.passport.is-dragging { cursor: grabbing; transition: none; }
.passport:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.passport__top p,
.passport__bottom p { line-height: 1.35; }
.passport .hi { font-size: 13px; letter-spacing: 0.02em; font-weight: 600; }
.passport .en { font-size: 9px; letter-spacing: 0.16em; font-weight: 700; text-transform: uppercase; }
.passport__emblem { width: 64px; height: 64px; }
.passport__bottom .hi { font-size: 15px; }
.passport__bottom .en { font-size: 11px; letter-spacing: 0.28em; }
.passport__chip { width: 26px; height: 16px; margin: 10px auto 0; display: block; }

/* ---------- Doodle hint ---------- */
.hint {
  position: absolute;
  top: calc(100% + 56px);
  left: 200px;
  width: 250px;
  z-index: 11;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 17px;
  line-height: 1.25;
  transform: rotate(-3deg);
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.hint__text { position: relative; display: inline-block; padding: 14px 22px; }
.hint__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hint__arrow { position: absolute; top: -46px; left: -44px; width: 64px; height: 56px; overflow: visible; }
.hint.is-gone { opacity: 0; }

/* ---------- Load-in ---------- */
.sheet, .photo, .card, .passport, .hint { opacity: 0; }
.is-loaded .sheet,
.is-loaded .photo,
.is-loaded .card,
.is-loaded .passport,
.is-loaded .hint { opacity: 1; transition: opacity 0.8s var(--ease), transform 0.6s var(--ease); }
.is-loaded .photo { transition-delay: 0.15s; }
.is-loaded .card { transition-delay: 0.25s; }
.is-loaded .passport { transition-delay: 0.4s; }
.is-loaded .hint { transition-delay: 0.9s; }
.is-loaded .passport.is-dragging { transition: none; }
.is-loaded .hint.is-gone { opacity: 0; transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Shorter laptop screens: fit the desk above the fold ---------- */
@media (min-width: 641px) and (max-height: 960px) {
  .intro { padding-top: 80px; padding-bottom: 130px; }
  .desk { zoom: 0.84; }
}

/* ---------- Small screens: scale the whole desk down ---------- */
@media (max-width: 640px) {
  .intro { min-height: 0; padding: 150px 16px 130px; place-items: start center; overflow-x: clip; }
  .desk { zoom: 0.7; }
  .card { left: calc(54% + 64px); top: 24px; }
  .menu { flex-direction: column; align-items: flex-end; gap: 6px; top: 22px; right: 16px; }
  .brand { top: 18px; left: 16px; }
}
@media (max-width: 360px) {
  .desk { zoom: 0.64; }
}

html { scroll-behavior: smooth; }
