/* ============================================================
   Srishti Gangolly — base styles
   Warm editorial / diary aesthetic
   ============================================================ */

:root {
  --cream:   #F4EFE4;
  --paper:   #FBF8F1;
  --ink:     #211C18;
  --muted:   #8C8275;
  --border:  #E4DDCE;
  --oxblood: #420001;
  --forest:  #1A3A2A;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { max-width: 100%; }

/* ------------------------------------------------------------
   NAV
   ------------------------------------------------------------ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 5rem;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: padding .45s cubic-bezier(.2,.7,.2,1),
              background .45s ease,
              border-color .45s ease;
}
nav.scrolled {
  padding: 0.55rem 5rem;
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
.nav-logo { display: block; line-height: 0; }
.nav-logo img { transition: transform .45s cubic-bezier(.34,1.56,.34,1), filter .35s ease; }
nav.scrolled .nav-logo img { transform: scale(0.84); }
.nav-logo:hover img,
nav.scrolled .nav-logo:hover img {
  transform: scale(1.14) rotate(-3deg);
  filter: drop-shadow(0 7px 14px rgba(26,22,20,0.22));
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav-links a {
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--muted);
  padding: 0.25rem 0;
  transition: color .3s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--oxblood);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--ink);
  transition: transform .35s ease, opacity .35s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------
   PAGE CURTAIN  (page-to-page transition)
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   SHARED HEADINGS / CONTACT  (used by about + index)
   ------------------------------------------------------------ */
.section-heading {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--ink);
}
.section-heading em { font-style: italic; font-weight: 300; color: var(--oxblood); }

#contact {
  background: #1C1814;
  border-top: 1px solid var(--ink);
  padding: 3.4rem 2rem 2.8rem;
  text-align: center;
}
#contact .section-heading {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  color: var(--paper);
}
#contact .section-heading em { color: #E8A598; }
.contact-sub {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(244,239,228,0.6);
  margin: 1rem 0 1.8rem;
}
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}
.contact-link {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1),
              background .35s ease, color .35s ease, box-shadow .35s ease;
}
.contact-link.primary {
  background: var(--oxblood);
  color: var(--paper);
  box-shadow: 0 6px 18px rgba(66,0,1,0.18);
}
.contact-link.primary:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(66,0,1,0.28); }
.contact-link.outline {
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.contact-link.outline:hover { transform: translateY(-3px); background: var(--ink); color: var(--paper); }

/* dark footer button treatment — all three identical, matching the bg */
#contact .contact-links { margin-bottom: 2rem; }
#contact .contact-link {
  background: #1C1814;
  border: 1.5px solid rgba(244,239,228,0.45);
  color: var(--paper);
  box-shadow: none;
}
#contact .contact-link:hover {
  transform: translateY(-3px);
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.footer-note {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: rgba(244,239,228,0.4);
}
.footer-note em { font-style: italic; }

/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  nav { padding: 0.9rem 1.25rem; }
  nav.scrolled { padding: 0.6rem 1.25rem; }
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(74vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.8rem;
    padding: 2rem 2.4rem;
    background: var(--paper);
    box-shadow: -12px 0 40px rgba(26,22,20,0.14);
    transform: translateX(100%);
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.3rem; font-family: 'Fraunces', serif; }
}

/* ------------------------------------------------------------
   TYPEWRITER CURSOR
   ------------------------------------------------------------ */
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------
   REDUCED MOTION
   ------------------------------------------------------------ */
/* ============================================================
   HOME PAGE
   ============================================================ */
.home-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 4rem);
  padding: 9rem clamp(1.5rem, 5vw, 5rem) 4rem;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.home-hero-text { flex: 0 1 620px; min-width: 0; }
