:root{
  --brand:#1e40af;
  --brand-2:#3f87a6;
  --bg:#ffffff;
  --card:#ffffff;
  --ink:#0f172a;
  --muted:#6b7280;
  --border:#e5e7eb;
  --shadow:0 6px 18px rgba(0,0,0,.06);

  /* extras */
  --ink-2:#1f2937;
  --ring: color-mix(in oklab, var(--brand) 62%, transparent);
  --ring-soft: color-mix(in oklab, var(--brand) 20%, transparent);
}

body { background-color:#f7f9fc; }

/* ---------- Page shell ---------- */

.contact-wrapper{
  max-width: 980px;           /* a bit wider to fit the info card */
  margin: 0 auto;
  padding: clamp(16px, 4vw, 40px);
  position: relative;
  isolation: isolate;
}

.contact-hero{
  text-align:center;
  margin-bottom: clamp(16px, 4vw, 28px);
}

.fake-3d-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(2rem, 4vw, 2.75rem);
  text-align: center;
  color: #1e40af;
  text-shadow:
    1px 1px 0 #1a368f,
    2px 2px 0 #162e73,
    3px 3px 0 #12265c,
    4px 4px 0 #0d1d45;
  letter-spacing: 4px;
  margin: 0 0 .35rem;
}

.contact-sub{
  color: var(--muted);
  max-width: 58ch;
  margin: 0 auto;
}

/* ---------- Layout: form + sidebar ---------- */

.contact-grid{
  display:grid;
  gap: clamp(16px, 3vw, 24px);
  grid-template-columns: 1fr;
}
@media (min-width: 900px){
  .contact-grid{ grid-template-columns: 1.2fr .8fr; }
}

/* ---------- Card vibe & ambient background ---------- */

