/* contact.css — "Let's talk.": ONE centered 760px column — title, email + LinkedIn cards side by side, location, an "or leave a message" divider, then the form directly on the page (no box).
   This section is a dark band in BOTH themes, so the cards use soft light borders. */

.contact {
  /* Form field colors. Dark: dark fields. Light: light grey fields with a darker border (they sit on the dark band) */
  --field-bg: var(--surface);
  --field-border: var(--line);
  --field-text: var(--heading);

  padding: 120px 0;
  --band: linear-gradient(var(--charcoal), var(--ink));
}
[data-theme="light"] .contact {
  --field-bg: var(--grey-100);
  --field-border: var(--grey-400);
  --field-text: var(--ink);
}

/* Everything shares the same 760px width, centered */
.contact__inner { max-width: 760px; margin-inline: auto; }

/* ---------- Top: eyebrow, title, one line (centered) ---------- */
.contact__head { text-align: center; }
.contact__head .eyebrow { margin-inline: auto; }
.contact__title { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -0.5px; color: var(--heading); }
.contact__lede { margin-top: 10px; font-size: 16px; color: var(--muted); }

/* ---------- Contact cards: 2 equal columns ---------- */
.contact__ways { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }

.contact-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  text-align: left;
  background: var(--white-a04);
  box-shadow: inset 0 0 0 1px var(--white-a12);
  transition: translate 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:hover,
.contact-card:focus-within { translate: 0 -2px; box-shadow: inset 0 0 0 1px var(--yellow); }

/* The link's invisible ::after covers the whole card, so the card is clickable everywhere */
.contact-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.contact-card__link:focus-visible { outline: none; }

.contact-card__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.contact-card__icon svg { width: 18px; height: 18px; }
.contact-card__icon--mail { color: var(--ink); background: var(--yellow); }
.contact-card__icon--linkedin { color: var(--white); background: var(--linkedin); }
.contact-card__icon--linkedin svg { width: 17px; height: 17px; }

.contact-card__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.contact-card__label { font-size: 12px; color: var(--muted); }
.contact-card__value { font-size: 15px; font-weight: 600; color: var(--heading); overflow-wrap: anywhere; }
.contact-card__hint { font-size: 12px; color: var(--muted); }

/* Copy button: sits above the card's link */
.contact-card__copy {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}
.contact-card__copy:hover,
.contact-card__copy:focus-visible { color: var(--heading); background: var(--white-a08); outline: none; }
.contact-card__copy svg { width: 16px; height: 16px; }
.contact-card__copy.is-copied { color: var(--yellow); }

.contact__place { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.contact__place svg { width: 14px; height: 14px; }

/* ---------- Divider: line — "or leave a message" — line ----------
   The two lines are drawn on each side of the text (instead of a background behind the text),
   so they stop neatly around it even on the section's gradient background */
.contact__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 40px 0 12px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.contact__divider::before,
.contact__divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.contact__note { text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Message form: right on the page, no box ---------- */
.contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }

/* Row 1: Name · Email · Phone */
.contact-form__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.contact-form__field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--heading); }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--field-text);
  background: var(--field-bg);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-a25); }

/* Honeypot: off screen, invisible to people */
.contact-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Row 3: hint on the left, Send button on the right */
.contact-form__actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.contact-form__hint { font-size: 12px; color: var(--muted); }

.contact-form__send { padding: 12px 22px; font-size: 15px; }
.contact-form__send:disabled { opacity: 0.6; cursor: progress; transform: none; }

/* Sending result (friendly error or thank-you), centered under the form */
.contact-form__status { align-self: center; padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; text-align: center; }
.contact-form__status.is-error { color: var(--ink); background: var(--rose); }
.contact-form__status.is-success { color: var(--ink); background: var(--green-soft); }

@media (max-width: 760px) {
  .contact { padding: 88px 0; }
  .contact__ways { grid-template-columns: 1fr; gap: 12px; }
  .contact-form__row { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 420px) {
  /* Hint above a full-width button */
  .contact-form__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .contact-form__hint { text-align: center; }
  .contact-form__send { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-card,
  .contact-card:hover,
  .contact-card:focus-within { translate: none; transition: none; }
}
