/* ============ v2 homepage — synced from Figma node 349:1449 ============ */

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

:root {
  --bg: #141414;
  --card: #242424;
  --tile: #272727;
  --white: #ffffff;
  --white-64: rgba(255, 255, 255, 0.64);
  --white-48: rgba(255, 255, 255, 0.48);
  --white-44: rgba(255, 255, 255, 0.44);
  --white-32: rgba(255, 255, 255, 0.32);
  --white-24: rgba(255, 255, 255, 0.24);
  --white-16: rgba(255, 255, 255, 0.16);
  --white-12: rgba(255, 255, 255, 0.12);
  --white-08: rgba(255, 255, 255, 0.08);
  --white-04: rgba(255, 255, 255, 0.04);
}

body {
  background: var(--bg);
  font-family: "Geist", system-ui, sans-serif;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ---------- entrance animation (plays once on load) ---------- */

@keyframes enter-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@keyframes enter-down {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}

.menu {
  animation: enter-down 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.intro-heading,
.intro-bio,
.intro .btn-email,
.marquee,
.projects {
  animation: enter-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.intro-heading      { animation-delay: 0.06s; }
.intro-bio          { animation-delay: 0.12s; }
.intro .btn-email   { animation-delay: 0.18s; }
.marquee            { animation-delay: 0.24s; }
.projects           { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .menu, .intro-heading, .intro-bio, .intro .btn-email, .marquee, .projects { animation: none; }
}

/* ---------- sticky pill menu ---------- */

.menu {
  position: sticky;
  top: 20px;
  z-index: 100;
  width: min(590px, calc(100% - 32px));
  height: 60px;
  margin: 20px auto 0;
  border-radius: 100px;
  background: var(--white-08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 8px;
}

.menu-avatar {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 100px;
  overflow: hidden;
  background: #bcbcbc;
}

.menu-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-actions {
  display: flex;
  gap: 8px;
}

/* ghost buttons: no fill, just the glyph */
.menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 100px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.menu-btn:hover { opacity: 1; background: var(--white-08); }

.menu-btn img { display: block; }

/* ---------- intro ---------- */

.intro {
  width: min(590px, calc(100% - 48px));
  margin: 93px auto 0; /* 173px from page top minus menu block */
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: flex-start;
}

.intro-heading { display: flex; flex-direction: column; gap: 8px; }

.intro-heading h1 {
  font-size: 28px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.84px;
}

.intro-role {
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.096px;
  color: var(--white-48);
}

.intro-bio {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.096px;
  color: var(--white-64);
}

.intro-bio a {
  color: inherit;
  text-decoration: underline;
  text-underline-position: from-font;
  transition: color 0.2s ease;
}

.intro-bio a:hover { color: var(--white); }

/* ---------- Email Me button ---------- */

.btn-email {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--white-16);
  background: var(--white-24);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16), inset 0 0 24px rgba(255, 255, 255, 0.25);
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.096px;
  transition: background 0.2s ease;
}

.btn-email:hover {
  background: var(--white-32);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16), inset 0 0 24px rgba(255, 255, 255, 0.25),
              0 0 24px rgba(255, 255, 255, 0.24); /* outer glow */
}

/* shine sweep across the button on hover */
.btn-email::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.btn-email:hover::after { animation: btn-shine 0.7s ease; }

@keyframes btn-shine {
  from { left: -80%; }
  to   { left: 130%; }
}

.btn-email img { display: block; position: relative; }

/* ---------- infinite marquee ---------- */

.marquee {
  margin-top: 109px; /* strip sits at 669px in the design */
  width: 100%;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 110s linear infinite; /* one seamless lap = one 11-card set (~4.3k px) */
}

.marquee-set {
  display: flex;
  gap: 4px;
  padding-right: 4px;
}

.marquee-card {
  width: 387px;
  height: 308px;
  border-radius: 4px;
  background: var(--card);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  transition: background 0.25s ease;
}

.marquee-card:hover { background: #2e2e2e; }

.shot {
  position: relative;
  width: 346px;
  height: 216px;
  border-radius: 2px;
  overflow: hidden;
}

.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* light-canvas variant (agent builder shots sit on #f7f8f7 in the design) */
.shot--light { background: #f7f8f7; }

/* phone-pair variant: two 86x186 phones, centers 127px apart (gap 41px) */
.shot--phones {
  width: auto;
  height: 186px;
  display: flex;
  gap: 41px;
  background: none;
  border-radius: 0;
  overflow: visible;
}

.phone {
  position: relative;
  width: 86px;
  height: 186px;
  border-radius: 16px;
  overflow: hidden;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- selected projects ---------- */

.projects {
  width: min(590px, calc(100% - 48px));
  margin: 64px auto 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.projects-title {
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.096px;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.project-canvas {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 356px;
  border-radius: 8px;
  overflow: hidden;
}

.project-canvas { transition: background 0.25s ease; }

.project-canvas--ops { background: var(--white-16); }
.project-canvas--comp { background: var(--white-44); }
.project-canvas--phi { background: var(--white-32); gap: 24px; }

/* hover: nudge each canvas a touch brighter to signal it's clickable */
.project-canvas--ops:hover { background: rgba(255, 255, 255, 0.22); }
.project-canvas--comp:hover { background: rgba(255, 255, 255, 0.52); }
.project-canvas--phi:hover { background: rgba(255, 255, 255, 0.4); }

.canvas-img {
  width: 425px;
  max-width: calc(100% - 48px);
  height: 266px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.canvas-img--ops {
  width: 426px;
  border-radius: 0;
}

.canvas-phone {
  width: 122px;
  height: 264px;
  object-fit: cover;
  object-position: top;
  border-radius: 22px;
  display: block;
}

/* layered screenshots inside a canvas slot (Figma image stacks) */
.canvas-stack {
  position: relative;
  overflow: hidden;
}

.canvas-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.canvas-phone.canvas-stack img { object-position: top; }

.project-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* title + badge: side by side on desktop, badge drops below on mobile */
.project-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-text h2 {
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.096px;
  white-space: nowrap;
}

.title-link {
  color: inherit;
  text-decoration: underline;
  text-underline-position: from-font;
}

.title-link:hover { color: var(--white-64); }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--white-16);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.144px;
  white-space: nowrap;
}

.project-text p {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.084px;
  color: var(--white-48);
}

/* link-style "Open Project" button (compact per Figma: py 2px, no fixed height) */
.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border-radius: 100px;
  color: var(--white-48);
  text-decoration: underline;
  text-underline-position: from-font;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.084px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.btn-open:hover { color: var(--white); }

/* figma glyph tinted with the button's text color via mask */
.figma-glyph {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("../assets/img/v2-figma-icon.svg") center / contain no-repeat;
  mask: url("../assets/img/v2-figma-icon.svg") center / contain no-repeat;
}

/* ---------- "details" section ---------- */

.details {
  width: min(584px, calc(100% - 48px));
  margin: 94px auto 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  text-align: center;
}

.details-tile {
  width: 56px;
  height: 56px;
  border-radius: 100px;
  background: var(--tile);
  border: 1px solid var(--white-12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.details-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.details h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.84px;
}

.details-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.096px;
  color: var(--white-64);
}

.details-quote { color: var(--white); }

/* ---------- tilted profile card ---------- */

.tilted {
  margin-top: 66px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 20px 0; /* room for the rotated corners */
}

.profile-card {
  position: relative;
  width: 346px;
  padding: 20px;
  border-radius: 20px;
  /* padding-box layers paint the card, border-box layer paints the gradient border */
  border: 1px solid transparent;
  background:
    radial-gradient(140px 220px at 24% 25%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01) 70%, transparent) padding-box,
    linear-gradient(var(--tile), var(--tile)) padding-box,
    linear-gradient(150deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.06) 55%, rgba(255, 255, 255, 0.16)) border-box;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.16);
  transform: rotate(2.6deg);
  display: flex;
  flex-direction: column;
  gap: 40px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.profile-card:hover {
  transform: rotate(0deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), 0 0 32px rgba(255, 255, 255, 0.06);
}

/* soft sheen sweeping across the card on hover */
.profile-card::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -80%;
  width: 55%;
  height: 140%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 1;
}

.profile-card:hover::before { animation: card-shine 0.9s ease; }

@keyframes card-shine {
  from { left: -80%; }
  to   { left: 140%; }
}

.profile-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 100px;
  overflow: hidden;
  background: #bcbcbc;
}

.profile-avatar img {
  width: 125%; /* design crops a slightly zoomed portrait */
  height: 125%;
  object-fit: cover;
  display: block;
}

.profile-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  width: 100%;
}

.profile-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.48px;
}