body{
  background:
    radial-gradient(60rem 60rem at -10% -10%, #e9efff 0%, transparent 60%),
    radial-gradient(52rem 52rem at 110% -10%, #fff4d6 0%, transparent 55%),
    radial-gradient(44rem 44rem at 50% 120%, #e7fff4 0%, transparent 55%),
    #f7f9fc;
}

.contact-wrapper::before,
.contact-wrapper::after{
  content:""; position:absolute; z-index:-1; pointer-events:none; border-radius:50%;
  filter: blur(48px); opacity:.45;
}
.contact-wrapper::before{
  width:520px; height:520px; top:-180px; left:-160px;
  background: radial-gradient(closest-side, rgba(30,64,175,.18), transparent 70%);
}
.contact-wrapper::after{
  width:560px; height:560px; bottom:-220px; right:-160px;
  background: radial-gradient(closest-side, rgba(250,204,21,.22), transparent 70%);
}

/* ---------- Form card ---------- */

.contact-form-section{
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.88)),
    radial-gradient(1000px 600px at 0 0, rgba(30,64,175,.05), transparent 40%);
  backdrop-filter: saturate(115%) blur(6px);
  -webkit-backdrop-filter: saturate(115%) blur(6px);
  border: 1px solid #e6eaf3;
  border-radius: 16px;
  padding: clamp(16px, 4vw, 28px);
  box-shadow: 0 10px 22px rgba(30,64,175,.08), var(--shadow);
}

.contact-form{ display:grid; gap: 1rem; }

.row-2{
  display:grid; gap: 1rem; grid-template-columns: 1fr;
}
@media (min-width: 640px){
  .row-2{ grid-template-columns: 1fr 1fr; }
}

/* ---------- Fields ---------- */

.field label{
  display:block;
  font-weight:700;
  color: var(--ink);
  margin: 0 0 .45rem;
}

.field input,
.field textarea{
  width:100%;
  padding: .85rem 1rem;
  border:1px solid #e3e7f2;
  border-radius:12px;
  font: inherit;
  color: var(--ink-2);
  background:#fbfbfe;
  transition: border-color .18s, box-shadow .18s, background-color .18s, transform .06s ease;
  min-height: 44px;
  box-sizing: border-box;
}

.field textarea{
  resize: vertical;
  min-height: 160px;
}

.field input:hover,
.field textarea:hover{ border-color:#cfd6ea; }

.field input:focus,
.field textarea:focus{
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 4px var(--ring-soft);
}

/* nice focus for keyboard users */
.field :where(input,textarea):focus-visible{
  outline:none;
  border-color: var(--ring);
  box-shadow: 0 0 0 4px var(--ring-soft);
}

.note{
  margin: .25rem 0 .5rem;
  color: var(--muted);
  font-size: .95rem;
}

/* ---------- Dividers & foot ---------- */

.section-divider{
  height:1px;
  background: linear-gradient(90deg, transparent, #e9eef7, transparent);
  margin: .5rem 0 1rem;
}

.form-foot{
  display:flex; gap:.75rem; align-items:center; justify-content:space-between; flex-wrap:wrap;
}

/* ---------- Submit ---------- */

.button.submit-btn{
  background: #1e40af;
  color:#fff;
  border:none;
  border-radius: 12px;
  padding: .9rem 1.25rem;
  font-weight:800;
  cursor:pointer;
  width:100%;
  transition: transform .12s ease, background-color .18s ease, box-shadow .18s ease;
  box-shadow: 0 10px 22px rgba(30,64,175,.22);
}
@media (min-width: 500px){
  .button.submit-btn{ width: fit-content; }
}
.button.submit-btn:hover{ background:#17348a; transform: translateY(-1px); }
.button.submit-btn:active{ transform: translateY(0); box-shadow: 0 6px 16px rgba(30,64,175,.18); }

/* ---------- Messages ---------- */

.success-msg{
  margin-top: .5rem;
  background: #ecfdf5;
  color:#065f46;
  border:1px solid #a7f3d0;
  border-radius:10px;
  padding:.65rem .8rem;
  font-weight:600;
}

.error-msg{
  margin-top:.5rem;
  background:#fef2f2;
  color:#991b1b;
  border:1px solid #fecaca;
  border-radius:10px;
  padding:.65rem .8rem;
  font-weight:600;
}

/* ---------- Honeypot ---------- */
.hp-field{
  position:absolute;
  left:-10000px;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* ---------- Sidebar: info card ---------- */

.info-card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.92)),
    radial-gradient(800px 400px at 100% 0, rgba(30,64,175,.05), transparent 40%);
  border:1px solid #e6eaf3;
  border-radius:16px;
  padding: clamp(14px, 3vw, 22px);
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}

.info-card h3{
  margin:0 0 .35rem; font-size:1.1rem; color:var(--ink);
}
.info-card p,
.info-card li{
  color:#334155;
}
.info-card .muted{ color:var(--muted); font-size:.95rem; }

.info-list{
  list-style:none; padding:0; margin:.5rem 0 0;
  display:grid; gap:.65rem;
}
.info-list li{
  display:grid; grid-template-columns: 20px 1fr; gap:.6rem; align-items:start;
}

/* simple icon bullets using CSS (no markup change needed if you prefer) */
.info-list li::before{
  content:"";
  width:18px; height:18px; border-radius:6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 2px 8px rgba(30,64,175,.25);
  margin-top:.15rem;
}

/* ---------- Social links row ---------- */

.socials{
  display:flex; flex-wrap:wrap; gap:.5rem .6rem; margin-top:.75rem;
}
.socials a{
  text-decoration:none; font-weight:700; font-size:.95rem;
  color:#183070; background:#eef2ff; border:1px solid #dbe2ff;
  padding:.4rem .6rem; border-radius:999px;
}
.socials a:hover{ background:#e5eaff; }

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}

/* ---------- DARK MODE ---------- */

html.dark-mode body{
  background:
    radial-gradient(60rem 60rem at -10% -10%, rgba(59,130,246,.16) 0%, transparent 60%),
    radial-gradient(52rem 52rem at 110% -10%, rgba(250,204,21,.12) 0%, transparent 55%),
    radial-gradient(44rem 44rem at 50% 120%, rgba(16,185,129,.12) 0%, transparent 55%),
    #0e1116;
}
html.dark-mode .contact-wrapper::before{
  background: radial-gradient(closest-side, rgba(59,130,246,.24), transparent 70%);
  opacity:.5;
}
html.dark-mode .contact-wrapper::after{
  background: radial-gradient(closest-side, rgba(250,204,21,.22), transparent 70%);
  opacity:.45;
}

html.dark-mode .contact-form-section{
  background: linear-gradient(180deg, rgba(16,19,22,.9), rgba(16,19,22,.9));
  border-color:#222a3a;
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
}

html.dark-mode .info-card{
  background: linear-gradient(180deg, rgba(18,22,28,.92), rgba(18,22,28,.92));
  border-color:#222a3a;
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
}

html.dark-mode .field label{ color:#e5e7eb; }

html.dark-mode .field input,
html.dark-mode .field textarea{
  background:#0f1318;
  color:#e5e7eb;
  border-color:#263146;
}

html.dark-mode .note,
html.dark-mode .info-card .muted{ color:#b3bcc7; }

html.dark-mode .button.submit-btn{
  background: var(--brand-2);
  box-shadow: 0 12px 26px rgba(63,135,166,.25);
}
html.dark-mode .button.submit-btn:hover{ background:#326d88; }

html.dark-mode .success-msg{
  background:#072b1f; color:#a7f3d0; border-color:#134e4a;
}
html.dark-mode .error-msg{
  background:#291414; color:#fecaca; border-color:#7f1d1d;
}

html.dark-mode .socials a{
  color:#dbeafe; background:#0b1220; border-color:#1e293b;
}
html.dark-mode .socials a:hover{ background:#0f172a; }
