.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:1.2rem;
  padding-bottom:2.5rem;
}

.card{
  background: linear-gradient(180deg, color-mix(in oklab, var(--surface) 92%, transparent), var(--surface));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1.1rem;
  box-shadow:var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover{ transform: translateY(-2px); border-color: color-mix(in oklab, var(--ring) 35%, var(--border)) }

.icon-wrap{
  width:48px; height:48px; display:grid; place-items:center;
  border-radius:12px; border:1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  margin-bottom:.6rem;
}
.icon-wrap img{ width:28px; height:28px; }

.card h2{ margin:.2rem 0 .25rem; font-size:1.15rem }

.handle{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  border:1px dashed var(--border);
  padding:.45rem .55rem; border-radius:10px; display:inline-block;
}
.hint{ margin:.5rem 0 0; color:#98a2b3; font-size:.9rem }
.kbd{
  border:1px solid var(--border); border-bottom-width:2px; padding:.1rem .35rem; border-radius:6px;
  background: color-mix(in oklab, var(--surface) 85%, white 0%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono";
}
.actions{ display:flex; gap:.5rem; margin-top:.7rem; flex-wrap:wrap }

/* Brand accents (tweak to taste) */
:root{
  --email: #6cc24a;
  --discord: #5865f2;
  --x: #000000;
  --reddit: #ff4500;
}
.card.email .icon-wrap{ border-color: color-mix(in oklab, var(--email) 45%, var(--border)) }
.card.discord .icon-wrap{ border-color: color-mix(in oklab, var(--discord) 55%, var(--border)) }
.card.x .icon-wrap{ border-color: color-mix(in oklab, var(--x) 80%, var(--border)) }
.card.reddit .icon-wrap{ border-color: color-mix(in oklab, var(--reddit) 65%, var(--border)) }

/* Toast (contact-only) */
.toast{
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(10px);
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  padding: .6rem .8rem; border-radius: 10px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0) }

/* Default: show black logo, hide white */
.x-logo--dark { display: none; }

/* When system is dark mode and no manual override */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) .x-logo--light { display: none; }
  html:not([data-theme="light"]):not([data-theme="dark"]) .x-logo--dark  { display: inline; }
}

/* Manual overrides */
html[data-theme="light"] .x-logo--light { display: inline; }
html[data-theme="light"] .x-logo--dark  { display: none; }

html[data-theme="dark"] .x-logo--light { display: none; }
html[data-theme="dark"] .x-logo--dark  { display: inline; }

/* Default: show black icon, hide white */
.email-logo--dark { display: none; }

/* System-level dark mode, unless overridden manually */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) .email-logo--light { display: none; }
  html:not([data-theme="light"]):not([data-theme="dark"]) .email-logo--dark  { display: inline; }
}

/* Manual overrides (theme toggle button) */
html[data-theme="light"] .email-logo--light { display: inline; }
html[data-theme="light"] .email-logo--dark  { display: none; }

html[data-theme="dark"] .email-logo--light { display: none; }
html[data-theme="dark"] .email-logo--dark  { display: inline; }