@media (min-width: 1001px) {
  .home-hero-text { flex: 0 1 auto; }
  .home-title { white-space: nowrap; }
}
.hero-spark {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
  animation: sparkTwinkle 3.2s ease-in-out infinite;
}
@keyframes sparkTwinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(0deg); }
  50%      { opacity: 0.95; transform: scale(1.08) rotate(8deg); }
}
.home-eyebrow {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.4rem;
}
.home-eyebrow::before { content:''; width:1.5rem; height:1px; background:var(--oxblood); display:block; }
.home-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.6rem, 4.8vw, 5.4rem);
  font-weight: 700; line-height: 0.94; letter-spacing: -0.035em;
  color: var(--ink); margin-bottom: 1.6rem;
}
.home-title em { font-style: italic; font-weight: 300; color: var(--oxblood); }
.home-sub {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.18rem; line-height: 1.8; color: #2E2E2E;
  max-width: 32rem; margin-bottom: 1.5rem;
}
.home-bio {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.05rem; line-height: 1.85; color: #2E2E2E;
  max-width: 32rem; margin-bottom: 1.8rem;
}
.home-bio em { font-style: italic; }

/* ---- Slide-to-unlock (vintage iOS) ---- */
.slide-unlock { width: 330px; max-width: 100%; margin-top: 0.75rem; }
.su-track {
  position: relative; height: 64px; border-radius: 999px;
  background: linear-gradient(#ece5d6, #f6f1e6);
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 7px rgba(26,22,20,0.13), inset 0 -1px 0 rgba(255,255,255,0.65);
  overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
}
.su-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding-left: 48px;
  font-family: 'DM Sans', sans-serif; font-size: 0.98rem; font-weight: 600; letter-spacing: 0.03em;
  white-space: nowrap; pointer-events: none;
  color: #bdb2a0;
  background: linear-gradient(100deg, #c2b7a6 38%, #fffaf0 50%, #c2b7a6 62%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: suShimmer 2.8s linear infinite;
  transition: opacity .2s ease;
}
@keyframes suShimmer { 0% { background-position: 165% 0; } 100% { background-position: -65% 0; } }
.su-knob {
  position: absolute; top: 5px; left: 5px; width: 54px; height: 54px;
  border-radius: 50%; border: none; padding: 0; cursor: grab;
  background: radial-gradient(circle at 50% 32%, #62100f, #420001);
  box-shadow: 0 5px 14px rgba(66,0,1,0.36), inset 0 1px 0 rgba(255,255,255,0.28);
  display: flex; align-items: center; justify-content: center;
  color: #F4EFE4; z-index: 2; touch-action: none;
  will-change: transform;
}
.su-knob:active { cursor: grabbing; }
.su-knob svg { width: 24px; height: 24px; }
.su-track.done { background: linear-gradient(#dfe9d6, #eef4e6); }
.su-track.done .su-text { opacity: 0; }
.su-track.done .su-knob { background: radial-gradient(circle at 50% 32%, #3a6b46, #2E5A3C); box-shadow: 0 5px 14px rgba(46,90,60,0.4); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* hero polaroid */
.home-hero-photo { flex: 0 0 auto; position: relative; }

/* ---- Section scaffold shared by home sections ---- */
.home-section { padding: 6rem 5rem; max-width: 1180px; margin: 0 auto; }
#experience.home-section { padding-top: 3rem; }
.home-section.alt { background: var(--paper); max-width: none; }
.home-section.alt > .home-section-inner { max-width: 1180px; margin: 0 auto; }

.eyebrow-tag {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.2rem;
}
.eyebrow-tag::before { content:''; width:1.4rem; height:1px; background:var(--oxblood); display:block; }

.home-h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700; line-height: 0.98; letter-spacing: -0.03em;
  color: var(--ink); margin-bottom: 2.6rem;
}
.home-h2 em { font-style: italic; font-weight: 300; color: var(--oxblood); }

/* ---- Experience list ---- */
.exp-group-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  margin: 2.6rem 0 0.4rem;
}
.exp-list { border-top: 1px solid var(--border); }
.exp-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr 132px;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: padding .4s cubic-bezier(.2,.7,.2,1), background .4s ease;
}
.exp-row::after {
  content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0;
  background: var(--oxblood); transition: width .5s cubic-bezier(.2,.7,.2,1);
}
.exp-row:hover { padding-left: 1.4rem; padding-right: 1.4rem; background: color-mix(in srgb, var(--oxblood) 3%, transparent); }
.exp-row:hover::after { width: 100%; }
.exp-row--has-tooltip { display: block; }
.exp-row--has-tooltip .exp-row-top {
  display: grid;
  grid-template-columns: 1fr 1.1fr 132px;
  align-items: baseline;
  gap: 1.5rem;
}
.exp-details {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.2,.7,.2,1);
}
.exp-details-inner {
  overflow: hidden;
}
.exp-row--has-tooltip:hover .exp-details,
.exp-row--has-tooltip.tapped .exp-details { grid-template-rows: 1fr; }
.exp-details-intro { font-size: 0.82rem; line-height: 1.65; color: var(--ink); margin: 0.9rem 0 0.6rem; border-top: 1px solid var(--border); padding-top: 0.85rem; max-width: 62%; }
.exp-details ul { list-style: none; padding: 0; margin: 0.9rem 0 0.3rem; display: flex; flex-direction: column; gap: 0.6rem; border-top: 1px solid var(--border); padding-top: 0.85rem; max-width: 62%; }
.exp-details li { font-size: 0.82rem; line-height: 1.65; color: var(--ink); padding-left: 1rem; position: relative; }
.exp-details li::before { content: '—'; position: absolute; left: 0; color: var(--oxblood); font-weight: 700; }
.exp-org {
  font-family: 'Fraunces', serif; font-size: 1.35rem; font-weight: 700;
  letter-spacing: -0.01em; color: var(--ink); line-height: 1.2;
}
.exp-role { font-size: 0.92rem; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.exp-dates { display: block; font-weight: 400; color: var(--muted); margin-top: 0.35rem; font-size: 0.8rem; letter-spacing: 0.04em; }
.exp-tag {
  justify-self: end; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.36rem 0.85rem; border-radius: 999px; white-space: nowrap;
}
.exp-tag--lead  { background: #D8E7D2; color: #2E5A3C; }
.exp-tag--teach { background: #E6E1D6; color: #6E665A; }
.exp-tag--coop  { background: #F0D9D9; color: #7C2A28; }

.resume-btn {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--oxblood); border: 1px solid var(--oxblood); border-radius: 999px;
  padding: 0.35rem 0.9rem; text-decoration: none; white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.resume-btn:hover { background: var(--oxblood); color: var(--paper); }

/* ---- Project cards ---- */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; margin-bottom: 4.5rem; }
.proj-card {
  border-radius: 10px; padding: 2rem 2.1rem; min-height: 230px;
  display: flex; flex-direction: column;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease;
}
.proj-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(26,22,20,0.16); }
.proj-card.neutral { background: #E2E3DC; color: var(--ink); }
.proj-card.maroon  { background: var(--oxblood); color: #F4EFE4; }
.proj-eyebrow {
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.4rem;
}
.proj-card.maroon .proj-eyebrow { color: rgba(244,239,228,0.6); }
.proj-title { font-family: 'Fraunces', serif; font-size: 1.7rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.proj-card.neutral .proj-title { color: var(--oxblood); }
.proj-card.maroon  .proj-title { color: #F4EFE4; }
.proj-desc {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 300;
  font-size: 1.02rem; margin-top: 0.45rem; opacity: 0.8;
}
.proj-tags { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.3rem; }
.proj-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
  font-size: 0.72rem; font-weight: 500; padding: 0.34rem 0.72rem; border-radius: 999px;
}
.proj-card.neutral .proj-chip { background: rgba(255,255,255,0.72); color: var(--ink); }
.proj-card.maroon  .proj-chip { background: rgba(244,239,228,0.15); color: #F4EFE4; }
.proj-foot { margin-top: auto; padding-top: 1.2rem; font-size: 0.78rem; color: #6E665A; }

/* ---- Certifications ---- */
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; margin-top: 2.4rem; }
.cert-card {
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 10px;
  padding: 1.6rem 1.8rem;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), border-color .45s ease, box-shadow .45s ease;
  display: flex; flex-direction: column;
}
.cert-card .cert-tags { flex: 1; align-content: flex-start; }
.cert-card:hover { transform: translateY(-5px); border-color: var(--oxblood); box-shadow: 0 14px 32px rgba(26,22,20,0.08); }
.cert-eyebrow { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--oxblood); margin-bottom: 0.5rem; }
.cert-title { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 700; color: var(--ink); margin-bottom: 1.1rem; }
.cert-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cert-chip { font-size: 0.72rem; font-weight: 500; white-space: nowrap; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0.32rem 0.72rem; }
.cert-credential-btn { align-self: flex-start; margin-top: 1rem; font-size: 0.8rem; font-weight: 600; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 0.4rem 1rem; text-decoration: none; transition: background 0.2s ease, color 0.2s ease; }
.cert-credential-btn:hover { background: var(--ink); color: #fff; }

/* ---- Teasers (about / writing) ---- */
.teaser {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.teaser-copy { max-width: 38rem; }
.teaser-copy p {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.08rem; line-height: 1.9; color: #2E2E2E; margin-top: 0.8rem;
}

/* ---- Writing band (forest accent) ---- */
.writing-band {
  background: var(--forest);
  max-width: none;
  padding-top: 4.5rem; padding-bottom: 6.5rem;
  border-top: 1px solid rgba(244,239,228,0.12);
  border-bottom: 1px solid rgba(244,239,228,0.12);
  position: relative;
  overflow: hidden;
}
.train-track {
  position: absolute;
  left: 0; bottom: 14px;
  pointer-events: none;
  animation: trainAcross 16s linear infinite;
  will-change: transform;
}
.train-doodle {
  display: block;
  width: 118px; height: auto;
  opacity: 0.5;
  animation: trainBob 0.9s ease-in-out infinite;
}
@keyframes trainAcross {
  from { transform: translateX(-150px); }
  to   { transform: translateX(calc(100vw + 150px)); }
}
@keyframes trainBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-3px) rotate(-0.6deg); }
}
.writing-band > .home-section-inner { max-width: 1180px; margin: 0 auto; }
.writing-band .eyebrow-tag { color: rgba(244,239,228,0.65); }
.writing-band .eyebrow-tag::before { background: #E8A598; }
.writing-band .home-h2 { color: var(--paper); margin-bottom: 0.4rem; }
.writing-band .home-h2 em { color: #E8A598; }
.writing-band .teaser-copy p {
  font-family: 'Kalam', cursive;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(244,239,228,0.9);
}
.writing-band .contact-link.primary {
  background: var(--paper); color: var(--forest);
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  align-self: flex-start;
  margin-top: -1rem;
}
.writing-band .contact-link.primary:hover { transform: translateY(-3px); background: #fff; }

@media (max-width: 1000px) {
  .home-hero { flex-direction: column; align-items: center; text-align: center; gap: 2.5rem; padding: 7rem 1.5rem 3rem; min-height: auto; }
  .home-hero-text { flex: 0 1 auto; }
  .home-eyebrow { justify-content: center; }
  .home-sub { margin-left: auto; margin-right: auto; }
  .slide-unlock { margin-left: auto; margin-right: auto; }
  .home-hero-photo { align-self: center; width: 220px !important; }
}

@media (max-width: 880px) {
  .home-section { padding: 4rem 1.5rem; }
  .home-section.alt { padding: 4rem 1.5rem; }

  /* stack exp rows vertically */
  .exp-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.1rem 0.5rem;
  }
  .exp-row--has-tooltip .exp-row-top {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }
  .exp-tag { align-self: flex-start; margin-bottom: 0.25rem; }
  .exp-org { font-size: 1.05rem; }
  .exp-role { font-size: 0.85rem; }
  .exp-dates { font-size: 0.75rem; margin-top: 0.15rem; }
  .exp-details-intro { max-width: 100%; }
  .exp-details ul { max-width: 100%; }
  .proj-grid, .cert-grid { grid-template-columns: 1fr; }
  .exp-group-label { font-size: 0.65rem; }
}

/* ============================================================
   TYPEWRITER CURSOR
   ============================================================ */

/* ------------------------------------------------------------
   REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
