/* Contact (Holo lab): heading and links on the left, two email readouts in a glass panel on the right.
   Section backdrop, .sec-rule, .holo-frame and the heading fill are shared rules in pubs.css.
   The .mail-card rules are reused by the CV header (cv/cv.css adjusts them there). */
.ct-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
#contact .panel-head { margin-bottom: 0; }
.ct-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Email readouts */
.mail-grid { padding: 4px clamp(18px, 2.6vw, 34px); }
.mail-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label copy" "addr copy";
  column-gap: 20px; row-gap: 10px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line);
}
.mail-card:last-of-type { border-bottom-color: transparent; }
.mail-label {
  grid-area: label; display: inline-flex; align-items: center; gap: 10px;
  font: 600 11px/1 var(--font-display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
.mail-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--holo); box-shadow: 0 0 6px var(--holo); }
.mail-addr {
  grid-area: addr; justify-self: start;
  font: 500 clamp(18px, 1.9vw, 24px)/1.25 var(--font-display); letter-spacing: 0.01em; color: var(--text);
  overflow-wrap: anywhere; transition: color 0.25s;
}
.mail-addr:hover { color: var(--accent); text-decoration: none; }

.mail-copy {
  grid-area: copy; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 112px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--glass); cursor: pointer;
  font: 600 11px/1 var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--text);
  transition: color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.15s;
}
.mail-copy:hover { color: var(--accent); border-color: var(--holo); box-shadow: 0 0 14px color-mix(in srgb, var(--holo) 30%, transparent); }
.mail-copy:active { transform: scale(0.96); }
.mc-icon { position: relative; width: 13px; height: 13px; flex: none; }
.mc-icon svg { position: absolute; inset: 0; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: opacity 0.2s, transform 0.3s var(--ease); }
.mc-icon svg:last-child { opacity: 0; transform: scale(0.6); }
.mc-icon .ck { stroke-width: 1.8; stroke-dasharray: 16; stroke-dashoffset: 16; }

/* A glowing hairline draws under the row when an address is copied. */
.mail-sweep {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--holo); box-shadow: 0 0 8px var(--holo);
  transform: scaleX(0); transform-origin: left center; pointer-events: none;
}

.mail-card.is-copied .mail-addr { color: var(--accent); }
.mail-card.is-copied .mail-copy { color: var(--text); border-color: var(--holo); box-shadow: 0 0 0 3px var(--holo-soft), 0 0 16px color-mix(in srgb, var(--holo) 35%, transparent); }
.mail-card.is-copied .mc-icon svg:first-child { opacity: 0; transform: scale(0.6); }
.mail-card.is-copied .mc-icon svg:last-child { opacity: 1; transform: none; }
.mail-card.is-copied .ck { animation: mc-draw 0.45s var(--ease) 0.05s forwards; }
.mail-card.is-copied .mail-sweep { transform: none; transition: transform 0.7s var(--ease); }
@keyframes mc-draw { to { stroke-dashoffset: 0; } }

.sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 900px) {
  .ct-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: start; }
}
@media (max-width: 760px) {
  .mail-card { column-gap: 12px; padding: 22px 0; }
  .mail-copy { width: 44px; height: 44px; min-width: 0; padding: 0; }
  .mail-copy .mc-text { display: none; }
  .mc-icon, .mc-icon svg { width: 15px; height: 15px; }
  .mail-addr { font-size: 17px; }
}

/* Touch screens: thumb-sized targets. */
@media (pointer: coarse) {
  .mail-addr { padding: 12px 0; margin: -12px 0; }
  .mail-copy { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .mail-card.is-copied .ck { animation: none; stroke-dashoffset: 0; }
  .mail-card.is-copied .mail-sweep { transition: none; }
}
