/* ══════════════════════════════
   CONTACT
══════════════════════════════ */
#contact {
  --crimson: #9b1a1a;
  --crimson-light: #b52020;
  --bg: #ffffff;
  --text: #222;
  --icon-bg: #fff;
  --icon-border: #ccc;

  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
}

#contact .card {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  padding: 4rem 6rem;
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Left column */
.left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-left: 0.6rem;
}

.heading-block {
  display: flex;
  flex-direction: column;
}

.heading-block .bar {
  width: 60px;
  height: 5.6px;
  background: var(--text);
  margin-bottom: 10px;
}

.heading-block h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(3rem, 4.5vw, 3.2rem);
  color: var(--crimson);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0;
}

/* Contact items */
.contacts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  animation: fadeUp 0.7s ease both;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(4) { animation-delay: 0.4s; }

.icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--icon-border);
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.contact-item:hover .icon-wrap {
  border-color: var(--crimson);
  background: var(--crimson);
}

.contact-item:hover .icon-wrap svg {
  stroke: #fff;
  fill: none;
}

.icon-wrap svg {
  width: 18px;
  height: 18px;
  stroke: #555;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}

/* LinkedIn icon has fill-based logo */
.icon-wrap .linkedin-icon {
  width: 18px;
  height: 18px;
  fill: #555;
  stroke: none;
  transition: fill 0.2s;
}
.contact-item:hover .icon-wrap .linkedin-icon { fill: #fff; }

.contact-text {
  font-size: 1.65rem;
  font-weight: 450;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-text:hover { color: var(--crimson); }

a.contact-text {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--crimson);
}
a.contact-text:hover { color: var(--crimson-light); }

/* Right column */
.right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.5rem;
  justify-content: center;
}

.photo-frame {
  width: clamp(250px, 38vw, 350px);
  aspect-ratio: 3/4;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 6px 6px 0 var(--crimson);
  animation: fadeUp 0.8s ease 0.2s both;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  display: block;
}

/* Placeholder silhouette when no image */
.photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #ccc 0%, #aaa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-placeholder svg {
  width: 60%;
  height: 60%;
  opacity: 0.4;
}

.thank-you {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(3rem, 4.5vw, 3.2rem);
  font-weight: 300;
  color: var(--crimson);
  letter-spacing: -1px;
  line-height: 1;
  animation: fadeUp 0.9s ease 0.4s both;
}

.thank-you strong { font-weight: 700; }

/* ── TABLET (768px – 1024px) ── */
@media (max-width: 1024px) {
  #contact .card { padding: 3rem; gap: 2.5rem; }
  .heading-block h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
  .contact-text { font-size: 1.25rem; }
  .photo-frame { width: clamp(180px, 30vw, 260px); }
  .thank-you { font-size: clamp(2rem, 4vw, 2.8rem); }
}

/* ── MOBILE (≤ 640px) ── */
@media (max-width: 640px) {
  #contact .card {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 2rem 1.25rem;
    align-items: flex-start;
  }

  /* On mobile: photo + thank-you sit below the contact list */
  .right {
    order: 10;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    align-self: auto;
    /* pull the photo block up, closer to the contact list above it */
    margin-top: -1rem;
    margin-bottom: 1.8rem;
  }
  .photo-frame {
    width: clamp(280px, 55vw, 360px);
    box-shadow: 4px 4px 0 var(--crimson);
  }

  .thank-you {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
    letter-spacing: -0.5px;
  }

  .heading-block h1 { font-size: clamp(1.7rem, 7.5vw, 2.2rem); }
  .heading-block .bar { width: 40px; height: 4px; }

  .contacts { gap: 0.75rem; padding-bottom: 2rem; }

  .contact-text { font-size: 0.95rem; word-break: break-word; }

  .icon-wrap { width: 38px; height: 38px; }

  .icon-wrap svg,
  .icon-wrap .linkedin-icon {
    width: 15px;
    height: 15px;
  }
}
