/* Custom styles for Janice Lee portfolio */

html {
  font-family: 'Work Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #1c1c1c;
}

h1,
h2,
h3,
.font-display {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Scroll fade-in */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.12s;
}

.reveal-delay-2 {
  transition-delay: 0.22s;
}

.reveal-delay-3 {
  transition-delay: 0.32s;
}

/* Floating tags */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.float-tag {
  animation: float 4.5s ease-in-out infinite;
}

.float-tag:nth-child(2) {
  animation-delay: 0.8s;
}

.float-tag:nth-child(3) {
  animation-delay: 1.6s;
}

/* Joy carousel */
.joy-track {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.joy-track::-webkit-scrollbar {
  display: none;
}

.joy-slide {
  scroll-snap-align: start;
}

/* Image zoom */
.img-zoom {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.group:hover .img-zoom {
  transform: scale(1.04);
}

/* Hero — warm editorial composition */
.hero {
  background-color: #f1f1f7;
}

.hero-wash {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background:
    radial-gradient(ellipse 70% 90% at 78% 30%, rgba(246, 216, 216, 0.55), transparent 70%),
    linear-gradient(180deg, transparent 0%, #f3e8df 100%);
  pointer-events: none;
}

.hero-wash::after {
  content: '';
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -1px;
  height: 4.5rem;
  background: #f3e8df;
  border-radius: 55% 45% 0 0 / 100% 100% 0 0;
}

.hero-orbit {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(28, 28, 28, 0.07);
  border-radius: 9999px;
}

.hero-orbit--far {
  top: 8%;
  right: -6%;
  width: min(34rem, 58vw);
  height: min(34rem, 58vw);
  border-style: dashed;
  border-color: rgba(28, 28, 28, 0.08);
}

.hero-name {
  font-style: italic;
  font-weight: 500;
}

.hero-rule {
  width: 2.75rem;
  height: 1px;
  background: rgba(28, 28, 28, 0.22);
}

.hero-intro {
  display: grid;
  gap: 1.1rem;
}

.hero-intro p {
  margin: 0;
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: 0.01em;
  color: #5c5c5c;
}

.hero-intro em {
  font-style: italic;
  font-weight: 500;
  color: #1c1c1c;
}

.hero-media {
  position: relative;
  padding: 1.1rem 0.85rem 1.35rem;
}

.hero-media-back {
  position: absolute;
  inset: 1.65rem 0 0.35rem 1.35rem;
  background: #f6d8d8;
  border-radius: 999px 999px 1.1rem 1.1rem;
  opacity: 0.72;
  z-index: 0;
}

.hero-ring {
  position: absolute;
  z-index: 0;
  inset: 0.35rem -0.55rem -0.2rem 0.25rem;
  border: 1px solid rgba(28, 28, 28, 0.12);
  border-radius: 999px 999px 1.35rem 1.35rem;
  pointer-events: none;
}

.hero-arch {
  position: relative;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  width: 100%;
  border-radius: 999px 999px 0.85rem 0.85rem;
  background: #f3e8df;
}

.hero-spark {
  position: absolute;
  z-index: 2;
  width: 0.55rem;
  height: 0.55rem;
  background: #e5b4b4;
  opacity: 0.7;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  pointer-events: none;
}

.hero-spark--one {
  top: 12%;
  left: 0;
  animation: float 5.5s ease-in-out infinite;
}

.hero-spark--two {
  right: 4%;
  bottom: 18%;
  width: 0.4rem;
  height: 0.4rem;
  background: #d9c8ba;
  opacity: 0.65;
  animation: float 4.8s ease-in-out infinite;
  animation-delay: 1.1s;
}

@media (min-width: 640px) {
  .hero-media {
    padding: 1.35rem 1rem 1.6rem;
  }
}

@media (min-width: 1024px) {
  .hero-media {
    max-width: 21rem;
  }
}

/* Dusty rose vertical stripes */
.stripe-rose {
  background-color: #fffefb;
  background-image: repeating-linear-gradient(
    90deg,
    #f6d8d8 0,
    #f6d8d8 10px,
    #fffefb 10px,
    #fffefb 22px
  );
}

/* Soft page grain */
.grain::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 50;
}

/* Education vertical timeline — left-rail editorial markers */
.timeline {
  position: relative;
  margin: 0 auto;
  max-width: 36rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.375rem;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 1px;
  background: rgba(28, 28, 28, 0.15);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 0.75rem minmax(0, 1fr);
  column-gap: 1.35rem;
  align-items: start;
  padding-bottom: 2.85rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.2rem;
  border-radius: 9999px;
  border: 1px solid rgba(28, 28, 28, 0.28);
  background: #fffefb;
  box-shadow: inset 0 0 0 2.5px #fffefb;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 9999px;
  background: #1c1c1c;
  transform: translate(-50%, -50%);
}

.timeline-content {
  min-width: 0;
  padding-top: 0;
}

.timeline-year {
  display: block;
  margin: 0 0 0.55rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.35;
  color: #5c5c5c;
}

@media (min-width: 640px) {
  .timeline {
    max-width: 38rem;
  }

  .timeline-item {
    column-gap: 1.6rem;
    padding-bottom: 3.15rem;
  }
}


/* Sticky navigation links */
.nav-link {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #1c1c1c;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}

.nav-link:hover {
  border-bottom-color: rgba(28, 28, 28, 0.35);
  opacity: 0.8;
}

@media (min-width: 640px) {
  .nav-link {
    font-size: 11px;
  }

}


/* Experience stories (image-first, future-photo-friendly) */
.story-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(28, 28, 28, 0.1);
  background: #fffefb;
  padding: 0.85rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.story-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(28, 28, 28, 0.07);
}

.story-leadership {
  border-top: 3px solid #f6d8d8;
}

.story-professional {
  border-top: 3px solid #c8c8d8;
}

.story-mixed {
  border-top: 3px solid #e6d9ca;
}

.story-media-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.45rem;
}

.story-media-main {
  grid-row: span 2;
}

.story-media {
  min-height: 84px;
  background: linear-gradient(135deg, #f1f1f7, #f3e8df);
  border: 1px dashed rgba(28, 28, 28, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a7a7a;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.story-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.95rem 0.35rem 0.4rem;
}

.story-substory {
  border: 1px solid rgba(28, 28, 28, 0.1);
  background: #fffefb;
  padding: 1rem;
}

.story-tag {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5c5c5c;
}

.story-role {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5c5c5c;
}

.story-copy {
  font-size: 0.92rem;
  line-height: 1.65;
  font-weight: 300;
  color: #5c5c5c;
  flex: 1;
}

/* Flip card — equal size closed; expands when open */
.story-flip {
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: none;
  box-shadow: none;
  perspective: 1400px;
  transition: transform 0.35s ease;
}

.story-flip:hover {
  transform: none;
  box-shadow: none;
}

.story-flip:focus-visible {
  outline: 2px solid rgba(28, 28, 28, 0.35);
  outline-offset: 4px;
}

.story-flip-inner {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition:
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    min-height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-flip.is-flipped {
  grid-column: 1 / -1;
  z-index: 2;
}

.story-flip.is-flipped .story-flip-inner {
  transform: rotateY(180deg);
  min-height: 36rem;
}

.story-flip-face {
  border: 1px solid rgba(28, 28, 28, 0.1);
  border-top: 3px solid #f6d8d8;
  background: #fffefb;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: box-shadow 0.35s ease;
}

.story-flip.story-professional .story-flip-face {
  border-top-color: #c8c8d8;
}

.story-flip.story-mixed .story-flip-face {
  border-top-color: #e6d9ca;
}

.story-flip:hover .story-flip-face {
  box-shadow: 0 12px 32px rgba(28, 28, 28, 0.07);
}

.story-flip-front {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 0.85rem;
  box-sizing: border-box;
}

.story-flip-back {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  transform: rotateY(180deg);
  box-sizing: border-box;
}

.story-flip-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
}

.story-flip.is-flipped .story-flip-photos {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  justify-items: center;
  gap: 1rem;
  min-height: 31rem;
  padding: 0.35rem;
  background: #faf4ef;
}

.story-flip--single.is-flipped .story-flip-photos {
  grid-template-columns: 1fr;
  min-height: 34rem;
}

.story-flip-photo {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  background: #f3e8df;
}

.story-flip.is-flipped .story-flip-photo {
  width: 100%;
  height: auto;
  max-height: 30rem;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.story-flip--single.is-flipped .story-flip-photo {
  max-height: 32rem;
}

.story-flip-hint {
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.story-flip-hint--back {
  margin-top: 0.75rem;
  padding-top: 0;
  text-align: center;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .story-flip-inner {
    transition: none;
  }
}

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

  .story-media-main {
    grid-row: auto;
  }

  .story-flip.is-flipped .story-flip-inner {
    min-height: 48rem;
  }

  .story-flip.is-flipped .story-flip-photos {
    grid-template-columns: 1fr;
    min-height: 42rem;
    overflow-y: auto;
  }

  .story-flip--single.is-flipped .story-flip-inner {
    min-height: 40rem;
  }

  .story-flip--single.is-flipped .story-flip-photos {
    min-height: 34rem;
  }

  .story-flip.is-flipped .story-flip-photo {
    max-height: 22rem;
  }

  .story-flip--single.is-flipped .story-flip-photo {
    max-height: 30rem;
  }
}

/* ——— Research article page ——— */
.research-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 241, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(28, 28, 28, 0.06);
}

.research-hero {
  background-color: #f1f1f7;
}

.research-hero-wash {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background:
    radial-gradient(ellipse 65% 80% at 15% 40%, rgba(246, 216, 216, 0.45), transparent 70%),
    linear-gradient(180deg, transparent 10%, #f3e8df 100%);
  pointer-events: none;
}

.research-article {
  color: #1c1c1c;
}

.research-lede {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.research-summary {
  border-left: 2px solid rgba(28, 28, 28, 0.18);
  padding: 0.25rem 0 0.25rem 1.25rem;
  background: transparent;
}

.research-section {
  margin-top: 3.25rem;
}

.research-section h2 {
  margin-bottom: 1.25rem;
}

.research-section p,
.research-section li {
  margin-top: 1rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: #5c5c5c;
}

.research-section ul {
  margin: 1rem 0 0.25rem;
  padding-left: 1.15rem;
  list-style: disc;
}

.research-section blockquote {
  margin: 1.75rem 0;
  padding: 1rem 0 1rem 1.25rem;
  border-left: 2px solid rgba(229, 180, 180, 0.9);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
  color: #1c1c1c;
}

.research-figure {
  margin: 2rem 0;
}

.research-figure img {
  width: 100%;
  height: auto;
  background: #FFFEFB;
  border: 1px solid rgba(28, 28, 28, 0.06);
}

.research-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.55;
  color: #8a8a8a;
}

.research-figure figcaption a {
  color: #1c1c1c;
  text-decoration: underline;
  text-decoration-color: rgba(28, 28, 28, 0.28);
  text-underline-offset: 0.15em;
  transition: text-decoration-color 0.2s ease;
}

.research-figure figcaption a:hover {
  text-decoration-color: rgba(28, 28, 28, 0.7);
}

.research-pull {
  margin: 1.75rem 0;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.4;
  color: #1c1c1c;
}

.research-sources {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(28, 28, 28, 0.1);
}

/* Homepage research card */
.research-card {
  display: block;
  background: rgba(255, 254, 251, 0.82);
  border: 1px solid rgba(28, 28, 28, 0.08);
  padding: 1.75rem 1.5rem 1.6rem;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    transform 0.3s ease;
}

.research-card:hover {
  border-color: rgba(28, 28, 28, 0.22);
  background: #FFFEFB;
  transform: translateY(-2px);
}

.research-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 1.1rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.research-card-cta {
  margin-top: 1.35rem;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1c1c1c;
  border-bottom: 1px solid rgba(28, 28, 28, 0.25);
  padding-bottom: 0.15rem;
}

.research-card:hover .research-card-cta {
  border-bottom-color: rgba(28, 28, 28, 0.55);
}

@media (min-width: 640px) {
  .research-card {
    padding: 2.1rem 2rem 1.9rem;
  }
}
