/* ============================================================
   Samarth Doshi — personal site
   "Digital scrapbook": bright warm ground, playful display type
   (Bricolage Grotesque), handwritten accents (Caveat), a tilted
   photo collage, colourful hobby cards, video slots, lots of life.
   ============================================================ */

:root {
  --ground: #fbf8f2;
  --tint: #f2eee4;
  --dark: #16151a;
  --ink: #211e19;
  --muted: #6f6a60;
  --line: #e6e0d3;

  --y: #ffc43d;   /* yellow */
  --g: #12b886;   /* green  */
  --b: #2742f0;   /* blue   */
  --o: #ff5a1f;   /* orange */
  --p: #7c5cff;   /* purple */
  --r: #ff5470;   /* coral  */

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --hand: "Caveat", cursive;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: inherit; }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--b); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--b); outline-offset: 3px; border-radius: 4px; }

.label {
  font-family: var(--hand);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--o);
  margin: 0 0 0.6rem;
  transform: rotate(-2deg);
  display: inline-block;
}
.scrawl { font-family: var(--hand); font-weight: 600; color: var(--o); font-size: 0.8em; }
.scrawl--big { font-size: 1.1em; color: var(--r); }

/* handwritten-ish highlights */
.hl { font-weight: 600; padding: 0 0.15em; border-radius: 6px; }
.hl--y { background: color-mix(in srgb, var(--y) 55%, transparent); }
.hl--g { background: color-mix(in srgb, var(--g) 32%, transparent); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 80%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.nav__brand { font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-decoration: none; letter-spacing: -0.02em; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 1.9rem); font-size: 0.95rem; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color 0.2s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { color: var(--ink) !important; background: var(--y); padding: 0.4rem 1rem; border-radius: 999px; font-weight: 500; transition: transform 0.18s ease; }
.nav__cta:hover { transform: translateY(-2px) rotate(-2deg); }
@media (max-width: 700px) { .nav__links a:not(.nav__cta) { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.kicker { font-family: var(--hand); font-size: 1.8rem; font-weight: 600; color: var(--muted); margin: 0 0 0.3rem; }
.hero__name {
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1.4rem;
}
.hero__blink { color: var(--o); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__tag { font-size: 1.25rem; max-width: 34ch; color: #413d36; margin: 0 0 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn--solid { background: var(--ink); color: var(--ground); }
.btn--solid:hover { background: var(--b); border-color: var(--b); }

/* collage */
.hero__collage { position: relative; height: clamp(360px, 42vw, 520px); }
.pola {
  position: absolute;
  margin: 0;
  background: #fff;
  padding: 10px 10px 42px;
  border-radius: 4px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease;
}
.pola img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.pola figcaption {
  position: absolute; left: 0; right: 0; bottom: 10px;
  text-align: center; font-family: var(--hand); font-size: 1.2rem; color: #333;
}
.pola--1 { width: 56%; top: 2%; left: 18%; transform: rotate(-4deg); z-index: 3; }
.pola--2 { width: 44%; top: 46%; left: -2%; transform: rotate(5deg); z-index: 2; }
.pola--3 { width: 38%; top: 40%; right: 0; transform: rotate(-8deg); z-index: 4; }
.pola--1:hover { transform: rotate(-1deg) scale(1.03); z-index: 5; }
.pola--2:hover { transform: rotate(2deg) scale(1.03); z-index: 5; }
.pola--3:hover { transform: rotate(-4deg) scale(1.03); z-index: 5; }

.sticker {
  position: absolute;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  z-index: 6;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,0.3);
  transform: rotate(-6deg);
}
.sticker--1 { top: -4%; right: 6%; background: var(--y); }
.sticker--2 { bottom: 2%; left: 10%; background: var(--g); transform: rotate(7deg); color: #063; }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__collage { height: clamp(320px, 80vw, 420px); margin-top: 1rem; order: -1; }
}

/* marquee */
.marquee {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--y);
  overflow: hidden;
  padding: 0.6rem 0;
}
.marquee__t {
  display: inline-flex; align-items: center; gap: 1.6rem; white-space: nowrap;
  font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
  animation: scroll-x 30s linear infinite;
}
.marquee__t i { color: var(--o); font-style: normal; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ============================================================
   SECTIONS
   ============================================================ */
.sec { padding-block: clamp(4rem, 8vw, 6.5rem); }
.sec--tint { background: var(--tint); }
.sec--dark { background: var(--dark); color: var(--ground); }

.sec__head { margin-bottom: 2.6rem; }
.sec__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; }
.sec__title--light { color: var(--ground); }
.sec__sub { color: var(--muted); margin: 0.6rem 0 0; font-size: 0.98rem; }
.sec__sub--light { color: #a7a39a; }

/* ---- About ---- */
.about__big {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.2vw, 2.3rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin: 0 0 2.2rem;
  max-width: 20ch;
}
.about__big { max-width: 28ch; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.facts li {
  font-family: var(--display); font-weight: 500; font-size: 0.95rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 1rem; transition: transform 0.16s ease, border-color 0.16s ease;
}
.facts li:hover { transform: translateY(-2px) rotate(-1deg); border-color: var(--o); }

/* ---- Work ---- */
.label--mt { margin-top: 2.6rem; }

.badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--display); font-weight: 600; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem; border-radius: 999px;
  background: #fff; border: 2px solid var(--ink); margin-bottom: 1rem;
}
.badge--live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--g); animation: blink 1.6s steps(1) infinite; }

.worknow {
  display: grid; grid-template-columns: 1.4fr 0.8fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  background: color-mix(in srgb, var(--y) 20%, #fff);
  border: 2px solid var(--ink); border-radius: 22px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.worknow__title { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-bottom: 0.8rem; line-height: 1.1; }
.worknow__title a { color: var(--b); text-decoration: none; }
.worknow__title a:hover { text-decoration: underline; }
.worknow__desc { margin: 0 0 1.2rem; color: #413d36; font-size: 1.05rem; }
.worknow__r { display: grid; gap: 0.9rem; }
.statbox { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 0.8rem 1rem; }
.statbox b { display: block; font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.statbox span { font-size: 0.85rem; color: var(--muted); }

.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pills li { font-family: var(--display); font-weight: 500; font-size: 0.86rem; background: #fff; border: 1.5px solid var(--ink); border-radius: 999px; padding: 0.3rem 0.8rem; }
.pills--sm li { font-size: 0.8rem; border-color: var(--line); font-weight: 450; }

.workgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 1.1rem; }
.wcard { border: 2px solid var(--ink); border-radius: 18px; padding: 1.5rem; background: #fff; box-shadow: 5px 5px 0 var(--ink); }
.wc--b { background: color-mix(in srgb, var(--b) 10%, #fff); }
.wc--o { background: color-mix(in srgb, var(--o) 12%, #fff); }
.wcard__when { font-family: var(--body); font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.wcard h3 { font-size: 1.25rem; margin: 0.4rem 0 0.5rem; }
.wcard h3 em { font-family: var(--body); font-style: normal; font-size: 0.7rem; font-weight: 600; background: var(--ink); color: var(--ground); padding: 0.1rem 0.4rem; border-radius: 5px; vertical-align: middle; }
.wcard__org { color: var(--b); }
.wc--o .wcard__org { color: var(--o); }
.wcard p { margin: 0 0 0.9rem; color: #46423b; font-size: 0.96rem; }

.builds { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.builds li { padding-left: 1.4rem; position: relative; color: #46423b; }
.builds li::before { content: "▸"; position: absolute; left: 0; color: var(--o); }
.builds li b { color: var(--ink); }

.videos--light { margin-top: 1rem; }
.videos--light .vid figcaption { color: #46423b; }
.videos--light .vid figcaption strong { color: var(--ink); }

@media (max-width: 760px) {
  .worknow { grid-template-columns: 1fr; }
  .worknow__r { grid-template-columns: repeat(3, 1fr); }
  .workgrid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .worknow__r { grid-template-columns: 1fr; } }

/* ---- Gallery ---- */
.gallery {
  columns: 3;
  column-gap: 1.2rem;
}
.shot {
  break-inside: avoid;
  margin: 0 0 1.2rem;
  background: #fff;
  padding: 9px 9px 36px;
  border-radius: 4px;
  box-shadow: 0 14px 34px -18px rgba(0,0,0,0.3);
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.shot:nth-child(3n+1) { transform: rotate(-1.5deg); }
.shot:nth-child(3n+2) { transform: rotate(1.2deg); }
.shot:nth-child(3n) { transform: rotate(-0.6deg); }
.shot:hover { transform: rotate(0deg) scale(1.02); box-shadow: 0 22px 44px -18px rgba(0,0,0,0.38); z-index: 2; }
.shot img { display: block; width: 100%; border-radius: 2px; }
.shot figcaption { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--hand); font-size: 1.2rem; color: #444; }

@media (max-width: 820px) { .gallery { columns: 2; } }
@media (max-width: 500px) { .gallery { columns: 1; } }

/* ---- Hobbies ---- */
.hobbies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.hobby {
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 1.5rem;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 6px 6px 0 var(--ink);
}
.hobby:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.hobby__i { font-size: 2rem; display: block; margin-bottom: 0.6rem; }
.hobby h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.hobby p { margin: 0; color: #46423b; font-size: 0.96rem; }
.h--y { background: color-mix(in srgb, var(--y) 22%, #fff); }
.h--g { background: color-mix(in srgb, var(--g) 15%, #fff); }
.h--b { background: color-mix(in srgb, var(--b) 12%, #fff); }
.h--o { background: color-mix(in srgb, var(--o) 14%, #fff); }
.h--p { background: color-mix(in srgb, var(--p) 14%, #fff); }
.h--r { background: color-mix(in srgb, var(--r) 14%, #fff); }

@media (max-width: 820px) { .hobbies { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .hobbies { grid-template-columns: 1fr; } }

/* ---- Videos ---- */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.vid { margin: 0; }
.vid__frame {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  aspect-ratio: 16 / 10; background: #000;
}
.vid__frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0.78; }
.vid__play {
  position: absolute; inset: 0; margin: auto;
  width: 72px; height: 72px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--o); color: #fff; font-size: 1.5rem;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px -8px rgba(255,90,31,0.6);
  transition: transform 0.18s ease;
}
.vid__play span { margin-left: 3px; }
.vid__play:hover { transform: scale(1.1); }
.vid__time {
  position: absolute; bottom: 10px; right: 10px;
  font-family: var(--body); font-size: 0.78rem; font-weight: 500;
  background: rgba(0,0,0,0.65); color: #fff; padding: 0.15rem 0.5rem; border-radius: 6px;
}
.vid figcaption { margin-top: 0.9rem; color: #c8c4bb; font-size: 0.98rem; }
.vid figcaption strong { color: var(--ground); }

@media (max-width: 720px) { .videos { grid-template-columns: 1fr; } }

/* ---- Currently + facts ---- */
.now { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.now__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.now__list li { font-size: 1.05rem; }
.now__list li span { font-family: var(--display); font-weight: 600; margin-right: 0.5rem; }
.now__list--plain li { color: #46423b; display: list-item; }
.now__list--plain { padding-left: 1.1rem; list-style: "✦  "; }
.now__list--plain li::marker { color: var(--o); }
@media (max-width: 680px) { .now { grid-template-columns: 1fr; gap: 2rem; } }

/* ---- Say hi ---- */
.sec--hi { background: var(--b); color: #fff; text-align: center; }
.hi__title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
.hi__sub { font-size: 1.15rem; color: #d7ddff; margin: 1rem auto 2rem; max-width: 40ch; }
.hi__mail {
  display: inline-block; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2.4rem); color: #fff; text-decoration: none;
  border-bottom: 3px solid var(--y); padding-bottom: 0.1rem;
  transition: color 0.2s ease;
}
.hi__mail:hover { color: var(--y); }
.hi__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; margin-top: 2.2rem; font-weight: 500; }
.hi__links a { color: #c3ccff; text-decoration: none; transition: color 0.2s ease; }
.hi__links a:hover { color: #fff; }
.colophon { margin-top: 3rem; color: #aeb8ff; font-size: 0.85rem; }

/* ============================================================
   Reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__blink, .marquee__t { animation: none; }
  .btn:hover, .hobby:hover, .shot:hover, .pola:hover, .facts li:hover, .vid__play:hover { transform: none; }
}
