/* ==========================================================
   CONTACT SIDEBAR
   Desktop / Tablet / Mobile
========================================================== */

.nav-links .contact-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;

  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.contact-sidebar,
.contact-sidebar *,
.contact-sidebar *::before,
.contact-sidebar *::after {
  box-sizing: border-box;
}

.contact-sidebar {
  --cs-accent: #ea0044;
  --cs-surface: #141316;
  --cs-card: #1f1f1f;
  --cs-heading: #fafafa;
  --cs-text: #dedede;
  --cs-muted: #b8b8b8;
  --cs-border: rgb(84 84 84 / 50%);
  --cs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cs-duration: 0.6s;

  position: fixed;
  inset: 0;
  z-index: 20000;

  height: 100vh;
  height: 100dvh;

  visibility: hidden;
  pointer-events: none;

  transition: visibility 0s linear var(--cs-duration);

  font-family: "Roboto", Arial, Helvetica, sans-serif;
  color: var(--cs-text);
}

.contact-sidebar.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* =========================
   Remove Mobile Tap Highlight
========================= */

.contact-sidebar :is(a, button) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* =========================
   Background Blur
========================= */

.contact-sidebar__backdrop {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  padding: 0;
  border: 0;

  background: rgb(0 0 0 / 52%);

  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);

  opacity: 0;

  transition: opacity 0.45s var(--cs-ease);

  cursor: default;
  touch-action: none;
}

.contact-sidebar.is-open .contact-sidebar__backdrop {
  opacity: 1;
}

/* =========================
   Sidebar Panel
========================= */

.contact-sidebar__panel {
  position: absolute;
  inset: 0 0 0 auto;

  display: flex;
  flex-direction: column;

  width: min(440px, 100%);
  height: 100%;

  background: var(--cs-surface);
  color: var(--cs-text);

  box-shadow: -18px 0 60px rgb(0 0 0 / 18%);

  transform: translate3d(101%, 0, 0);

  transition: transform var(--cs-duration) var(--cs-ease);

  will-change: transform;
  isolation: isolate;
  outline: none;
}

.contact-sidebar.is-open .contact-sidebar__panel {
  transform: translate3d(0, 0, 0);
}

/* =========================
   Close Button
========================= */

.contact-sidebar__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;

  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border: 0;
  border-radius: 50%;

  background: transparent;
  color: var(--cs-muted);

  cursor: pointer;

  transition:
    color 0.2s ease,
    background-color 0.2s ease;

  -webkit-tap-highlight-color: transparent;
}

.contact-sidebar__close svg {
  display: block;
  width: 22px;
  height: 22px;
}

.contact-sidebar__close:hover {
  color: #fff;
  background: rgb(255 255 255 / 7%);
}

/* =========================
   Scroll Container
========================= */

.contact-sidebar__scroll {
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: #545454 transparent;

  padding: 64px 32px max(36px, env(safe-area-inset-bottom));
}

.contact-sidebar__content {
  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;
}

/* =========================
   Heading
========================= */

.contact-sidebar__heading-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-sidebar__title {
  margin: 0;

  color: var(--cs-heading);

  font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;

  overflow-wrap: break-word;
}

.contact-sidebar__title span {
  color: var(--cs-accent);
}

