/* =========================================================================
   Shona Dsouza — scrapbook collage portfolio
   ========================================================================= */
:root {
  --cream: #fff6ea;
  --cream-card: #fff8ea;
  --cream-tile: #f6e8cf;
  --maroon: #7a1f3d;
  --maroon-bright: #9a2a50;
  --maroon-deep: #5d1630;
  --pink-card: #fceaef;
  --ink: #43302b;
  --ink-soft: #8a6f60;
  --pill-text: #fbeedd;
  --line: rgba(122, 31, 61, 0.16);
  --shadow-obj: 0 6px 12px rgba(67, 48, 43, 0.16);
  --shadow-obj-hover: 0 16px 26px rgba(67, 48, 43, 0.26);
  --shadow-card: 0 30px 70px rgba(67, 48, 43, 0.34);
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  background-image: url("assets/background.png");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* desktop: single screen, no scroll */
}

/* ---- decorative stickers ---- */
.decor { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.sticker { position: absolute; filter: drop-shadow(0 4px 7px rgba(67, 48, 43, 0.14)); }
.star { width: 46px; animation: sway 7s ease-in-out infinite; }
.star-1 { top: 9%; left: 73%; width: 40px; animation-delay: -1s; }
.star-2 { top: 16%; left: 78%; width: 30px; animation-delay: -3s; }
.star-3 { top: 75%; left: 90%; width: 44px; animation-delay: -2s; }
.flower { top: 30%; left: 56%; width: 58px; animation: sway 9s ease-in-out infinite; }

/* =========================================================================
   Stage + identity
   ========================================================================= */
.stage {
  position: relative;
  height: 100vh;
  width: 100%;
  z-index: 2;
}

.identity {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -54%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(460px, 80vw);
  z-index: 5;
}

.identity-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0 0 0.6rem;
  color: var(--ink);
}

.identity-photo {
  width: clamp(150px, 17vw, 210px);
  height: auto;
  margin-bottom: 0.9rem;
  filter: drop-shadow(0 12px 22px rgba(67, 48, 43, 0.2));
}

.identity-tagline {
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin: 0 0 1.1rem;
}
.identity-tagline .sep { color: var(--maroon); margin: 0 0.25em; opacity: 0.7; }

/* "About Me" uses the serif to echo the name */
.about-btn {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  padding: 0.45em 1.5em;
}

/* ---- pills ---- */
.pill {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--maroon);
  color: var(--maroon);
  background: transparent;
  border-radius: 999px;
  padding: 0.5em 1.2em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.pill:hover { transform: translateY(-1px); }
.pill--solid { background: var(--maroon); color: var(--pill-text); border-color: var(--maroon); }
.pill--solid:hover { background: var(--maroon-bright); border-color: var(--maroon-bright); }

/* =========================================================================
   Collage objects
   ========================================================================= */
.object {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(112px, 12vw, 158px);
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  z-index: 3;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.object.dragging { cursor: grabbing; z-index: 20; }

.object__floom { display: block; animation: float 6s ease-in-out infinite; }

.object__inner {
  display: block;
  position: relative;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 6px 12px rgba(67, 48, 43, 0.16));
}
.object:hover .object__inner,
.object:focus-visible .object__inner {
  transform: rotate(var(--rot, 0deg)) translateY(-10px) scale(1.05);
  filter: drop-shadow(0 16px 26px rgba(67, 48, 43, 0.26));
}

.object__img { width: 100%; height: auto; display: block; pointer-events: none; user-select: none; }

.object__label {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  background: var(--maroon);
  color: var(--pill-text);
  font-family: "Inter", sans-serif;
  font-size: clamp(0.72rem, 1vw, 0.86rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 0.22em 0.85em;
  border-radius: 999px;
  box-shadow: 0 4px 9px rgba(67, 48, 43, 0.22);
  transition: background 0.2s ease;
}
.object:hover .object__label { background: var(--maroon-bright); }

.hint {
  position: fixed;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-7px) rotate(3deg); }
}

/* =========================================================================
   Content card overlay
   ========================================================================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: clamp(2rem, 7vh, 4.5rem) clamp(1.25rem, 5vw, 4rem) clamp(4rem, 12vh, 6.5rem);
}
.overlay[hidden] { display: none; }
/* backdrop mirrors the page (cream + hearts) so opening feels like a new page */
.overlay__backdrop {
  position: absolute;
  inset: 0;
  background-color: var(--cream);
  background-image: url("assets/background.png");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
}

