/* ==========================================================
   Pragyan portfolio: home page
   Sizes come straight from the Figma spec. Colours come only from
   tokens.css, except the two variables marked DESIGN CHOICES below.
   ========================================================== */

:root {
  /* Fonts (chosen): Sora from Google Fonts, Switzer from Fontshare */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Switzer", system-ui, sans-serif;

  /* Layout, from the 1200px design frame */
  --frame: 1200px;
  --container: 1090px;
  --pad: 20px;                       /* side padding when the screen is narrower than the container */

  /* DESIGN CHOICES you can flip in one line each ------------------------- */
  /* Button label colour. Your mockup used white (2.97:1 on orange, fails AA).
     Bottle green passes (4.78:1). To restore your mockup: #FFFFFF */
  --btn-label: var(--text-on-action);
  /* Secondary button + card outline colour. Mockup used orange (2.52:1 on eggshell).
     To restore your mockup: var(--action-primary) */
  --btn-secondary: var(--text-primary);
  /* ------------------------------------------------------------------------ */

  --ink-black: #000000;              /* H1 and section titles, as specified */
  --on-dark-secondary: #A49C94;      /* sub text on bottle green (5.24:1) */
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; color-scheme: light; }
body {
  background: var(--bg-page);
  color: var(--text-primary);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; padding: 0; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--bg-inverse); color: var(--text-inverse);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 500;
}
.skip:focus { top: 12px; }

/* ---------- Button (universal): 42px tall, 14px Sora semibold, 15px side padding ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 15px;
  border: 2px solid transparent; border-radius: 48px;
  font: 600 14px/18px var(--font-display);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--action-primary); color: var(--btn-label); }
.btn--primary:hover { background: var(--action-primary-hover); }
.btn--primary:active { box-shadow: inset 0 3px 6px rgb(0 50 35 / 0.28); transform: translateY(1px); }
.btn--secondary { border-color: var(--btn-secondary); color: var(--btn-secondary); background: transparent; }
.btn--secondary:hover { background: var(--btn-secondary); color: var(--bg-page); }
.btn--secondary:active { transform: translateY(1px); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg-page); }
.nav__in {
  max-width: var(--frame); margin: 0 auto; padding: 14px 13px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: block; flex: none; }
.brand img { height: 40px; width: auto; }
.nav__links { flex: 1; display: flex; justify-content: center; gap: 30px; }
.nav__links a { font: 500 16px/24px var(--font-body); text-decoration: none; padding: 4px 0; }
.nav__links a:hover { text-decoration: underline; text-decoration-color: var(--action-primary); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- Hero ---------- */
.hero {
  max-width: calc(var(--container) + var(--pad) * 2); margin: 0 auto; padding: 60px var(--pad) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 408px);
  gap: 40px; align-items: center;
}
.hero h1 {
  font: 700 clamp(2.5rem, 7vw, 60px)/1.08 var(--font-display);
  letter-spacing: -0.02em; color: var(--ink-black);
}
.hero__tag {
  margin-top: 12px; max-width: 520px;
  font: 600 clamp(1.375rem, 3vw, 28px)/1.25 var(--font-display);
  letter-spacing: -0.01em; color: var(--ink-black);
}
.hero__sub { margin-top: 16px; max-width: 460px; font: 400 16px/1.5 var(--font-body); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.portrait {
  position: relative; width: 100%; max-width: 408px; aspect-ratio: 408 / 440;
  justify-self: end; margin-right: clamp(0px, 3vw, 33px);
  border-radius: 50% 50% 14px 14px / 46.36% 46.36% 14px 14px;
  overflow: hidden; background: var(--bg-sunken);
}
.portrait img, .portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait img { object-fit: cover; object-position: 50% 25%; }   /* fallback if the effect can't run */

/* ---------- Sections ---------- */
.section { max-width: calc(var(--container) + var(--pad) * 2); margin: 0 auto; padding: 100px var(--pad) 0; }
.section__title { font: 600 clamp(1.5rem, 4vw, 32px)/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--ink-black); }
.section__title--bold { font-weight: 700; }

/* ---------- Live prototype cards: 530 x 355, padding 10 10 15 10, radius 14 ---------- */
.pgrid {
  margin-top: 40px; display: grid; gap: 30px; justify-content: space-between;
  grid-template-columns: repeat(2, minmax(0, 530px));
}
.pcard {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  min-height: 355px; padding: 10px 10px 15px;
  background: var(--bg-inverse); color: var(--text-inverse);
  border-radius: 14px;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard__media { position: relative; height: 240px; border-radius: 8px; overflow: hidden; background: var(--bg-inverse-deep); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* The "Live" tab that cuts into the image's bottom-left corner */
.live {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 4px 10px; background: var(--bg-inverse);
  border-top-right-radius: 14px;
  font: 600 18px/24px var(--font-body); color: var(--text-inverse);
}
.live::after {   /* inverse corner so the tab flows into the image */
  content: ""; position: absolute; right: -14px; bottom: 0; width: 14px; height: 14px;
  background: radial-gradient(circle at 100% 0, transparent 13.5px, var(--bg-inverse) 14px);
}
.live__dot {
  width: 15px; height: 15px; border-radius: 60px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--salad-400) 30%, transparent);
}
.live__dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 60px; background: var(--salad-400);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.pcard__body { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 6px; }
.pcard__title { font: 500 22px/28px var(--font-body); }
.pcard__desc { margin-top: 4px; font: 400 14px/20px var(--font-body); color: var(--on-dark-secondary); max-width: 360px; }
.pcard__go {
  flex: none; width: 60px; height: 60px; display: grid; place-items: center;
  border: 2px solid var(--action-primary); border-radius: 50%; color: var(--action-primary);
  text-decoration: none;
  transition: background-color var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard);
}
.pcard__go svg { width: 18px; height: 18px; stroke-width: 3; }
.pcard__go::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }   /* whole card is clickable */
.pcard:hover .pcard__go { background: var(--action-primary); color: var(--text-on-action); }
.pcard :focus-visible { outline-color: var(--salad-400); }