.contact-sidebar__subtitle {
  margin: 0;

  color: var(--cs-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* =========================
   Profile
========================= */

.contact-sidebar__identity {
  display: flex;
  align-items: center;

  min-width: 0;
  gap: 12px;
  margin-top: 28px;
}

.contact-sidebar__avatar {
  display: block;
  flex: 0 0 52px;

  width: 52px;
  height: 52px;

  border-radius: 50%;

  object-fit: cover;
  object-position: center;

  background: #1b1b1d;
}

.contact-sidebar__identity-text {
  display: flex;
  flex-direction: column;

  gap: 5px;
  min-width: 0;
}

.contact-sidebar__name {
  margin: 0;

  color: var(--cs-heading);

  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.contact-sidebar__availability {
  margin: 0;

  display: flex;
  align-items: center;
  gap: 5px;

  color: var(--cs-muted);

  font-size: 13px;
  line-height: 1.35;
}

.contact-sidebar__status-dot {
  display: inline-block;
  flex: 0 0 6px;

  width: 6px;
  height: 6px;

  border-radius: 50%;
  background: #31d48b;
}

/* =========================
   Group Labels
========================= */

.contact-sidebar__group {
  min-width: 0;
  margin-top: 32px;
}

.contact-sidebar__label {
  display: block;

  margin: 0 0 10px;

  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;

  color: var(--cs-muted);
}

/* =========================
   Email Card
========================= */

.contact-sidebar__email-card {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  min-width: 0;
  min-height: 62px;

  padding: 12px 14px;

  border: 1px solid var(--cs-border);
  border-radius: 16px;

  background: var(--cs-card);
}

.contact-sidebar__email-icon {
  display: block;
  flex: 0 0 20px;

  width: 20px;
  height: 20px;

  color: var(--cs-accent);
}

/* =========================
   Email Click to Copy
========================= */

.contact-sidebar__email-link {
  appearance: none;
  -webkit-appearance: none;

  display: block;
  flex: 1 1 auto;

  min-width: 0;
  margin: 0;
  padding: 0;

  border: 0;
  background: transparent;

  color: var(--cs-heading);

  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;

  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;

  cursor: pointer;

  transition: color 0.2s ease;
}

.contact-sidebar__email-link:hover {
  color: var(--cs-accent);
}

/* =========================
   Copy Icon
========================= */

.contact-sidebar__copy {
  display: grid;
  flex: 0 0 34px;
  place-items: center;

  width: 34px;
  height: 34px;
  margin-right: -6px;

  border: 0;
  border-radius: 9px;

  background: transparent;
  color: var(--cs-muted);

  cursor: pointer;

  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.contact-sidebar__copy:hover,
.contact-sidebar__copy.is-copied {
  color: #fff;
  background: rgb(255 255 255 / 7%);
}

.contact-sidebar__copy svg {
  display: block;

  width: 19px;
  height: 19px;
}

/* =========================
   Smooth Copy Feedback
========================= */

.contact-sidebar__copy-feedback {
  display: grid;
  grid-template-rows: 0fr;

  margin-top: 0;
  opacity: 0;

  transition:
    grid-template-rows 0.38s var(--cs-ease),
    margin-top 0.38s var(--cs-ease),
    opacity 0.3s ease;
}

.contact-sidebar__copy-feedback.is-visible {
  grid-template-rows: 1fr;

  margin-top: 8px;
  opacity: 1;
}

.contact-sidebar__copy-status {
  display: block;

  min-height: 0;
  overflow: hidden;

  color: #31d48b;

  font-size: 12px;
  line-height: 1.5;
}

.contact-sidebar__copy-feedback.is-error .contact-sidebar__copy-status {
  color: var(--cs-muted);
}

/* =========================
   Schedule Card
========================= */

.contact-sidebar__schedule {
  display: flex;
  flex-direction: column;
  gap: 14px;

  padding: 18px;

  border: 1px solid var(--cs-border);
  border-radius: 16px;

  background: var(--cs-card);
}

.contact-sidebar__schedule-heading {
  display: flex;
  align-items: center;

  gap: 12px;
  min-width: 0;
}

.contact-sidebar__calendar-icon {
  display: grid;
  place-items: center;

  flex: 0 0 44px;
  width: 44px;
  height: 44px;

  border-radius: 12px;

  color: var(--cs-accent);
  background: rgb(234 0 68 / 9%);
}

.contact-sidebar__calendar-icon svg {
  display: block;

  width: 23px;
  height: 23px;
}

.contact-sidebar__schedule-info {
  min-width: 0;
}

.contact-sidebar__schedule-title {
  margin: 0 0 5px;

  color: var(--cs-heading);

  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.contact-sidebar__schedule-meta {
  margin: 0;

  color: var(--cs-muted);

  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

/* =========================
   Book a Call Button
   Same Shadow as Navbar
========================= */

.contact-sidebar__book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 42px;
  width: 100%;

  padding: 10px 14px;

  border: 0;
  border-radius: 24px;

  background: var(--cs-accent);
  color: #fff;

  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;

  text-align: center;
  text-decoration: none;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  box-shadow:
    rgba(234, 0, 68, 0.68) 0px 0.48175px 0.86715px -1.16667px,
    rgba(234, 0, 68, 0.61) 0px 1.83083px 3.29549px -2.33333px,
    rgba(234, 0, 68, 0.3) 0px 8px 14.4px -3.5px,
    rgba(255, 255, 255, 0.1) 0.318477px 0.437996px 0.324881px -1.1875px inset,
    rgba(255, 255, 255, 0.84) 0.965802px 1.32798px 0.985225px -2.375px inset,
    rgba(255, 255, 255, 0.66) 2.55306px 3.51046px 2.6044px -3.5625px inset,
    rgba(255, 255, 255, 0.05) 8px 11px 8.16088px -4.75px inset;

  transition: box-shadow 0.3s ease;
}

.contact-sidebar__book:hover {
  color: #fff;
  background: var(--cs-accent);

  box-shadow:
    rgba(0, 0, 0, 0) 0px 0.597144px 0.597144px -0.9375px,
    rgba(0, 0, 0, 0) 0px 1.81088px 1.81088px -1.875px,
    rgba(0, 0, 0, 0) 0px 4.78699px 4.78699px -2.8125px,
    rgba(0, 0, 0, 0) 0px 15px 15px -3.75px;
}

/* =========================
   Animated Arrow
   Latest Projects Style
========================= */

.contact-sidebar__book-arrow-clip {
  display: block;
  position: relative;

  flex: 0 0 18px;

  width: 18px;
  height: 18px;

  overflow: hidden;
}

.contact-sidebar__book-arrow {
  display: block;

  position: absolute;
  inset: 0;

  width: 18px;
  height: 18px;

  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-sidebar__book-arrow--first {
  transform: translate(0, 0);
}

.contact-sidebar__book-arrow--second {
  transform: translate(-16px, 16px);
}

@media (hover: hover) and (pointer: fine) {
  .contact-sidebar__book:hover .contact-sidebar__book-arrow--first,
  .contact-sidebar__book:focus-visible .contact-sidebar__book-arrow--first {
    transform: translate(16px, -16px);
  }

  .contact-sidebar__book:hover .contact-sidebar__book-arrow--second,
  .contact-sidebar__book:focus-visible .contact-sidebar__book-arrow--second {
    transform: translate(0, 0);
  }
}

/* =========================
   Note
========================= */

.contact-sidebar__note {
  margin: 12px 0 0;

  color: var(--cs-muted);

  font-size: 13px;
  line-height: 1.5;
}

/* =========================
   Divider
========================= */

.contact-sidebar__divider {
  width: 100%;
  height: 1px;

  margin-top: 34px;

  background: var(--cs-border);
}

/* =========================
   Accessibility
========================= */

.contact-sidebar :where(a, button):focus-visible {
  outline: 2px solid var(--cs-accent);
  outline-offset: 3px;
}

.nav-links .contact-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* =========================
   Scroll Lock
========================= */

/* =========================
   Scroll Lock — Sticky Fix
========================= */

html.contact-sidebar-open {
  overflow-y: hidden !important;
  padding-right: var(--cs-scrollbar-width, 0px);
}

/* =========================
   Mobile
========================= */

@media (max-width: 599px) {
  .contact-sidebar__panel {
    width: 100%;
    box-shadow: none;
  }

  .contact-sidebar__scroll {
    padding: 72px 24px max(34px, env(safe-area-inset-bottom));
  }

  .contact-sidebar__title {
    font-size: clamp(27px, 7.2vw, 34px);
  }

  .contact-sidebar__identity {
    margin-top: 30px;
  }

  .contact-sidebar__group {
    margin-top: 36px;
  }

  .contact-sidebar__email-card {
    min-height: 64px;
  }

  .contact-sidebar__schedule {
    padding: 20px;
  }

  .contact-sidebar__close {
    top: 14px;
    right: 16px;
  }
}

/* =========================
   Small Mobile
========================= */

@media (max-width: 360px) {
  .contact-sidebar__scroll {
    padding-right: 18px;
    padding-left: 18px;
  }

  .contact-sidebar__schedule {
    padding: 15px;
  }

  .contact-sidebar__schedule-heading {
    gap: 9px;
  }

  .contact-sidebar__schedule-meta {
    font-size: 12px;
  }

  .contact-sidebar__email-link {
    font-size: 14px;
  }
}

/* =========================
   Reduced Motion
========================= */

@media (prefers-reduced-motion: reduce) {
  .contact-sidebar,
  .contact-sidebar__backdrop,
  .contact-sidebar__panel,
  .contact-sidebar__close,
  .contact-sidebar__book,
  .contact-sidebar__copy,
  .contact-sidebar__copy-feedback,
  .contact-sidebar__book-arrow {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
