/* =========================================================
   mukunda gujjar, landing
   monotone · matte black / matte white · manrope · lowercase
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  /* only two colours exist on this page */
  --ink: #23211d;          /* matte black (warm, flat, non-pure) */
  --paper: #f4f2ee;        /* matte white (warm, off-pure) */
  --line: var(--ink);      /* every line is that same matte black */

  --pad: clamp(16px, 4vw, 56px);            /* outermost frame padding */
  --pad-inner: clamp(18px, 2.4vw, 34px);    /* padding inside the frame */
  --gap: clamp(20px, 3vw, 40px);
  --border: 1.5px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* type scale, plain rem */
  --fs-lg:      2.1rem;   /* lead statements, big words */
  --fs-title:   1.2rem;   /* section headings */
  --fs-md:      1.15rem;  /* body / lede */
  --fs-base:    1rem;     /* standard copy */
  --fs-sm:      0.875rem; /* labels, nav */
  --fs-xs:      0.75rem;  /* small labels */
}

.theme-dark {
  --ink: #f2f0ea;
  --paper: #1b1a17;
  --line: var(--ink);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  text-transform: lowercase;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  padding: var(--pad);
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }

.inline-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.inline-link:hover { background: var(--ink); color: var(--paper); }

/* ---------- the book frame ---------- */
.frame {
  border: var(--border) solid var(--ink);
  min-height: calc(100vh - (var(--pad) * 2));
  display: flex;
  flex-direction: column;
  overflow: hidden;   /* keeps marquee tidy inside the frame */
}

/* shared rule between blocks (the "book" seams) */
.topbar,
.status,
.marquee,
.building,
.life,
.about,
.contact { border-bottom: var(--border) solid var(--ink); }

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pad-inner);
  gap: 20px;
}

.topbar__brand { display: flex; align-items: center; gap: 11px; }

.brand__mark {
  width: 15px; height: 15px;
  background: var(--ink);
  flex: none;
  position: relative;
  top: 1px; /* optical centre against lowercase text */
}

.brand__name {
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
}

.topbar__nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }

.nav__link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: var(--border);
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__toggle {
  display: flex; align-items: center; gap: 8px;
  font-family: inherit;
  text-transform: lowercase;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: var(--border) solid var(--ink);
  padding: 7px 13px;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.toggle__label { line-height: 1; }
.toggle__dot {
  width: 9px; height: 9px;
  flex: none;
  background: var(--ink);
  transition: background 0.3s var(--ease);
}
.nav__toggle:hover { background: var(--ink); color: var(--paper); }
.nav__toggle:hover .toggle__dot { background: var(--paper); }

/* ---------- status strip ---------- */
.status {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
}
.status__cell {
  padding: var(--pad-inner);
  display: flex; flex-direction: column; gap: 6px;
  justify-content: center;
  border-left: var(--border) solid var(--ink);
}
.status__cell:first-child { border-left: 0; }
.status__key {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: normal;
  color: var(--ink);
}
.status__val { font-size: var(--fs-md); font-weight: 500; }

/* ---------- hero ---------- */
.hero {
  padding: var(--pad-inner);
  display: flex; flex-direction: column;
  gap: clamp(28px, 4vw, 52px);
  flex: 1;
  justify-content: center;
}

.hero__headline {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: normal;
}
.headline__accent {
  font-weight: 300;
  font-style: italic;
  padding: 0 0.04em;
}

.hero__meta {
  border-top: var(--border) solid var(--line);
  padding-top: clamp(20px, 2.5vw, 32px);
}
.hero__lede {
  max-width: 54ch;
  font-size: var(--fs-md);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}

/* ---------- marquee (inset within the frame padding) ---------- */
.marquee { padding: var(--pad-inner); }
.marquee__viewport { overflow: hidden; }
.marquee__track {
  display: inline-flex; align-items: center; gap: 28px;
  white-space: nowrap;
  will-change: transform;
  animation: slide 26s linear infinite;
}
.marquee__item {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: normal;
}
.marquee__sep { font-weight: 300; color: var(--ink); font-size: var(--fs-md); }
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- section heads ---------- */
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: var(--pad-inner) var(--pad-inner) 0;
  gap: 20px;
}
.section__title {
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: normal;
  display: flex; align-items: baseline; gap: 12px;
}