/* ---------- Case studies ---------- */
.timeline { position: relative; margin-top: 40px; }
.timeline::before {   /* the vertical line the dots ride on */
  content: ""; position: absolute; left: 7px; top: 24px; bottom: 0; width: 2px; border-radius: 2px;
  background: color-mix(in srgb, var(--salad-400) 70%, transparent);
}
.case { display: grid; grid-template-columns: 169px minmax(0, 891px); margin-bottom: 40px; }
.case:last-child { margin-bottom: 0; }
.case__year {
  position: sticky; top: 96px; align-self: start;   /* scrolls with the page, then parks until its card ends */
  display: flex; align-items: center; gap: 14px; padding-top: 6px;
  font: 700 32px/1.2 var(--font-display); color: var(--ink-black);
}
.case__dot {
  position: relative; z-index: 1; flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: color-mix(in srgb, var(--salad-400) 35%, var(--bg-page));
  display: grid; place-items: center;
}
.case__dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--salad-500); }

.ccard {
  position: relative; container-type: inline-size;
  min-height: 372px; padding: 16px; border-radius: 24px;
  background: var(--bg-raised); box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.ccard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ccard__in { display: flex; gap: 32px; min-height: 340px; }
.ccard__media {
  flex: 0 0 440px; max-width: 52%; min-height: 340px; border-radius: 12px; overflow: hidden;
  background: var(--bg-sunken); position: relative;
}
.ccard__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; position: absolute; inset: 0; }
.ccard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding-right: 16px; }
.ccard__title { font: 700 32px/1.15 var(--font-display); letter-spacing: -0.01em; }
.ccard__desc { margin-top: 12px; font: 400 16px/1.5 var(--font-body); color: var(--text-secondary); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 96px; height: 28px; padding: 4px 8px;
  border: 1.5px solid var(--text-primary); border-radius: 999px;
  font: 500 12px/1 var(--font-body); white-space: nowrap;
}
.ccard .btn { margin-top: 20px; width: 100%; max-width: 326px; }
.ccard .btn::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }   /* whole card is clickable */
.ccard .btn { position: static; }

/* Placeholder thumbnails for projects whose artwork isn't supplied yet */
.ph {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center;
  font: 700 28px/1.1 var(--font-display); letter-spacing: -0.01em; padding: 16px;
}
.ph small { font: 500 12px/1.3 var(--font-body); letter-spacing: 0; opacity: 0.8; }
.ph--dark { background: var(--bg-inverse-deep); color: var(--text-inverse); }
.ph--light { background: var(--bg-sunken); color: var(--text-primary); border: 1.5px dashed var(--border-control); border-radius: 12px; }

@container (max-width: 640px) {
  .ccard__in { flex-direction: column; gap: 20px; }
  .ccard__media { flex: none; width: 100%; max-width: none; aspect-ratio: 16 / 11; min-height: 0; }
  .ccard__body { padding-right: 0; }
  .ccard .btn { max-width: none; }
}

/* ---------- Footer: 1058 x 310, radius 24, padding 35 / 49 ---------- */
.footer-wrap { padding: 100px var(--pad) 48px; }
.footer {
  max-width: 1058px; min-height: 310px; margin: 0 auto; padding: 35px 49px;
  background: var(--bg-raised); border-radius: 24px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 490fr 263fr 207fr; gap: 24px;
}
.footer h2 { font: 600 32px/1.2 var(--font-display); letter-spacing: -0.01em; margin-bottom: 20px; }
.footer li + li { margin-top: 8px; }
.footer li a { font: 500 16px/24px var(--font-body); text-decoration: none; }
.footer li a:hover { text-decoration: underline; text-decoration-color: var(--action-primary); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.spotify { display: block; width: 300px; max-width: 100%; height: 152px; border-radius: 12px; overflow: hidden; }
.spotify img { width: 100%; height: 100%; object-fit: cover; }
.copyright { max-width: 1058px; margin: 32px auto 0; font: 400 16px/1.5 var(--font-body); color: var(--text-secondary); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; gap: 32px; }
  .portrait { justify-self: center; margin-right: 0; max-width: 360px; }
  .section { padding-top: 72px; }
  .pgrid { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .case { grid-template-columns: 1fr; margin-bottom: 32px; }
  .case__year { position: static; padding: 0 0 12px; }
  .nav__links { gap: 18px; }
  .footer { grid-template-columns: 1fr; padding: 28px 24px; }
  .footer-wrap { padding-top: 72px; }
}
@media (max-width: 560px) {
  .nav__in { padding: 10px 12px; }
  .brand img { height: 32px; }
  /* No mobile menu is designed yet, so links wrap to a second row instead of disappearing */
  .nav__in { flex-wrap: wrap; row-gap: 4px; }
  .nav__in .btn { margin-left: auto; }
  .nav__links { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 22px; }
  .pcard { min-height: 0; }
  .pcard__media { height: auto; aspect-ratio: 510 / 240; }
  .pcard__body { align-items: flex-end; }
  .live { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live__dot::before { animation: none; }
  .pcard, .ccard, .btn { transition: none; }
  .pcard:hover, .ccard:hover { transform: none; }
}
