:root {
  --paper: #efe7d9;
  --band: #e1d4bd;   /* tinted band behind Browse Projects */
  --raised: #f7f2e8; /* lighter boxes that sit on the band */
  --card: #ebe4d7;
  --ink: #1d1a16;
  --muted: #6e665b;
  --accent: #b0281c;
  --display: "Danfo", Georgia, serif;
  --body: "Work Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.6; }
a { color: inherit; }
img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 230px 1fr; gap: 48px; padding: 36px 0; min-height: calc(74.8vh + 14px); }
.side { display: flex; flex-direction: column; gap: 32px; padding-top: 16px; justify-self: end; } /* sits toward the slideshow */
.name { font-family: var(--display); font-size: 3.4rem; }
.name a { text-decoration: none; }
.socials { display: grid; grid-template-columns: repeat(3, 42px); gap: 12px; }
.socials a {
  width: 42px; height: 42px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; font-size: .72rem; font-weight: 600;
  text-decoration: none; transition: background .2s, color .2s;
}
.socials a:hover { background: var(--ink); color: var(--paper); }
.socials:empty { display: none; }
.side nav { display: flex; flex-direction: column; gap: 14px; }
.side nav a { text-decoration: none; font-size: 1.1rem; width: fit-content; border-bottom: 1px solid transparent; }
.side nav a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Slideshow ---------- */
.slideshow { position: relative; overflow: hidden; border: 2px solid var(--ink); background: var(--ink); min-height: 442px; width: 85%; justify-self: end; } /* 15% smaller */
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; color: #fff; text-decoration: none; }
.slide.active { opacity: 1; z-index: 1; }
.slide img, .slide video, .slide .ph { width: 100%; height: 100%; object-fit: cover; }
.cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 32px 28px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.kicker { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.cap h3 { font-size: 2.2rem; margin-top: 4px; }
.ss-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6);
  background: rgba(0,0,0,.3); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.ss-btn:hover { background: rgba(0,0,0,.6); }
