/* ============================================================
   anushreeaggarwal.com  —  warm polaroid + pixel-sizzle
   ============================================================ */

:root {
  --bg:      #efece6;      /* warm off-white */
  --bg-2:    #e9e5dd;
  --ink:     #1c1a17;      /* near-black warm */
  --ink-2:   #6b655c;      /* muted gray-brown */
  --ink-3:   #9a9388;
  --card:    #ffffff;
  --line:    #d9d3c8;
  --accent:  #e07a3f;      /* sunrise orange */
  --accent-2:#f0b64a;
  --sky:     #6ea2d6;      /* dawn blue */
  --shadow:  0 18px 40px -20px rgba(40,30,20,.35);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}

/* subtle film grain over everything */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 6rem) clamp(1.25rem, 5vw, 3rem) 4rem;
}

/* ---------------- back link (subpages) ---------------- */
.back {
  display: inline-block;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: color .18s, border-color .18s;
}
.back:hover { color: var(--ink); border-color: var(--accent); }

/* ---------------- hero ---------------- */
.hero { margin-bottom: clamp(3.5rem, 9vw, 7rem); }
.hero-cols {
  position: relative;              /* anchors the sari arrow */
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr;   /* photo shrinks on small landscape */
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4rem);
}

/* hand-drawn arrow from "This sari" back to the photo */
.sari-arrow {
  position: absolute;
  top: -6px;
  left: 175px;
  width: 120px;
  height: auto;
  transform: scaleX(-1) rotate(4deg);   /* mirror so the head points at the photo */
  pointer-events: none;
  z-index: 3;
}
@media (max-width: 760px) { .sari-arrow { display: none; } }
.hero-text { max-width: 62ch; }

.hero-photo {
  position: relative;
  order: -1;                 /* photo on the LEFT */
  justify-self: start;
  width: 100%;
  max-width: 260px;
  margin-top: 2rem;          /* start level with "…Shaku" in the story */
}
.hero-photo img,
.hero-photo .pframe {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;       /* both photos the same size */
  border-radius: 6px;
  background-color: var(--bg-2);
  box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.hero-photo img { object-fit: cover; }
/* Anushree's portrait as a background so the zoom can be dialed exactly.
   background-size 100% = "cover" for this photo; 98% = zoomed out 2%. */
.pframe {
  background-image: url("images/anushree.jpg");
  background-repeat: no-repeat;
  background-position: 50% 22%;
  background-size: 98% auto;
}
.hero-shaku img { object-position: 53% 38%; }    /* frame Shaku */
.hero-photo img:hover,
.pframe:hover { transform: scale(1.02); }

.hero-shaku { margin: 1.4rem 0 0; }
.hero-shaku figcaption {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: .55rem;
}

/* Only stack the hero on narrow PORTRAIT phones. Landscape (and anything
   wider) keeps photo + text side by side. */
@media (max-width: 700px) and (orientation: portrait) {
  .hero-cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-photo { justify-self: start; max-width: 200px; margin-top: 0; }
}

.name {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 0 clamp(1.8rem, 4vw, 2.8rem);
}
.dot { display: none; }

.tagline {
  font-size: clamp(1.05rem, 2.1vw, 1.4rem);
  color: var(--ink-2);
  font-weight: 400;
  margin: 0 0 1.8rem;
  max-width: 42ch;
}
.ilink {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  font-weight: 600;
  transition: background-size .2s;
}
.ilink:hover { background-size: 100% 100%; color: #fff; }

.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font-family: var(--mono); font-size: .9rem; }
.links a {
  text-decoration: none;
  color: var(--ink-2);
  display: inline-flex;
  gap: .25rem;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color .18s, border-color .18s;
}
.links a span { color: var(--ink-3); transition: transform .18s; display: inline-block; }
.links a:hover { color: var(--ink); border-color: var(--accent); }
.links a:hover span { transform: translate(2px,-2px); color: var(--accent); }

/* ---------------- blocks ---------------- */
.block { margin-bottom: clamp(3.5rem, 8vw, 6.5rem); }
.block-head { margin-bottom: 1.8rem; }
.block h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}
.sub { color: var(--ink-2); margin: .35rem 0 0; font-size: 1rem; }

