/* olivia van — portfolio */

:root {
  --bg:       #ffffff;
  --ink:      #0a0a0a;
  --ink-mute: #6b6b6b;
  --line:     #d1d1d1;
  --card-bg:  #d9d9d9;
  --tag-bg:   #e6e6e6;
  --bubble:   #d9d9d9;

  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad-x: clamp(24px, 5vw, 64px);
  --max:   1040px;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 24px var(--pad-x);
  width: 100%;
}

.wordmark-wrap {
  position: relative;
  justify-self: start;
}

.wordmark {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.01em;
}

/* Email reveal on hover over the wordmark */
.wordmark__email {
  position: absolute;
  top: 100%;
  left: 0;
  /* transparent bridge so the cursor can travel from the name to the
     email without crossing a gap and dropping the hover state */
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.wordmark__email:hover { text-decoration: underline; text-underline-offset: 3px; }

.wordmark-wrap:hover .wordmark__email,
.wordmark-wrap:focus-within .wordmark__email {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav {
  justify-self: end;
  display: flex;
  gap: 48px;
}

.masthead__social {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  transition: opacity .2s ease;
}
.social-link:hover { opacity: .55; }
.social-link svg { width: 18px; height: 18px; display: block; }
.nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav a.is-active,
.nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px var(--pad-x) 120px;
  text-align: center;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.status__avatar {
  position: relative;
  display: block;
  width: 80px;
  height: 80px;
  flex: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.status__avatar:hover {
  transform: translateY(-2px);
}
.status__photo {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background-image: url("images/profile.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.status__moon {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}

.status__bubble {
  position: relative;
  background: var(--bubble);
  color: var(--ink);
  border-radius: 999px;
  padding: 11px 24px;
  font-size: 14.5px;
  min-width: 320px;
  text-align: left;
}
.status__text {
  display: inline-block;
  white-space: pre;
}
.status__caret {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  background: var(--ink);
  margin-left: 2px;
  vertical-align: -2px;
  animation: caret-blink 1s steps(2, end) infinite;
}
@keyframes caret-blink {
  to { opacity: 0; }
}
.status__tail {
  position: absolute;
  left: -5px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--bubble);
  border-radius: 2px;
  transform: translateY(-50%) rotate(45deg);
}

.hero__title {
  font-weight: 800;
  font-size: clamp(60px, 9.5vw, 104px);
  line-height: 1;
  letter-spacing: -.04em;
  margin: 0;
}

.hero__lede {
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.35;
  margin: 14px auto 0;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .hero__lede { white-space: normal; max-width: 32ch; }
}

/* ---------- Work grid ---------- */

.work {
  padding: 0 var(--pad-x) 96px;
  scroll-margin-top: 110px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
}
a.card,
.card--link {
  text-decoration: none;
  color: inherit;
  transition: border-color .25s ease, transform .25s ease;
}
a.card:hover,
.card--link:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

a.card,
a.card * {
  cursor: none;
}

.case-pill {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  padding: 7px 14px;
  background: #000;
  color: #fff;
  font-family: var(--font-sans, inherit);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transform: translate(-50%, -50%) scale(.85);
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  will-change: left, top, opacity, transform;
}

.case-pill__emoji {
  font-size: 13px;
  line-height: 1;
  display: inline-block;
}

.case-pill.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .15s ease, transform .15s ease;
}

@media (hover: none) {
  a.card,
  a.card * {
    cursor: auto;
  }
  .case-pill {
    display: none;
  }
}

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--ink);
  margin-bottom: 12px;
}

.card__cover {
  aspect-ratio: 5 / 4;
  background: var(--card-bg);
  border-radius: 4px;
  margin-bottom: 18px;
}

.card__cover--trimble {
  background-image: url("images/trimble-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card__cover--between {
  background-image: url("images/between-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card__cover--hearbat {
  background-image: url("images/hearbat-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card__cover--atlas {
  background-image: url("images/atlas-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card__cover--creative-juices {
  background-image: url("images/creative-juices-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card__cover--design-lecture-series {
  background-image: url("images/design-lecture-series-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.card__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.005em;
}

.card__tags {
  display: inline-flex;
  gap: 6px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  padding: 4px 8px;
  background: var(--tag-bg);
  border-radius: 4px;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}

.card__desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-mute);
  margin: 0;
}

/* ---------- About page ---------- */

.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--pad-x) 96px;
}

.about__intro {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
  padding: 40px 0 88px;
}

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 56ch;
}
.about__copy p {
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  color: var(--ink);
}

.about__portrait {
  display: block;
  aspect-ratio: 3 / 4;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--card-bg);
  background-image: url("images/about-portrait.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: none;
  transition: border-color .25s ease, transform .25s ease;
}
.about__portrait:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
@media (hover: none) {
  .about__portrait { cursor: auto; }
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink);
  margin: 0 0 22px;
}

/* Carousel */

.favorites {
  padding: 0 0 88px;
}

.fav-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 16px;
}

.fav-carousel__btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--tag-bg);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.fav-carousel__btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.fav-carousel__btn:active { transform: scale(.94); }
.fav-carousel__btn svg { width: 14px; height: 14px; display: block; }

.rotator {
  display: grid;
  align-items: start;
}
.rotator__slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.rotator__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s ease, transform .35s ease, visibility 0s;
}

.rotator__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.rotator__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  padding: 0;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.rotator__dot:hover { background: var(--ink-mute); }
.rotator__dot.is-active {
  background: var(--ink);
  transform: scale(1.15);
}

