/* ─── Figma tokens (Brand mode) ─────────────────────────── */
/* Confirmed from Figma variables — update here if tokens change */
:root {
  --icon-inverse: #050505;       /* Icon/Inverse */
  --border-default: #262626;     /* border/default */
  --border-subtle: #cfcfcf;      /* border/subtle */
  --text-subtle: #92979F;        /* text/subtle */
}

/* ─── Type scale ─────────────────────────────────────────── */
/* Display   — 72px / 80lh / -1.44 tracking  — Montserrat 600 */
/* Headline  — 48px / 60lh / -0.96 tracking  — Montserrat 600 */
/* Subhead   — 32px / 48lh / -0.64 tracking  — Montserrat 600 */
/* Title     — 18px / 24lh / 0 tracking      — Montserrat 600 */
/* Body      — 14px / 20lh / 0 tracking      — Inter 500      */

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

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  background: #ffffff;
  color: var(--icon-inverse);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  scrollbar-gutter: stable;
}

/* ─── Page wrapper ──────────────────────────────────────── */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-top: 56px;
  padding-bottom: 80px;
}

/* ─── Header ────────────────────────────────────────────── */
.header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  max-width: 1230px;
  width: 100%;
  padding: 0 16px;
}

/* ─── Avatar ────────────────────────────────────────────── */
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.avatar img {
  position: absolute;
  left: -4.17%;
  top: -5.13%;
  width: 118%;
  height: 118%;
  object-fit: cover;
}

/* ─── Name / Role ───────────────────────────────────────── */
.info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.info .name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
}

.info .role {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--text-subtle);
}

.info .linkedin {
  font-size: 14px;
  line-height: 20px;
  color: #050505;
  text-decoration: underline;
  text-underline-offset: 1px;
}

/* ─── Blurb ─────────────────────────────────────────────── */
.blurb {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  gap: 40px;
  justify-content: center;
  width: 100%;
  max-width: 1230px;
  padding: 0 16px;
}

.blurb p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 72px;
  line-height: 80px;
  letter-spacing: -1.44px;
}

/* ─── Buttons ───────────────────────────────────────────── */
.buttons {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 48px;
  border-radius: 999px;
  border: 1.5px solid var(--border-default);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #222;
  color: #f1f1f1;
  transition: background 0.15s ease;
  width: 166px;
  padding: 24px 0;
}

.btn-primary .btn-label {
  transition: opacity 0.15s ease;
}

.btn-primary .btn-label.fading {
  opacity: 0;
}

.btn-primary:hover {
  background: #2c2c2c;
}

.btn-secondary {
  background: transparent;
  color: #050505;
}

.btn-view-work {
  gap: 8px;
  height: 68px;
  padding: 0 28px 0 32px;
}

.btn-view-work img {
  width: 24px;
  height: 24px;
  display: block;
}


/* ─── Project section ───────────────────────────────────── */
.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 104px 16px;
  width: 100%;
}

/* Title + role + description block */
.project-info {
  display: flex;
  flex-direction: column;
  gap: 104px;
  align-items: flex-start;
  padding-bottom: 104px;
  max-width: 1230px;
  width: 100%;
}

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

.project-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 72px;
  line-height: 80px;
  letter-spacing: -1.44px;
  color: #050505;
}

.project-role {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 48px;
  letter-spacing: -0.64px;
  color: var(--text-subtle);
}

.project-description {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 48px;       /* Headline */
  line-height: 60px;
  letter-spacing: -0.96px;
  color: var(--text-subtle);
  width: 100%;
}

/* Fade-up on scroll — starts hidden, transitions in when observed */
.project-title-group,
.project-description {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-title-group.visible { opacity: 1; transform: translateY(0); }
.project-description.visible { opacity: 1; transform: translateY(0); transition-delay: 200ms; }

/* Stacked full-width images */
.project-images {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1230px;
  width: 100%;
}

.project-image {
  width: 100%;
  height: 692px;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-image.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Entrance animations ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.header .avatar,
.header .info,
.blurb,
.blurb .buttons {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.header .avatar  { animation-delay: 0ms; }
.header .info    { animation-delay: 200ms; }
.blurb           { animation-delay: 400ms; }
.blurb .buttons  { animation-delay: 500ms; }

/* ─── Menu overlay ──────────────────────────────────────── */
/* Full-screen dark modal with backdrop blur; hidden until menu button clicked */
.menu-overlay {
  position: fixed;
  inset: 0;
  padding: 16px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.menu-modal {
  width: 100%;
  height: 100%;
  max-width: 720px;
  max-height: 720px;
  background: rgba(34, 34, 34, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.menu-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 48px;
  line-height: 60px;
  letter-spacing: -0.96px;
  color: white;
  text-decoration: none;
  text-align: center;
}

.menu-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Close button — light pill centered at the bottom of the modal */
.menu-close {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #ecedf2;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.menu-close:hover {
  background: #dddee4;
}

/* ─── Menu button ───────────────────────────────────────── */
/* Fixed circle, pinned bottom-right; hidden until project-1 scrolls into view */
@keyframes menuBtnIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.menu-btn {
  position: fixed;
  bottom: 32px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #222;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: background 0.15s ease;
  z-index: 100;
}

/* Spring entrance — cubic-bezier overshoots slightly for the bounce */
.menu-btn.visible:not(.entered) {
  animation: menuBtnIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: auto;
}

/* After entrance, switch to transition mode for the overlay fade toggle */
.menu-btn.entered {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.25s ease, background 0.15s ease;
}

.menu-btn.entered.hidden {
  opacity: 0;
  pointer-events: none;
}

.menu-btn:hover {
  background: #2c2c2c;
}

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px 16px;
  width: 100%;
  max-width: 1230px;
  margin: 0 auto;
  background: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-subtle);
  white-space: nowrap;
}

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Hero */
  .page {
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .blurb {
    gap: 32px;
  }

  .blurb p {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.72px;
  }

  /* Buttons — reduce padding so they don't feel oversized */
  .btn {
    padding: 18px 28px;
    font-size: 13px;
  }

  .btn-primary {
    width: auto;
    padding: 18px 28px;
  }

  .btn-view-work {
    height: auto;
    padding: 18px 24px;
  }

  /* Projects */
  .project {
    padding: 64px 16px;
  }

  .project-info {
    gap: 40px;
    padding-bottom: 40px;
  }

  .project-title {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.72px;
  }

  .project-role {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.4px;
  }

  .project-description {
    font-size: 24px;
    line-height: 34px;
    letter-spacing: -0.48px;
  }

  /* Images — drop the fixed height, use aspect ratio instead */
  .project-images {
    gap: 12px;
  }

  .project-image {
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
  }

  /* Menu overlay */
  .menu-overlay {
    padding: 12px;
  }

  .menu-modal {
    max-width: 100%;
    max-height: 100%;
  }

  .menu-links {
    gap: 28px;
  }

  .menu-link {
    font-size: 36px;
    line-height: 44px;
  }

  .menu-close {
    bottom: 32px;
  }

  /* Menu button — move slightly closer to edge on mobile */
  .menu-btn {
    right: 16px;
    bottom: 24px;
  }
}