.card {
  position: relative;
  background: var(--pink-card);
  border-radius: 22px;
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  padding: clamp(1.1rem, 2.4vh, 1.6rem) clamp(1.4rem, 4vw, 2.8rem) clamp(1.4rem, 3vh, 2rem);
  box-shadow: 16px 20px 46px rgba(94, 68, 68, 0.26);
  animation: cardIn 0.26s ease;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.back-btn {
  align-self: flex-start;
  flex: none;
  background: var(--maroon);
  color: var(--pill-text);
  border: 0;
  border-radius: 999px;
  padding: 0.42em 1.5em;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.back-btn:hover { background: var(--maroon-bright); transform: translateY(-1px); }

.card__scroll {
  flex: 1;
  overflow-y: auto;
  margin-top: 1.1rem;
  padding-right: 0.5rem;
}
.card__title {
  margin: 0 0 1.2rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  color: var(--maroon);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

/* ---- shared card content ---- */
.entry { padding: 0.95rem 0; border-bottom: 1px dashed var(--line); }
.entry:last-child { border-bottom: 0; }
.entry__top {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap;
}
.entry__role { margin: 0; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.entry__org { color: var(--maroon); font-weight: 600; }
.entry__dates { color: var(--ink-soft); font-size: 0.85rem; white-space: nowrap; }
.entry__loc { color: var(--ink-soft); font-size: 0.85rem; margin: 0.1rem 0 0; }
.entry__sum { margin: 0.5rem 0 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink); }

.tagrow { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.tag {
  font-size: 0.72rem;
  background: rgba(122, 31, 61, 0.1);
  color: var(--maroon);
  border-radius: 999px;
  padding: 0.18em 0.7em;
}

/* certificates */
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.cert-tile {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cert-name { font-family: "Fraunces", serif; font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.cert-meta { color: var(--ink-soft); font-size: 0.82rem; }
.cert-tile .pill { align-self: flex-start; margin-top: auto; font-size: 0.78rem; padding: 0.35em 0.9em; }

/* projects */
.proj { padding: 0.85rem 0; border-bottom: 1px dashed var(--line); }
.proj:last-child { border-bottom: 0; }
.proj__title { margin: 0; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.05rem; }
.proj__year { color: var(--maroon); font-size: 0.82rem; margin: 0.1rem 0 0; }
.proj__sum { margin: 0.45rem 0 0; font-size: 0.93rem; line-height: 1.55; }
.proj__more {
  margin-top: 0.5rem;
  background: none; border: 0; padding: 0;
  color: var(--maroon); font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.proj__more:hover { text-decoration: underline; }
.proj__detail { margin-top: 0.6rem; display: grid; gap: 0.5rem; }
.proj__detail.is-hidden { display: none; }
.sao__label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--maroon); font-weight: 600;
}
.sao__text { margin: 0.1rem 0 0; font-size: 0.92rem; color: var(--ink); }

/* publications */
.pub { padding: 0.85rem 0; border-bottom: 1px dashed var(--line); }
.pub:last-child { border-bottom: 0; }
.pub__title { margin: 0; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.pub__cite { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--ink-soft); font-style: italic; }
.pub__doi { display: inline-block; margin-top: 0.5rem; color: var(--maroon); font-weight: 600; font-size: 0.85rem; text-decoration: none; }
.pub__doi:hover { text-decoration: underline; }

/* what's cooking */
.cook-intro { margin: 0 0 1rem; color: var(--ink-soft); }
.cook-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.cook-tile { background: rgba(255, 255, 255, 0.55); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.cook-tile img { width: 100%; height: 130px; object-fit: cover; display: block; background: #ecd9bb; }
.cook-tile figcaption { padding: 0.6rem 0.8rem; font-size: 0.85rem; color: var(--ink); }

/* reading */
.book { display: flex; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.book:last-child { border-bottom: 0; }
.book__cover {
  flex: none;
  width: 70px; height: 100px;
  border-radius: 8px;
  background: linear-gradient(135deg, #b9d0c6, #d8c2a2);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0.4rem;
  font-family: "Fraunces", serif; font-size: 0.62rem; color: #4a3a2f;
  box-shadow: 0 4px 9px rgba(67, 48, 43, 0.2);
}
.book__title { margin: 0; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.02rem; }
.book__author { margin: 0.1rem 0 0; color: var(--maroon); font-size: 0.85rem; }
.book__note { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--ink); line-height: 1.5; }

/* writing */
.writing-item { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px dashed var(--line); }
.writing-item:last-child { border-bottom: 0; }
.writing__title { margin: 0; font-family: "Fraunces", serif; font-weight: 600; font-size: 1rem; }
.writing__meta { margin: 0.15rem 0 0; color: var(--ink-soft); font-size: 0.82rem; }
.writing__status { flex: none; font-size: 0.74rem; color: var(--maroon); border: 1px solid var(--line); border-radius: 999px; padding: 0.2em 0.7em; }

.about-sum { margin: 0 0 1rem; font-size: 1rem; line-height: 1.65; }
.about-list { margin: 0 0 1.2rem; padding-left: 1.1rem; }
.about-list li { margin-bottom: 0.35rem; }
.about-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* =========================================================================
   Mobile — abandon collage, switch to vertical scroll
   ========================================================================= */
@media (max-width: 860px) {
  body { overflow-y: auto; overflow-x: hidden; }
  .decor, .hint { display: none; }

  .stage {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.4rem;
    padding: 2.5rem 1.2rem 7rem;
  }

  .identity {
    position: static;
    transform: none;
    width: 100%;
    max-width: 460px;
  }

  .object {
    position: static !important;
    transform: none !important;
    width: min(440px, 86%);
    cursor: pointer;
    margin: 0 auto;
  }
  .object__floom { animation: none; }
  .object__inner { transform: none !important; }
  .object:hover .object__inner,
  .object:focus-visible .object__inner { transform: translateY(-4px) !important; }
  .object__label { bottom: -12px; font-size: 0.85rem; padding: 0.28em 1em; }

  .cert-grid, .cook-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .object__floom, .star, .flower { animation: none !important; }
  .card { animation: none; }
}
