.contact-tablet {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 78%;
  height: 78%;
  max-width: 1035px;
  max-height: 713px;
  background: #111;
  border: 1px solid #3b3b3b;
  border-radius: 14px;
  padding: 2.1%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.mat[data-mat="contact"] .mat-accessory--wireless-mouse {
  bottom: 8%;
  right: 6%;
  left: auto;
  width: calc(var(--mat-cell) * 8);
  transform: rotate(14deg);
}

.mat[data-mat="contact"] .mat-accessory--calculator {
  top: 9%;
  right: auto;
  left: 5%;
  width: calc(var(--mat-cell) * 10);
  transform: rotate(-9deg);
}

/* ── Screen shell ── */
.contact-screen {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 36% 1fr;
}

/* ── Left: identity panel ── */
.contact-panel-identity {
  background: #1a2920;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 12% 10%;
}

.contact-avatar {
  width: clamp(110px, 14vw, 175px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2.5px solid #3d6b53;
  box-shadow: 0 0 0 5px rgba(61, 107, 83, 0.18);
  overflow: hidden;
  flex-shrink: 0;
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.9);
  transform-origin: center 22%;
}

.contact-identity-divider {
  width: 24px;
  height: 1px;
  background: #3d6b53;
}

.contact-identity-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 2.14vw, 26px);
  color: #d4e9d8;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.contact-resume-link {
  font-family: var(--font-body);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #7ab898;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(122, 184, 152, 0.5);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.contact-resume-link:hover,
.contact-resume-link:focus-visible {
  color: #a8d4bb;
  text-decoration-color: rgba(168, 212, 187, 0.7);
}

.contact-resume-link:focus-visible {
  outline: 2px solid #3d6b53;
  outline-offset: 3px;
  border-radius: 1px;
}

/* ── Right: note panel ── */
.contact-panel-note {
  background: #f4ecd8;
  padding: 9% 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-note-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 19px;
}

.contact-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a9060;
  flex-shrink: 0;
}

.contact-status-text {
  font-size: clamp(12px, 1.13vw, 14.5px);
  color: #8a7f6d;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-rule {
  height: 1px;
  background: #c8b89a;
  transform-origin: left center;
  transform: scaleX(0);
  animation: contact-rule-draw 0.75s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
  margin-bottom: 28px;
}

@keyframes contact-rule-draw {
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-rule {
    transform: scaleX(1);
    animation: none;
  }
}

.contact-bio {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.52vw, 20px);
  line-height: 1.65;
  color: #4a4238;
  margin-bottom: 31px;
  max-width: 42ch;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 13px 22px;
  background: #2f5141;
  color: #d4e9d8;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: clamp(14px, 1.21vw, 17px);
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 30px;
  transition: background 0.15s ease;
}

.contact-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.contact-cta:hover,
.contact-cta:focus-visible {
  background: #3d6b53;
}

.contact-cta:focus-visible {
  outline: 2px solid #2f5141;
  outline-offset: 2px;
}

.contact-channel-label {
  font-size: clamp(12px, 1.08vw, 14px);
  color: #9a8f7d;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.contact-icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--icon-color, #9a8f7d);
  border-radius: 6px;
  color: #3d3530;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: clamp(12px, 1.05vw, 13.5px);
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.contact-icon-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--icon-color, #9a8f7d);
  transition: color 0.15s ease;
}

.contact-icon-label {
  line-height: 1;
}

.contact-icon-link:hover,
.contact-icon-link:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  box-shadow: 0 0 0 1px var(--icon-color, #9a8f7d);
}

.contact-icon-link:focus-visible {
  outline: 2px solid var(--icon-color, #2f5141);
  outline-offset: 2px;
}

/* ── Scrollbar: contact theme ── */
.contact-screen {
  scrollbar-color: rgba(61, 107, 83, 0.4) transparent;
}

.contact-screen::-webkit-scrollbar-thumb {
  background: rgba(61, 107, 83, 0.35);
}

.contact-screen:hover::-webkit-scrollbar-thumb {
  background: rgba(61, 107, 83, 0.55);
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .contact-tablet {
    top: calc(50% - 36px);
    width: 92%;
    height: auto;
    max-height: calc(100dvh - 108px);
    max-width: none;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    overflow: hidden;
  }

  .contact-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    border-radius: 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .contact-panel-identity {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 6% 20px;
  }

  .contact-avatar {
    width: clamp(72px, 18vw, 96px);
    border-width: 3px;
    box-shadow: 0 0 0 6px rgba(61, 107, 83, 0.15), 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  .contact-identity-divider {
    display: none;
  }

  .contact-identity-name {
    font-size: clamp(20px, 5.5vw, 26px);
    white-space: normal;
  }

  .contact-resume-link {
    font-size: 12.5px;
    letter-spacing: 0.1em;
    padding: 8px 4px;
    margin: -8px -4px;
  }

  .contact-panel-note {
    padding: 20px 7% 28px;
    justify-content: flex-start;
  }

  .contact-note-status {
    margin-bottom: 12px;
  }

  .contact-rule {
    margin-bottom: 18px;
  }

  .contact-bio {
    font-size: clamp(15px, 3.8vw, 17px);
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .contact-cta {
    padding: 14px 28px;
    font-size: 15px;
    margin-bottom: 24px;
    min-height: 48px;
    border-radius: 6px;
    gap: 10px;
    align-self: stretch;
    justify-content: center;
  }

  .contact-cta svg {
    width: 20px;
    height: 20px;
  }

  .contact-channel-label {
    margin-bottom: 14px;
  }

  .contact-icons {
    gap: 10px;
  }

  .contact-icon-link {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    padding: 14px 14px;
    min-height: 48px;
    font-size: 13.5px;
    border-radius: 10px;
    border-width: 2px;
    gap: 10px;
    justify-content: center;
  }

  .contact-icon-link svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 380px) {
  .contact-tablet {
    width: 95%;
    border-radius: 14px;
  }

  .contact-screen {
    border-radius: 14px;
  }

  .contact-panel-identity {
    padding: 22px 5% 16px;
  }

  .contact-avatar {
    width: 64px;
  }

  .contact-identity-name {
    font-size: 18px;
  }

  .contact-panel-note {
    padding: 16px 5% 24px;
  }

  .contact-bio {
    margin-bottom: 16px;
    font-size: 14px;
  }

  .contact-cta {
    margin-bottom: 18px;
    padding: 12px 20px;
    font-size: 14px;
  }

  .contact-icon-link {
    padding: 12px 10px;
    font-size: 12.5px;
    border-radius: 8px;
  }
}

@media (max-width: 720px) and (max-height: 500px) {
  .contact-tablet {
    top: calc(50% - 36px);
    max-height: calc(100dvh - 84px);
    border-radius: 12px;
  }

  .contact-screen {
    border-radius: 12px;
  }

  .contact-panel-identity {
    flex-direction: row;
    padding: 12px 5%;
    gap: 12px;
  }

  .contact-avatar {
    width: 48px;
  }

  .contact-panel-note {
    padding: 10px 5% 16px;
  }

  .contact-bio {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .contact-cta {
    margin-bottom: 10px;
    padding: 10px 18px;
    align-self: flex-start;
  }

  .contact-note-status {
    margin-bottom: 6px;
  }

  .contact-rule {
    margin-bottom: 8px;
  }

  .contact-icons {
    gap: 6px;
  }

  .contact-icon-link {
    flex: 0 1 auto;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
  }
}