.profile-sub {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.084px;
  color: var(--white-48);
}

.profile-divider {
  border: none;
  border-top: 1px solid var(--white-12);
  width: 100%;
}

.profile-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.profile-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 0;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.084px;
}

.profile-row > span:first-child {
  flex: 1;
  color: var(--white-48);
}

.profile-value {
  flex: 1;
  text-align: right;
  color: var(--white);
}

.profile-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.profile-tools img { display: block; }

.profile-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.profile-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.084px;
  text-align: center;
}

/* availability dot: soft glow + slow breathing pulse */
.profile-status img {
  border-radius: 50%;
  filter: drop-shadow(0 0 3px rgba(113, 208, 131, 0.7));
  animation: dot-pulse 2.4s ease-out infinite;
}

@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(113, 208, 131, 0.45); }
  70%  { box-shadow: 0 0 0 5px rgba(113, 208, 131, 0); }
  100% { box-shadow: 0 0 0 0 rgba(113, 208, 131, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .profile-status img { animation: none; }
}

.profile-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.profile-icon-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 100px;
  border: 1px solid var(--white-04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.profile-icon-btn:hover { background: var(--white-08); }

.btn-email--card {
  flex: 1;
  gap: 0;
}

/* ---------- footer ---------- */

.footer {
  width: min(587px, calc(100% - 48px));
  margin: 120px auto 0;
  padding: 16px 0 24px;
  border-top: 1px solid var(--white-08);
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.084px;
  color: var(--white-48);
}

.footer-left { flex: 1; }

.footer p:last-child { white-space: nowrap; }

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  /* project canvases keep the design ratio (590:356) and scale inside the grid
     instead of cropping at a fixed height */
  .project-canvas {
    height: auto;
    aspect-ratio: 590 / 356;
  }

  .canvas-img {
    width: 72%; /* 425/590 */
    height: auto;
    max-width: none;
    aspect-ratio: 425 / 266;
  }

  .canvas-img--ops { aspect-ratio: 426 / 266; }

  .canvas-phone {
    width: 20.7%; /* 122/590 */
    height: auto;
    aspect-ratio: 122 / 264;
    border-radius: 12px;
  }

  .project-canvas--phi { gap: 4%; }

  .project-text h2 { white-space: normal; }

  .project-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .project-title .badge { margin: 4px 0 2px; }

  /* footer stacks its two lines */
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ---------- lightbox (click on a marquee card) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* enlarged card: same proportions as a marquee card (387x308, shot 346x216) */
.lightbox-card {
  width: min(1100px, 100%);
  max-height: 100%;
  aspect-ratio: 387 / 308;
  background: var(--card);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.lightbox.is-open .lightbox-card { transform: scale(1); }

.lightbox-card .shot {
  width: 89.41%; /* 346/387 */
  height: auto;
  aspect-ratio: 346 / 216;
  border-radius: 8px;
}

/* phone pairs scale with the enlarged card: pair spans 213/387 of the card */
.lightbox-card .shot--phones {
  width: 55.04%; /* 213/387 */
  aspect-ratio: 213 / 186;
  border-radius: 0;
  justify-content: space-between;
  gap: 0;
}

.lightbox-card .shot--phones .phone {
  width: 40.38%; /* 86/213 */
  height: 100%;
  border-radius: clamp(16px, 3.5vw, 44px);
}

.lightbox-card { cursor: e-resize; } /* click advances to the next shot */

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 100px;
  background: var(--white-08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-nav svg { display: block; }

.lightbox-nav:hover { background: var(--white-24); }

.lightbox-nav--prev { left: 24px; }
.lightbox-nav--next { right: 24px; }