.prev { left: 16px; } .next { right: 16px; }
.dots { position: absolute; right: 28px; bottom: 32px; z-index: 2; display: flex; gap: 8px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #fff; background: transparent; cursor: pointer; }
.dots button.on { background: #fff; }

/* Placeholder art (used when no image/video yet) */
.ph { display: grid; place-items: center; text-align: center; padding: 24px; }
.ph span { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 2.4rem); line-height: 1.1; max-width: 100%; color: rgba(255,255,255,.35); }
.thumb { container-type: inline-size; }
.thumb .ph span { font-size: clamp(1rem, 8cqi, 2rem); }

/* ---------- Sections ---------- */
.tagline {
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  text-align: center; padding: 30px 16px; font-family: var(--display);
  font-size: clamp(1.8rem, 6vw, 4.4rem); letter-spacing: .03em;
}
.section { padding: 64px 0; border-bottom: 2px solid var(--ink); }
.section-title { font-size: 2.8rem; margin-bottom: 26px; }

.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.about p { margin-bottom: 1em; max-width: 58ch; font-size: 1.08rem; }
.about .about-hi { font-size: 1.9rem; font-weight: 600; line-height: 1.2; margin-bottom: .5em; }
.headshot { aspect-ratio: 4 / 5; border: 2px solid var(--ink); background: var(--card); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.headshot img { width: 100%; height: 100%; object-fit: cover; }
.about .headshot { width: 75%; justify-self: end; } /* ~25% smaller for now; resize once the real text is in */
#about { padding: 50px 0; }

.browse { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.group { border: 2px solid var(--ink); padding: 28px; background: var(--raised); }
#projects { background: var(--band); padding-top: 44px; }
.group h3 a { text-decoration: none; font-size: 2rem; }
.group h3 a:hover { color: var(--accent); }
.arrow { font-size: 1.2rem; }
.group ul { list-style: none; margin-top: 18px; border-top: 1px solid var(--ink); }
.group li a { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(29,26,22,.2); text-decoration: none; }
.group li a:hover { color: var(--accent); }

.contact .page-title { margin-top: 48px; }
.lede { color: var(--muted); margin-bottom: 32px; }
.contact form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 640px; }
.full { grid-column: 1 / -1; }
label { display: block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
input, textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--ink); background: #fffdf8; border-radius: 0; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 160px; resize: vertical; }
.btn { font: inherit; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 14px 28px; background: var(--ink); color: var(--paper); border: none; cursor: pointer; justify-self: start; }
.btn:hover { background: var(--accent); }
.hidden { display: none; }

footer { padding: 32px 0 48px; color: var(--muted); font-size: .85rem; }

/* ---------- Inner pages ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px 0; border-bottom: 2px solid var(--ink); }
.topbar .name { font-size: 1.8rem; }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a { text-decoration: none; }
.topbar nav a:hover { color: var(--accent); }
main.inner { padding-bottom: 96px; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 40px 0 8px; }
.crumbs a:hover { color: var(--accent); }
.cat-title { margin-top: 40px; margin-bottom: 8px; }
.cat-crumbs { margin: 0 0 8px; }
.page-title { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: 12px; }
.subtabs { display: flex; gap: 28px; margin: 4px 0 32px; border-bottom: 1px solid rgba(29,26,22,.2); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.subtabs a, .subtabs span { padding: 10px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--muted); }
.subtabs a:hover { color: var(--accent); }
.subtabs .on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.subsection { margin-top: 48px; }
.subsection h2 { font-size: 2rem; margin-bottom: 20px; }
.subsection h2 a { text-decoration: none; }
.empty { color: var(--muted); font-style: italic; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border: 2px solid var(--ink); text-decoration: none; background: var(--paper); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); border-bottom: 2px solid var(--ink); }
.thumb img, .thumb video, .thumb .ph { width: 100%; height: 100%; object-fit: cover; }
.thumb img.cover { object-position: center top; } /* posters: keep the title in view */
.card-body { padding: 16px 18px 20px; }
.card-body h3 { font-size: 1.4rem; }
.meta { color: var(--muted); font-size: .85rem; margin: 2px 0 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.tag { font-size: .78rem; border: 1px solid var(--ink); padding: 3px 12px; border-radius: 99px; text-decoration: none; }
.tag:hover { background: var(--ink); color: var(--paper); }
.project-media { aspect-ratio: 16 / 9; border: 2px solid var(--ink); background: var(--ink); margin-bottom: 40px; overflow: hidden; }
.project-media > * { width: 100%; height: 100%; object-fit: cover; border: 0; }
.project-media > img { object-fit: contain; } /* show whole posters/photos */
/* Videos: centered; main.js sizes them to fill the screen without scrolling */
.project-media.vid { margin-left: auto; margin-right: auto; }
/* Tighter header on project pages so videos can be bigger */
#project .crumbs { margin-top: 24px; }
#project .tags { margin-bottom: 16px; }
#project .page-title { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 6px; }
.project-media.pdf { aspect-ratio: auto; height: 85vh; background: #fff; }
.prose { max-width: 68ch; font-size: 1.08rem; }
.prose p { margin-bottom: 1em; }

.thanks { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 16px; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 28px; padding: 32px 0; }
  .side { padding-top: 0; justify-self: start; }
  .name { font-size: 2.8rem; }
  .socials { grid-template-columns: repeat(6, 42px); }
  .side nav { flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .slideshow { min-height: 0; aspect-ratio: 4 / 3; width: 100%; }
  .cap h3 { font-size: 1.5rem; }
  .section { padding: 44px 0; }
  #projects { padding-top: 32px; }
  .about, .browse { grid-template-columns: 1fr; gap: 32px; }
  .about .headshot { justify-self: start; }
  #about { padding: 38px 0; }
  .contact form { grid-template-columns: 1fr; }
}

/* Slides already show the title in the caption */
.slide .ph span { display: none; }
.kicker { line-height: 1.4; display: block; }

/* Jazz guy */
.jazz { position: fixed; top: 0; z-index: 50; width: 110px; transform: translateY(-110%); transition: transform .6s cubic-bezier(.3,1.5,.6,1); }
.jazz.show { transform: translateY(8px); }
.jazz img { width: 100%; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); transform-origin: 50% 100%; animation: jazz-dance .6s steps(1) infinite; }
@keyframes jazz-dance {
  0%   { transform: scale(1, 1); }
  25%  { transform: scale(1.08, .82); }
  50%  { transform: scale(-1, 1); }
  75%  { transform: scale(-1.08, .82); }
}

/* Award ribbon across a project box's top-right corner */
.thumb { position: relative; }
.ribbon {
  position: absolute; top: 22px; right: -42px; z-index: 1; width: 170px;
  transform: rotate(45deg); text-align: center; padding: 5px 0;
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.ribbon.gold   { background: linear-gradient(#f3d77a, #d4a73a); }
.ribbon.silver { background: linear-gradient(#f1f1f1, #b9bcc1); }
.ribbon.bronze { background: linear-gradient(#e7b07f, #b4733f); }
.ribbon.plain  { background: var(--paper); }

/* Project-page photo slideshow */
.gallery { margin: 0 0 40px; }
.gallery-frame { position: relative; aspect-ratio: 3 / 2; border: 2px solid var(--ink); background: var(--ink); overflow: hidden; }
.g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .8s ease; }
.g-slide.active { opacity: 1; }
.gallery .dots { bottom: 16px; right: 20px; }
.gallery figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); }
.random-link { text-decoration: none; }
.random-link:hover { color: var(--accent); }
/* "Starring" box under a film */
.starring { border: 2px solid var(--ink); background: var(--raised); padding: 20px 24px; margin: -16px auto 40px; box-sizing: border-box; }
.starring h2 { font-size: 1.6rem; margin-bottom: 10px; }
.starring ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.starring li { font-size: 1.05rem; }
/* "Synopsis" box on script pages */
.synopsis { border: 2px solid var(--ink); background: var(--raised); padding: 20px 24px; margin: 0 0 24px; }
.synopsis h2 { font-size: 1.6rem; margin-bottom: 8px; }
.synopsis p { font-size: 1.08rem; max-width: 75ch; }
/* "Hi, I'm Arjun!" heading: bigger than other section titles */
.about-title { font-size: clamp(2.8rem, 6vw, 4.4rem); }
/* About section slides down out from under the "Writer, Filmmaker, Performer" band
   the first time it scrolls into view (class added by main.js) */
.tagline { position: relative; z-index: 2; background: var(--paper); }
#about { position: relative; z-index: 1; }
.js-reveal #about > .wrap { opacity: 0; transform: translateY(-120px); transition: transform 1s cubic-bezier(.2,.8,.2,1), opacity .9s ease; }
.js-reveal #about.in > .wrap { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal #about > .wrap { opacity: 1; transform: none; transition: none; } }
/* Tagline with video clips showing through the letters.
   The video sits behind a black layer with white letters blended with "multiply":
   black stays black, white letters show the video underneath. Works on phones too. */
.vidtext { padding: 0; background: #fff; overflow: hidden; isolation: isolate; }
.vidtext video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; filter: brightness(1.15); pointer-events: none; }
.vidtext span { position: relative; z-index: 1; display: block; padding: 30px 16px; background: #000; color: #fff; mix-blend-mode: multiply; }
