/* Home page. Desktop values first; the phone layout (below 1220px) is at the bottom. */

.logo { font-size: 24px; line-height: 1.2; font-weight: 600; color: var(--ink); }

/* ---------- Desktop nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__items { display: flex; gap: 48px; }
.nav__item {
  padding-top: 24px;
  font-size: 16px;
  line-height: 19px;
  font-weight: 600;
  color: rgba(39, 49, 64, 0.6);
  transition: color 0.2s ease;
}
.nav__item:hover { color: var(--ink); }
.nav__item.is-active { color: var(--ink); box-shadow: inset 0 4px 0 var(--ink); }

/* Download CV: black button at the end of the nav. Sits level with the nav text, which is pushed down by its 24px top padding. */
.cv-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-end;
  height: 38px;
  margin: 0 0 -10px -8px;
  padding: 0 16px;
  border-radius: 8px;
  background: #000;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.cv-button svg { width: 16px; height: 16px; flex: none; }
.cv-button:hover { background: var(--ink); transform: translateY(-1px); }

/* ---------- Phone header (hidden on desktop) ---------- */
.phone-nav { display: none; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  gap: 200px;
  padding-bottom: 120px;
}
.hero__texts { display: flex; flex-direction: column; gap: 10px; }
.hero__name,
.hero__roles {
  font-size: 88px;
  line-height: 107px;
  font-weight: 800;
}
.hero__name { color: var(--name); }
.hero__roles {
  height: 107px;
  overflow: hidden;
  color: var(--ink);
}
.hero__roles-track {
  display: flex;
  flex-direction: column;
  animation: roles 12.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.hero__roles-track > span { display: block; white-space: nowrap; }

/* 5 titles, each held ~2.1s then slid up in ~0.4s. Step n sits at -n/6 of the track (6 lines including the repeat). */
@keyframes roles {
  0%, 16.67%   { transform: translateY(0); }
  20%, 36.67%  { transform: translateY(-16.6667%); }
  40%, 56.67%  { transform: translateY(-33.3333%); }
  60%, 76.67%  { transform: translateY(-50%); }
  80%, 96.67%  { transform: translateY(-66.6667%); }
  100%         { transform: translateY(-83.3333%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__roles-track { animation: none; }
}

.timeline { display: flex; justify-content: space-between; }
.timeline__item { display: flex; flex-direction: column; gap: 10px; width: 234px; }
.timeline__label { font-size: 20px; line-height: 33px; font-weight: 600; color: var(--label); }
.timeline__text { font-size: 16px; line-height: 28px; color: var(--muted); }

/* ---------- Section titles ---------- */
.section-title {
  font-size: 88px;
  line-height: 107px;
  font-weight: 800;
  color: var(--ghost);
}

/* ---------- Featured projects ---------- */
.projects {
  display: flex;
  flex-direction: column;
  gap: 100px;
  padding-bottom: 160px;
}
.projects__list { display: flex; flex-direction: column; gap: 100px; }
.project { display: flex; flex-direction: column; gap: 32px; }
.project__head { display: flex; flex-direction: column; gap: 12px; }

.tags { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--chip);
  font-size: 14px;
  line-height: 28px;
  color: var(--muted);
}

.project__text { display: flex; flex-direction: column; gap: 10px; }
.project__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  color: var(--ink);
}
.project__title h3 { font-size: 40px; line-height: 48px; font-weight: 700; }
.project__title svg { width: 40px; height: 40px; transition: transform 0.25s ease; }
.project__title:hover svg { transform: translateX(6px); }
.project__desc { font-size: 16px; line-height: 1.6; color: var(--muted); }

.project__media {
  display: block;
  aspect-ratio: 1140 / 641;
  border-radius: var(--radius);
  overflow: hidden;
}
.project__media img,
.project__media video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- UX Talks ---------- */
.talks {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 120px;
}
.talks__intro { font-size: 20px; line-height: 32px; color: var(--muted); }

.talks__browser { position: relative; }
.talks__list {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.talks__list::-webkit-scrollbar { display: none; }
.talk {
  flex: 0 0 min(502px, 44%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-snap-align: start;
}
.talk__title { font-size: 20px; line-height: 32px; color: var(--muted); }

/* YouTube thumbnail that turns into the player on click (same as Framer did) */
.yt {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000 center / cover no-repeat;
  cursor: pointer;
}
.yt img, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.yt button {
  position: absolute; top: 50%; left: 50%;
  width: 68px; height: 48px; padding: 0;
  transform: translate(-50%, -50%);
  border: 0; background: transparent; cursor: pointer;
}
.yt button path:first-child { fill: #212121; fill-opacity: 0.8; transition: fill 0.1s, fill-opacity 0.1s; }
.yt:hover button path:first-child { fill: #f00; fill-opacity: 1; }

.talks__arrow {
  position: absolute;
  top: 118px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.talks__arrow[hidden] { display: none; }
.talks__arrow svg { width: 24px; height: 24px; fill: none; stroke: rgb(61, 91, 135); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.talks__arrow--prev { left: 16px; }
.talks__arrow--next { right: 16px; }

.talks__fade {
  position: absolute;
  top: 0;
  z-index: 3;
  width: 100px;
  height: 100%;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.talks__fade--right { right: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff); }
.talks__fade--left { left: 0; background: linear-gradient(270deg, rgba(255, 255, 255, 0), #fff); opacity: 0; }
.talks__browser.is-scrolled .talks__fade--left { opacity: 1; }
.talks__browser.is-at-end .talks__fade--right { opacity: 0; }

/* ---------- Contact ---------- */
.contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 60px;
}
.contact__title { font-size: 40px; line-height: 48px; font-weight: 700; color: var(--ink); }
.contact__text { font-size: 20px; line-height: 32px; color: var(--muted); }
.contact__icons { display: flex; gap: 24px; padding-top: 16px; }
.contact__icons > * { display: block; width: 32px; height: 32px; }
.contact__icons svg { width: 32px; height: 32px; display: block; }
.contact__icons a { transition: opacity 0.2s ease; }
.contact__icons a:hover { opacity: 0.7; }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}
.footer__credit { font-size: 16px; line-height: 28px; color: var(--muted); }
.footer__copy { font-size: 14px; line-height: 24px; color: var(--label); }

/* =================================================================
   Phone layout (Framer's breakpoint: below 1220px)
   ================================================================= */
@media (max-width: 1219.98px) {
  .nav { display: none; }

  .phone-nav {
    display: block;
    position: relative;
    z-index: 10;
    margin-bottom: 10px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  }
  .phone-nav__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 10px 0 20px;
  }
  .phone-nav__actions { display: flex; align-items: center; gap: 4px; }
  .cv-button--small { align-self: auto; height: 34px; margin: 0; padding: 0 12px; font-size: 13px; gap: 6px; }
  .cv-button--small svg { width: 14px; height: 14px; }
  .phone-nav__toggle {
    position: relative;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .phone-nav__line {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    border-radius: 10px;
    background: #999;
    transition: transform 0.25s ease, top 0.25s ease;
  }
  .phone-nav__line:nth-of-type(2) { top: 18px; }
  .phone-nav__line:nth-of-type(3) { top: 25px; }
  .phone-nav.is-open .phone-nav__line:nth-of-type(2) { top: 21px; transform: rotate(45deg); }
  .phone-nav.is-open .phone-nav__line:nth-of-type(3) { top: 21px; transform: rotate(-45deg); }

  .phone-nav__menu {
    display: none;
    flex-direction: column;
    padding: 0 20px 10px;
  }
  .phone-nav.is-open .phone-nav__menu { display: flex; }
  .phone-nav__menu a {
    padding: 13px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    line-height: 30px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #444;
  }
  .phone-nav__menu a:last-child { border-bottom: 0; }

  .hero { gap: 88px; }
  .hero__texts { gap: 0; padding: 200px 0; }
  .hero__name,
  .hero__roles { font-size: 32px; line-height: 48px; }
  .hero__roles { height: 48px; }

  .timeline { flex-direction: column; gap: 40px; }
  .timeline__label { font-size: 16px; line-height: 24px; }
  .timeline__text { font-size: 14px; line-height: 24px; }

  .section-title { font-size: 32px; line-height: 48px; }

  .projects { gap: 40px; padding-bottom: 80px; }
  .projects__list { gap: 60px; }
  .project { gap: 24px; }
  .project__head { gap: 16px; }
  .tags li { padding: 4px 12px; font-size: 12px; line-height: 24px; }
  .project__title h3 { font-size: 24px; line-height: 32px; }
  .project__desc { font-size: 14px; }

  .talks { gap: 40px; padding-bottom: 60px; }
  .talks__intro { font-size: 14px; line-height: 1.6; }
  .talks__list { flex-direction: column; overflow: visible; scroll-snap-type: none; }
  .talk { flex-basis: auto; gap: 12px; }
  .talk__title { font-size: 16px; line-height: 1.6; }
  .talks__arrow, .talks__fade { display: none; }

  .contact__title { font-size: 24px; line-height: 32px; }
  .contact__text { font-size: 14px; line-height: 1.6; }
}