/* ---------------- post-it wall ---------------- */
.postit-wall {
  position: relative;                 /* anchors the mush overlay */
  display: grid;
  grid-template-columns: repeat(5, 1fr);   /* 5 per row */
  gap: clamp(.9rem, 1.8vw, 1.5rem);
  padding-top: .5rem;
}
.postit {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;                 /* uniform square, scales to fit 5 across */
  padding: 1rem .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: clamp(1.02rem, 1.45vw, 1.28rem);
  line-height: 1.2;
  color: #3a352c;
  overflow: hidden;
  box-shadow: 2px 7px 16px -7px rgba(40, 30, 20, .42);
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .25s, opacity .5s ease;
}
@media (max-width: 900px) { .postit-wall { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) {
  .postit-wall { grid-template-columns: repeat(2, 1fr); }
  /* let notes grow to fit their text on small phones instead of clipping */
  .postit { aspect-ratio: auto; height: auto; min-height: 42vw; font-size: 1.06rem; padding: 1rem .85rem; }
}
.postit span { display: block; width: 100%; }   /* one flex item so text flows normally */
/* hidden until the mush builds them */
.postit.pending { opacity: 0; box-shadow: none; }
/* a little strip of tape */
.postit::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 52px;
  height: 20px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 1px 3px rgba(40, 30, 20, .12);
}
/* 8 distinct sticky-note colors + tilts (cycles every 8) */
.postit:nth-child(8n+1) { background: #fdf0a4; transform: rotate(-3deg); }   /* yellow */
.postit:nth-child(8n+2) { background: #ffcfe0; transform: rotate(2.2deg); }  /* pink */
.postit:nth-child(8n+3) { background: #c9ead0; transform: rotate(-1.6deg); } /* green */
.postit:nth-child(8n+4) { background: #c3e2f6; transform: rotate(2.8deg); }  /* blue */
.postit:nth-child(8n+5) { background: #ffd7a8; transform: rotate(-2.2deg); } /* apricot */
.postit:nth-child(8n+6) { background: #e3d3f5; transform: rotate(1.7deg); }  /* lavender */
.postit:nth-child(8n+7) { background: #b9ebe4; transform: rotate(-2.6deg); } /* mint */
.postit:nth-child(8n+8) { background: #ffc7c2; transform: rotate(2deg); }    /* coral */
.postit:nth-child(9)     { background: #ffce85; transform: rotate(2.4deg); } /* Bhagavad Gita note — marigold */
.postit:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.05);
  box-shadow: 4px 14px 26px -10px rgba(40, 30, 20, .5);
  z-index: 2;
}

/* ---------------- gallery (legacy, unused) ---------------- */
.gallery {
  position: relative;                 /* anchors the mush overlay */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.6rem);
}

/* the single pixel-mush canvas, drawn over the whole gallery */
.mush {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
}
.mush.armed { pointer-events: auto; cursor: pointer; }

/* "click to develop" hint over the resting mush */
.mush-hint {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 41;
  pointer-events: none;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  padding: .5rem .9rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px -8px rgba(40, 30, 20, .4);
  white-space: nowrap;
  animation: hintpulse 1.8s ease-in-out infinite;
  transition: opacity .3s ease;
}
.mush-hint.gone { opacity: 0; }
@keyframes hintpulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: .85; }
  50%      { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .mush-hint { animation: none; }
}

.card {
  background: var(--card);
  padding: 12px 12px 16px;
  border-radius: 4px;
  box-shadow: var(--shadow);
  transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .35s, opacity .55s ease;
  will-change: transform, opacity;
}
/* before the mush resolves: card invisible, photo area blank */
.card.pending { opacity: 0; box-shadow: none; }
.card .cap { opacity: 0; transition: opacity .5s ease .15s; }
.card.done .cap { opacity: 1; }
.card:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.015) !important;
  box-shadow: 0 26px 50px -22px rgba(40,30,20,.45);
  z-index: 5;
}

.card .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
}
.card canvas { display: block; width: 100%; height: 100%; }

.card .cap { padding: 0 4px; }
.card .cap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 12px 0 4px;
}
.card .cap .who { color: var(--ink-2); font-size: .92rem; margin: 0; }
.card .cap .metarow {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--ink-3);
  margin-top: 12px;
  letter-spacing: .02em;
}

/* ---------------- about / prose ---------------- */
.prose {
  max-width: 60ch;
  text-align: left;          /* ragged right — even, natural word spacing */
}
.hero-prose { margin-top: 0; margin-bottom: 1.8rem; }
.hero-prose p:first-child { font-size: clamp(1.05rem, 1.8vw, 1.2rem); }
.prose p {
  margin: 0 0 1.15rem;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}
.prose p:first-child { color: var(--ink); font-weight: 500; }
.prose em { font-style: italic; color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  font-weight: 500;
  transition: background-size .2s;
}
.prose a:hover { background-size: 100% 100%; color: #fff; }
.prose strong a { font-weight: 600; }   /* bold like the award, still linked */

.ta-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.15rem;
  max-width: 60ch;
  text-align: left;          /* not justified — avoids stretched gaps */
}
.ta-list, .ta-list a { font-weight: 400; }   /* nothing in the TA list is bold */
.ta-list li {
  position: relative;
  padding: .5rem 0 .5rem 1.25rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.ta-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------------- advice ---------------- */
.advice {
  list-style: none;
  counter-reset: adv;
  padding: 0;
  margin: 0;
  max-width: 64ch;
}
.advice li {
  counter-increment: adv;
  position: relative;
  padding: 1rem 0 1.05rem 2.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.advice li::before {
  content: counter(adv);
  position: absolute;
  left: 0;
  top: 1.15rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--accent);
}
.advice strong { color: var(--ink); font-weight: 600; }

/* ---------------- now / notes / beliefs ---------------- */
.now-list, .beliefs { list-style: none; padding: 0; margin: 0; max-width: 640px; }
.now-list li, .beliefs li {
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.now-em { color: var(--ink); font-weight: 600; margin-right: .5rem; }
.beliefs li { color: var(--ink); font-size: 1.05rem; }
.beliefs li::before { content: "✷"; color: var(--accent); margin-right: .7rem; }
.beliefs .by { color: var(--ink-3); font-style: italic; margin-left: .3rem; }

.notes { list-style: none; padding: 0; margin: 0; max-width: 640px; }
.notes li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
}
.notes a {
  text-decoration: none;
  font-weight: 500;
  font-size: 1.08rem;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .25s;
}
.notes a:hover { background-size: 100% 1.5px; }
.notes .meta { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); white-space: nowrap; }

/* expandable Writing entry (accordion) */
.notes li.note-open { display: block; }
.note-open summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-weight: 500;
  font-size: 1.08rem;
}
.note-open summary::-webkit-details-marker { display: none; }
.note-open summary:hover { color: var(--accent); }
.note-open .chev {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--ink-3);
  transition: transform .25s ease;
}
.note-open details[open] .chev { transform: rotate(45deg); }   /* + turns into × */
.note-open details[open] summary { color: var(--ink); }
.note-open .advice { margin-top: 1.4rem; }

/* ---------------- footer ---------------- */
.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .85rem;
}
.foot-mono { font-family: var(--mono); color: var(--ink-3); }

@media (max-width: 560px) {
  .foot { flex-direction: column; }
}