/* ---------- building (featured project) ---------- */
.project {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: var(--pad-inner);
  color: var(--ink);
}
.project__name {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: normal;
  line-height: 0.9;
  width: fit-content;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
.project:hover .project__name { text-decoration-thickness: 3px; }
.project__body { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.project__desc {
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.55;
  max-width: 44ch;
  color: var(--ink);
}
.project__visit {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700;
  font-size: var(--fs-base);
  padding-bottom: 4px;
  border-bottom: var(--border) solid var(--ink);
}
.visit__arrow { transition: transform 0.4s var(--ease); }
.project:hover .visit__arrow { transform: translateX(8px); }

/* ---------- life / off the clock ---------- */
.life__list { padding: var(--pad-inner); display: flex; flex-direction: column; gap: clamp(18px, 2.2vw, 28px); }
.life__item {
  display: grid;
  grid-template-columns: clamp(96px, 16vw, 180px) 1fr;
  gap: clamp(16px, 3vw, 44px);
  align-items: baseline;
  color: var(--ink);
}
.life__label { font-size: var(--fs-md); font-weight: 700; }
.life__desc { font-size: var(--fs-md); font-weight: 500; line-height: 1.5; max-width: 56ch; }

/* ---------- about ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gap);
  padding: var(--pad-inner);
}
.about__lead {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.25;
  max-width: 22ch;
}
.about__para { font-size: var(--fs-md); color: var(--ink); font-weight: 500; max-width: 52ch; line-height: 1.55; }

/* ---------- contact ---------- */
.contact__body {
  padding: var(--pad-inner);
  display: flex; flex-direction: column; gap: clamp(24px, 3vw, 40px);
}
.contact__mail {
  font-size: 2.9rem;
  font-weight: 800;
  letter-spacing: normal;
  line-height: 1.05;
  width: fit-content;
  max-width: 100%;
  position: relative;
  word-break: break-word;
}
.contact__mail::after {
  content: "";
  position: absolute; left: 0; bottom: 0.06em;
  width: 100%; height: var(--border);
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.contact__mail:hover::after { transform: scaleX(1); }

/* self-bordering grid: container gives top + left, each cell gives
   right + bottom, so every link is fully enclosed at any column count */
.contact__links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: var(--border) solid var(--ink);
  border-left: var(--border) solid var(--ink);
}
.contact__links li {
  display: flex;
  border-right: var(--border) solid var(--ink);
  border-bottom: var(--border) solid var(--ink);
}
.contact__link {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(18px, 2vw, 26px) 12px;
  font-weight: 600;
  font-size: var(--fs-sm);
  text-align: center;
  color: var(--ink);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.contact__link:hover { background: var(--ink); color: var(--paper); }

/* the read.cv trigger is a button, keep it identical to the links */
button.contact__link {
  width: 100%;
  font-family: inherit;
  text-transform: lowercase;
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* ---------- cv reader (book overlay) ---------- */
.cv {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  padding: var(--pad);
}
.cv.is-open { display: block; }
.cv__backdrop {
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0.9;
}
.cv__panel {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 46px 1fr;
  border: var(--border) solid var(--ink);
  background: var(--paper);
  overflow: hidden;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.cv.is-open .cv__panel { transform: none; opacity: 1; }

/* the book spine */
.cv__spine {
  border-right: var(--border) solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cv__spine-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: normal;
  white-space: nowrap;
}

.cv__stage { display: flex; flex-direction: column; min-width: 0; }

.cv__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px clamp(16px, 2vw, 24px);
  border-bottom: var(--border) solid var(--ink);
  gap: 16px;
}
.cv__bar-left { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.cv__bar-center { font-weight: 700; text-align: center; }
.cv__bar-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.cv__action,
.cv__close {
  font-family: inherit;
  text-transform: lowercase;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border: var(--border) solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.cv__action:hover,
.cv__close:hover { background: var(--ink); color: var(--paper); }

.cv__viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--paper);
}
.cv__doc { width: 100%; height: 100%; border: 0; display: block; }

.cv__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}
.cv__fallback-title { font-size: var(--fs-lg); font-weight: 700; }
.cv__fallback-note { font-size: var(--fs-sm); color: var(--ink); font-weight: 500; max-width: 32ch; }
.cv__fallback b { font-weight: 700; color: var(--ink); }

/* ---------- footer ---------- */
.footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: var(--pad-inner);
  font-size: var(--fs-sm);
  color: var(--ink);
  font-weight: 500;
  margin-top: auto;
}
.footer__cell--center { text-align: center; }
.footer__cell--right { text-align: right; }
.footer__top {
  font-family: inherit;
  text-transform: lowercase;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}
.footer__top:hover { color: var(--ink); }

/* ---------- reveal-on-load ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .status { grid-template-columns: 1fr 1fr; }
  .status__cell--wide { grid-column: 1 / -1; border-left: 0; border-bottom: var(--border) solid var(--ink); }
  .status__cell:nth-child(2) { border-left: 0; }
  .about__grid { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; gap: clamp(16px, 4vw, 28px); }

  .hero__headline { font-size: 4rem; }
  .project__name { font-size: 2.6rem; }
}

@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 14px; }
  .topbar__nav { width: 100%; justify-content: space-between; }
  .footer { grid-template-columns: 1fr; gap: 6px; text-align: left; }
  .footer__cell--center, .footer__cell--right { text-align: left; }

  .life__item { grid-template-columns: 1fr; gap: 6px; }
  .contact__links { grid-template-columns: repeat(2, 1fr); }

  .hero__headline { font-size: 2.6rem; }
  .project__name { font-size: 2.2rem; }
  .contact__mail { font-size: 1.6rem; }
  .brand__name { font-size: 1.3rem; }

  .cv__panel { grid-template-columns: 1fr; }
  .cv__spine { display: none; }
  .cv__bar { grid-template-columns: 1fr auto; }
  .cv__bar-center { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