@media (max-width: 900px) {
  .rotator__slide { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .rotator__slide { grid-template-columns: 1fr; }
}

.fav-card {
  border: 1px solid var(--ink);
  border-radius: 12px;
  padding: 14px 16px 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fav-card__category {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink);
  margin: 0;
}

.fav-card__media {
  aspect-ratio: 5 / 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--card-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.fav-card__label {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin: 0 0 2px;
  color: var(--ink);
}

/* Experience timeline */

.experience {
  padding: 0 0 24px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.timeline__item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.timeline__item:last-child { border-bottom: 1px solid var(--line); }

.timeline__when {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-mute);
  padding-top: 6px;
}
.timeline__dates { color: var(--ink); }
.timeline__loc { color: var(--ink-mute); }

.timeline__role {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: -.005em;
}
.timeline__where {
  font-size: 13.5px;
  font-style: italic;
  margin: 0 0 10px;
  color: var(--ink);
}

.timeline__summary {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-mute);
  margin: 0;
  max-width: none;
}

@media (max-width: 720px) {
  .about__intro {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 0 64px;
  }
  .about__portrait { max-width: 320px; }
  .timeline__item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ---------- Footer ---------- */

.foot {
  background: var(--ink);
  color: #fff;
  padding: 56px var(--pad-x) 64px;
  margin-top: 40px;
}

.foot__inner {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.foot__say {
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0;
}

.foot__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  font-size: 14px;
  color: #fff;
}
.foot__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .foot__inner { flex-direction: column; align-items: flex-start; }
  .foot__links { text-align: left; }
}

/* ---------- Play page ---------- */
.play {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px var(--pad-x) 110px;
}

.play__head {
  text-align: center;
  margin-bottom: 40px;
}
.play__title {
  font-weight: 800;
  font-size: clamp(48px, 8vw, 84px);
  line-height: 1;
  letter-spacing: -.04em;
  margin: 0 0 18px;
}
.play__wip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 14px;
}
.play__wip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5a623;
  animation: wip-pulse 1.5s ease-in-out infinite;
}
@keyframes wip-pulse {
  0%, 100% { opacity: .3; transform: scale(.85); }
  50%      { opacity: 1;  transform: scale(1); }
}

/* Chat thread */
.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat__row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 82%;
  opacity: 0;
  transform: translateY(12px);
  animation: chat-in .55s cubic-bezier(.22,.61,.36,1) forwards;
}
.chat__row--in  { align-self: flex-start; }
.chat__row--out { align-self: flex-end; flex-direction: row-reverse; }

/* stagger each message in sequence */
.chat__row:nth-child(1) { animation-delay: .15s; }
.chat__row:nth-child(2) { animation-delay: .65s; }
.chat__row:nth-child(3) { animation-delay: 1.2s; }
.chat__row:nth-child(4) { animation-delay: 1.8s; }
.chat__row:nth-child(5) { animation-delay: 2.4s; }
.chat__row:nth-child(6) { animation-delay: 3s; }

.chat__avatar {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background-image: url("images/profile.png");
  background-size: cover;
  background-position: center;
}
.chat__avatar--ghost { visibility: hidden; }

.chat__bubble {
  background: var(--bubble);
  color: var(--ink);
  border-radius: 20px;
  padding: 11px 17px;
  font-size: 14.5px;
  line-height: 1.45;
}
.chat__row--in  .chat__bubble { border-bottom-left-radius: 6px; }
.chat__row--out .chat__bubble {
  background: var(--ink);
  color: #fff;
  border-bottom-right-radius: 6px;
}

@keyframes chat-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Typing indicator bubble */
.chat__typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 15px 17px;
}
.chat__typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-mute);
  animation: chat-typing 1.3s infinite ease-in-out;
}
.chat__typing span:nth-child(2) { animation-delay: .18s; }
.chat__typing span:nth-child(3) { animation-delay: .36s; }
@keyframes chat-typing {
  0%, 60%, 100% { transform: translateY(0);    opacity: .35; }
  30%           { transform: translateY(-5px); opacity: 1;   }
}

@media (prefers-reduced-motion: reduce) {
  .chat__row { opacity: 1; transform: none; animation: none; }
  .play__wip-dot, .chat__typing span { animation: none; }
}

/* ============================================================
   MOBILE FLOATING TABLE OF CONTENTS
   On phones the TOC collapses into a floating button that
   follows the user; tapping it opens the section list, and
   tapping a section smooth-scrolls there (handled in hearbat.js).
   The .toc__fab button is injected by JS and hidden on desktop.
   ============================================================ */

.toc__fab { display: none; }

@media (max-width: 768px) {
  /* The TOC shrinks to just the floating button in the corner.
     `aside.toc` keeps specificity above hearbat.css's `.toc` rule so the
     desktop border/background never bleeds into the mobile floating view. */
  aside.toc {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    pointer-events: none; /* only the button + panel catch taps */
  }

  /* The round floating button. */
  .toc__fab {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid var(--ink-mute);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease;
  }
  .toc__fab svg { width: 22px; height: 22px; }
  .toc.is-open .toc__fab { transform: scale(0.92); }

  /* The section list: absolutely positioned above the button, so it takes
     up NO space when closed (this is what fixes the empty rectangle). */
  .toc__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(74vw, 280px);
    margin: 0;
    background: #fff;
    border: 1px solid var(--ink);
    border-radius: 14px;
    padding: 16px 18px 14px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.20);
    pointer-events: auto;
    transform-origin: bottom right;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  .toc.is-open .toc__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  /* Roomier tap targets inside the panel. */
  .toc__panel .toc__title { margin-bottom: 10px; }
  .toc__panel .toc__list a { padding: 9px 0; font-size: 15px; }
}
