/* ==========================================================================
   Niranjan Reddy · portfolio home · theme "One Line × Holo Film"
   Everything grows from the logo animation: the name zips into nr (spring),
   then one line draws, led by a pen point. That pen keeps going down the page.
   The page is pearl paper laid over a live holographic film, and the pen line
   is a cut in the paper: wherever it draws, the foil shows through.
   Fonts from the old brand. Colours: pearl, ink and the film itself.
   ========================================================================== */

/* Tokens and components come from ui-kit.css. This file is the home page layout. */
:root { --cut: 12px; /* width of the pen cut through the paper */ }
html { scroll-padding-top: 88px; }
body { background: #e9e2f6; overflow-x: clip; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- Navigation ----------
   Left: the full name. Centre: the role capsule. Right: sound, Let's talk, Menu pills.
   Menu opens a stack of panels. Hides on the way down, returns on the way up.
   Every control here is a UI kit component; this block only places them. */
.nav {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 50; height: 52px; padding: 0 var(--pad);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  transition: transform .5s var(--soft);
}
.nav.is-hidden { transform: translateY(calc(-100% - 24px)); }
.nav.is-hidden:has(:focus-visible), .nav.is-open { transform: none; }
.nav__name { justify-self: start; text-decoration: none; font: 700 22px/1 var(--display); letter-spacing: -.03em; white-space: nowrap; padding: 6px 2px; transition: opacity .3s var(--soft); }
.nav__role { justify-self: center; cursor: default; }
.nav__role:hover, .nav__role:active { transform: none; }
.nav__right { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav__menu { padding: 0 20px 0 24px; }
.nav__menu-label { min-width: 3em; text-align: left; }
.menu { position: absolute; top: calc(100% + 12px); right: var(--pad); width: min(380px, calc(100vw - 24px)); }

@media (max-width: 960px) { .nav__role { display: none; } }
@media (max-width: 600px) {
  .nav { top: 12px; padding: 0 12px; grid-template-columns: minmax(0, 1fr) auto; --pill-h: 44px; }
  .nav__name { font-size: 19px; }
  .nav__right { grid-column: 2; }
  .nav__talk { display: none; }
  .nav__menu { padding: 0 16px 0 20px; }
  .menu { right: 0; left: 0; width: auto; padding: 0 12px; }
  .nav.is-open .nav__talk { display: inline-flex; }
  .nav.is-open .nav__name { opacity: 0; pointer-events: none; }
}

/* ---------- Hero ---------- */
#film { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
#paper { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; }
.hero { position: relative; height: 175vh; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(246 243 251 / .1), rgb(246 243 251 / .35) 60%, rgb(246 243 251 / .1)); }
.hero__stage {
  position: sticky; top: 0; height: 100vh; min-height: 560px;
  display: grid; grid-template-rows: 1fr auto auto; padding: 88px var(--pad) 28px;
  max-width: 1440px; margin: 0 auto;
}
.hero__logo { width: 100%; height: 100%; min-height: 220px; overflow: visible; }
.hero__logo .ltr { font: 700 150px/1 var(--display); fill: var(--ink); letter-spacing: -.02em; }
.hero__logo .logo { fill: none; stroke: var(--ink); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.hero__logo .spark { fill: url(#foilg); stroke: var(--ink); stroke-width: 2.5; }
.hero__copy { position: relative; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; padding-top: 20px; border-top: 1.5px solid var(--ink); }
.hero__intro { display: grid; gap: 12px; justify-items: start; max-width: 46ch; }
.hero__status { gap: 10px; cursor: default; }
.hero__status:hover, .hero__status:active { transform: none; }
.hero__role { font: 500 clamp(18px, 1.8vw, 22px)/1.4 var(--body); }
.hero__meta { color: var(--ink); opacity: .7; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__hint { margin-top: 14px; font: 600 22px/1 var(--hand); }
.hero__hint span { display: inline-block; animation: nudge 1.6s var(--inout) infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
.hero.is-zipped .hero__hint { opacity: 0; transition: opacity .24s; }


/* ---------- The pen line ---------- */
.threaded { position: relative; padding-bottom: 40px; overflow-x: clip; } /* letters waiting to zip in must not widen the page on phones */
.no-film .threaded, .no-film .footer { background: var(--paper); }

/* Sections: one centred column; the pen line roams freely around and behind them */
.proof, .sec, .contact { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Scribbles: handwritten notes the pen leaves as it passes */
.scribble { width: fit-content; font: 600 clamp(24px, 2.4vw, 30px)/1.15 var(--hand); color: transparent; background: var(--foil); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; filter: saturate(1.4) brightness(.8); transform: rotate(var(--rot, 0)); margin-top: 18px; clip-path: inset(0 100% 0 0); transition: clip-path .9s var(--inout); }
.scribble.is-inked { clip-path: inset(0 -10% 0 0); }
.scribble--right { margin-left: auto; }

/* ---------- Proof strip ---------- */
.proof { padding-top: clamp(56px, 8vw, 96px); }
.proof__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.proof__list li { display: grid; gap: 4px; align-content: start; padding-top: 14px; border-top: 1.5px solid var(--ink); }
.proof__list b { font: 700 clamp(24px, 2.6vw, 34px)/1 var(--display); letter-spacing: -.02em; }
.proof__list span { color: var(--muted); font-size: 15px; line-height: 1.35; }
@media (max-width: 820px) { .proof__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Section heads, with the zip ---------- */
.sec { padding-top: clamp(88px, 12vw, 152px); }
.sec__lede { color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); max-width: 52ch; margin-top: 6px; }
.sec__head { position: relative; display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec__head h2, .contact h2 { font: 700 clamp(40px, 6.4vw, 88px)/.98 var(--display); letter-spacing: -.035em; text-wrap: balance; }
/* Letters spring into place, 35 ms apart, like the logo's zip */
.zip .word { display: inline-block; white-space: nowrap; }
.zip .ch { display: inline-block; }
.js .zip .ch { opacity: 0; transform: translateX(var(--from, 40px)) scale(.6); transform-origin: 0 80%; }
.js .zip.is-in .ch { opacity: 1; transform: none; transition: transform .7s var(--spring), opacity .3s var(--soft); transition-delay: calc(var(--i) * 35ms); }

/* ---------- Work ---------- */
.work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.card--wide { grid-column: 1 / -1; }
.card__link { display: grid; height: 100%; text-decoration: none; background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgb(22 16 12 / .35); transition: transform .48s var(--spring); }
.card--wide .card__link { grid-template-columns: 1.3fr 1fr; }
.card__link:hover { transform: translateY(-6px) rotate(-.4deg); }
.card__art { background: linear-gradient(135deg, #f6f3fb, #efe9fa); margin: 10px; border-radius: 14px; display: grid; place-items: center; aspect-ratio: 5 / 3; }
.card--wide .card__art { aspect-ratio: auto; min-height: 300px; }
.card__art svg { width: 86%; height: auto; }
.card__body { padding: 18px 26px 28px; display: grid; gap: 10px; align-content: end; }
.card__body h3 { font: 700 clamp(22px, 2.4vw, 32px)/1.08 var(--display); letter-spacing: -.02em; }
.card__line { color: var(--muted); }
.card__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); }
.card__facts dt { font: 500 11.5px/1.3 var(--mono); color: var(--muted); }
.card__facts dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; }
.card__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 600; font-size: 15px; }
.card__cta .arrow { width: 18px; height: 18px; }
.card__link:hover .arrow { transform: translate(3px, -3px); }
.card__result { font: 500 13px/1.3 var(--mono); color: var(--ink); }
@media (max-width: 760px) { .work { grid-template-columns: minmax(0, 1fr); } .card--wide .card__link { grid-template-columns: minmax(0, 1fr); } .card--wide .card__art { min-height: 220px; } }

/* Line drawings: drawn in by the pen when it reaches them */
.ink path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--inout); }
.ink path:nth-child(2) { transition-delay: .15s; } .ink path:nth-child(3) { transition-delay: .3s; } .ink path:nth-child(4) { transition-delay: .45s; } .ink path:nth-child(5) { transition-delay: .6s; }
.ink .hot { stroke: url(#foilg); stroke-width: 5; }
.is-inked .ink path, .ink.is-inked path { stroke-dashoffset: 0; }
.card__link:hover .ink .hot { animation: redraw 1.1s var(--inout); }
@keyframes redraw { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

/* ---------- Labs ---------- */
.labs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.lab { padding: 22px; border-radius: 18px; background: var(--card); display: grid; gap: 8px; align-content: start; transition: transform .48s var(--spring); }
.lab:hover { transform: translateY(-4px) rotate(.6deg); }
.lab svg { width: 80px; height: 60px; margin-bottom: 6px; }
.lab h3 { font: 700 21px/1.1 var(--display); letter-spacing: -.01em; }
.lab > p:not(.label) { color: var(--muted); font-size: 15px; }
.lab .tags { margin-top: 6px; }
@media (max-width: 900px) { .labs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .labs { grid-template-columns: minmax(0, 1fr); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 72px); }
.about__text { display: grid; gap: 16px; align-content: start; font-size: clamp(17px, 1.5vw, 19px); max-width: 60ch; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.principles li { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 18px; background: var(--card); }
.principles b { font: 700 18px/1.15 var(--display); letter-spacing: -.01em; }
.principles span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.skills { display: grid; gap: 10px; margin: 8px 0 0; }
.skills div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; }
.skills dt { font: 500 12.5px/1.6 var(--mono); color: var(--muted); }
.skills dd { margin: 0; font-size: 15px; }
@media (max-width: 640px) { .principles { grid-template-columns: minmax(0, 1fr); } .skills div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.timeline li { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); }
.timeline span { font: 400 13px/1.7 var(--mono); color: var(--muted); grid-row: span 2; }
.timeline b { font-weight: 600; }
.timeline em { font-style: normal; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact { padding-top: clamp(96px, 14vw, 176px); padding-bottom: clamp(64px, 9vw, 112px); display: grid; justify-items: start; gap: 18px; }
.contact__sign { width: clamp(170px, 22vw, 270px); height: 24px; overflow: visible; visibility: hidden; } /* nr signature off for now; kept as the pen line's end point */
.sign-path { fill: none; stroke: transparent; stroke-width: 9; }
.sign-pen { display: none; }
.no-film .sign-path, .reduce .sign-path { stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.contact__mail { font: 700 clamp(26px, 3.6vw, 46px)/1.1 var(--display); letter-spacing: -.02em; }
.contact__mail a { text-decoration: none; background: var(--foil) 0 100% / 100% 5px no-repeat; }
.contact__lede { font-size: clamp(17px, 1.6vw, 20px); max-width: 48ch; color: var(--muted); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-weight: 500; }
.footer { position: relative; background: var(--paper); padding: 36px max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad))) 28px; display: grid; gap: 28px; border-top: 1px solid var(--rule); }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer__name { font: 700 22px/1 var(--display); letter-spacing: -.03em; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 500; font-size: 15px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font: 400 13px/1.4 var(--mono); color: var(--muted); }

/* ---------- Reduced motion: final states, no drawing ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .hero { height: auto; }
  .hero__stage { position: relative; }
  .js .zip .ch { opacity: 1; transform: none; }
  .scribble { clip-path: none; }
  .ink path { stroke-dashoffset: 0; }
}

