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

:root {
  /* Size tokens (mirrors Figma "Size" variable collection) */
  --size-career-text-width: 420px;
}

html, body {
  background: #020202;
  min-height: 100%;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ── Screen container ── */
.screen {
  position: relative;
  width: 640px;
  min-height: 100vh;
  background: #000;
  box-shadow: 0 0 24px 0 rgba(40, 42, 42, 0.16);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Subtle gradient side borders */
.screen::before,
.screen::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.05) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 20;
}

.screen::before { left: 0; }
.screen::after { right: 0; }

/* ── Sticky header (navbar + headline) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0 50px;
  background: linear-gradient(
    to bottom,
    #000 0%,
    #000 84%,
    rgba(0, 0, 0, 0.9) 89%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 8px;
}

.navbar .logo img {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Button: text link (pill hit-area, no background) ── */
/* Figma component: ButtonLink (node 41:43) */
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 100px;
  font-size: 16px;
  line-height: 24px;
  color: #d1d1d1;
  text-decoration: underline;
  text-decoration-color: #4a4a4a;
  text-underline-offset: 2px;
  font-feature-settings: 'salt' 1;
  white-space: nowrap;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

.btn-link:hover {
  color: rgba(209, 209, 209, 0.8);
  text-decoration-color: transparent;
}

/* ── Headline ── */
.headline {
  display: flex;
  flex-direction: column;
}

.headline-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.name {
  font-family: 'PT Serif', serif;
  font-size: 36px;
  font-weight: 400;
  color: #e0f3f6;
  letter-spacing: 0.13px;
  font-feature-settings: 'salt' 1, 'cpsp' 1;
  line-height: 44px;
}

.subtitle {
  font-size: 19px;
  color: #6e6d6d;
  letter-spacing: -0.2px;
  font-feature-settings: 'salt' 1;
  line-height: 22px;
}

.cta-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 28px 0 40px;
}

.btn-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  background: #1f1f1f;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 400;
  color: #d1d1d1;
  text-decoration: none;
  line-height: 24px;
  white-space: nowrap;
  font-feature-settings: 'salt' 1;
  transition: background-color 0.15s ease;
}

.btn-pill:hover {
  background: #282828;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #1f1f1f;
  border-radius: 100px;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.btn-icon:hover {
  background: #282828;
}

.btn-icon img {
  width: 16px;
  height: 13px;
  display: block;
  transform: translateX(-1px);
}

/* ── Sections ── */
.section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 50px;
}

.section.projects {
  gap: 8px;
}

.section.career {
  padding-top: 20px;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #404040;
  line-height: 18px;
  font-feature-settings: 'salt' 1;
}

/* ── Project list ── */
.project-list {
  display: flex;
  flex-direction: column;
}

.project {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  height: 64px;
  text-decoration: none;
}

.project-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #d1d1d1;
  white-space: nowrap;
  font-feature-settings: 'salt' 1;
  line-height: 24px;
}

a.project .project-title {
  text-decoration: underline;
  text-decoration-color: #4a4a4a;
  text-underline-offset: 2px;
  width: fit-content;
}

a.project:hover .project-title {
  text-decoration: none;
}

.project.disabled .project-title {
  color: #6e6d6d;
}

.project-desc {
  font-size: 15px;
  color: #6e6d6d;
  line-height: 18px;
  font-feature-settings: 'salt' 1;
}

.badge,
.link-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #282828;
  border-radius: 100px;
  height: 18px;
}

.badge {
  padding: 0 6px 1px;
}

.link-badge {
  padding: 0 6px;
}

.badge-text {
  font-size: 12px;
  font-weight: 400;
  color: #9a9a9a;
  line-height: 12px;
  letter-spacing: 0.1px;
}

/* Hover-only domain badge — smooth fade + subtle scale */
.link-badge {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%) scale(0.97);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 250ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

a.project:hover .link-badge {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .link-badge { transition: none; }
}

/* Touch devices: no hover, so the domain badge never has a purpose —
   hide it entirely (regardless of viewport width) to prevent the
   absolutely-positioned badge from triggering horizontal scroll. */
@media (hover: none) {
  .link-badge { display: none; }
}

/* ── Career section ── */
.career {
  flex: 1;
}

.career-text {
  font-size: 16px;
  color: #d1d1d1;
  line-height: 24px;
  width: var(--size-career-text-width);
  max-width: 100%;
  font-feature-settings: 'salt' 1;
}

.career-text p + p {
  margin-top: 0;
}

.career-text a {
  color: #d1d1d1;
  text-decoration: underline;
  text-decoration-color: #4a4a4a;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.career-text a:hover {
  text-decoration: none;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 120px;
  width: 100%;
  font-size: 15px;
  color: #6e6d6d;
  white-space: nowrap;
  line-height: 18px;
  font-feature-settings: 'salt' 1;
}

.clients-grid span {
  display: flex;
  align-items: center;
  cursor: default;
  user-select: none;
}

/* Grid placement */
.client-myoffice    { grid-column: 1; grid-row: 1; }
.client-invision    { grid-column: 2; grid-row: 1; }
.client-ibm         { grid-column: 3; grid-row: 1; }
.client-wix         { grid-column: 4; grid-row: 1; }
.client-iqoption    { grid-column: 1; grid-row: 2; }
.client-taskade     { grid-column: 2; grid-row: 2; }
.client-icons8      { grid-column: 3; grid-row: 2; }
.client-ui8         { grid-column: 4; grid-row: 2; }

/* ── Footer ── */
.footer {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 50px;
  height: 150px;
  width: 100%;
}

.copyright {
  font-size: 15px;
  color: #6e6d6d;
  font-feature-settings: 'salt' 1;
  line-height: 18px;
}

.signature {
  display: block;
  width: 68px;
  height: 56px;
  flex-shrink: 0;
}

/* ── Responsive: mobile layout below 640px (mirrors Figma node 41:67) ── */
@media (max-width: 640px) {
  body {
    padding: 0 16px;
  }

  .screen {
    width: 100%;
  }

  .site-header,
  .section,
  .footer {
    padding: 0 18px;
  }

  .site-header {
    gap: 16px;
  }

  .navbar {
    padding: 16px 0 8px;
  }

  .cta-row {
    padding: 28px 0 30px;
  }

  .section.projects {
    gap: 4px;
  }

  .section.career {
    padding-top: 12px;
  }

  .career-text {
    width: 100%;
  }

  .clients-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    height: 140px;
  }

  .client-myoffice { grid-column: 1; grid-row: 1; }
  .client-invision { grid-column: 2; grid-row: 1; }
  .client-taskade  { grid-column: 3; grid-row: 1; }
  .client-iqoption { grid-column: 1; grid-row: 2; }
  .client-icons8   { grid-column: 2; grid-row: 2; }
  .client-ibm      { grid-column: 3; grid-row: 2; }
  .client-wix      { grid-column: 1; grid-row: 3; }
  .client-ui8      { grid-column: 2; grid-row: 3; }

  .footer {
    gap: 24px;
    height: 100px;
  }

  /* Hover-only domain badge has no purpose on touch — and its absolute
     positioning past the title's right edge caused horizontal scroll. */
  .link-badge {
    display: none;
  }
}
