html, body { flex-direction: column; }

main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  font-family: 'Cabinet Grotesk', sans-serif;
  opacity: 0;
  transform: translateY(20px);
  animation: appear 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes appear { to { opacity: 1; transform: none; } }

@keyframes tileIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.35); }
  50%       { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

@keyframes shine {
  0%   { left: -75%; opacity: 1; }
  100% { left: 125%; opacity: 1; }
}

.tile {
  background: #111214;
  border: 0.5px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
  opacity: 0;
  animation: tileIn 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
  transition: border-color 0.25s ease, transform 0.2s cubic-bezier(0.16,1,0.3,1);
}

.tile::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.07), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  opacity: 0;
}

.tile:hover {
  border-color: rgba(255,255,255,0.2);
  transform: scale(0.97);
}
.tile:hover::before { animation: shine 0.45s ease forwards; }

.tile-profile  { grid-column: 1 / 3; grid-row: 1; animation-delay: 0.15s; }
.tile-github   { grid-column: 3 / 4; grid-row: 1; animation-delay: 0.20s; }
.tile-discord  { grid-column: 1 / 2; grid-row: 2; animation-delay: 0.25s; }
.tile-linkedin { grid-column: 2 / 3; grid-row: 2; animation-delay: 0.30s; }
.tile-archive  { grid-column: 3 / 4; grid-row: 2; animation-delay: 0.35s; }
.tile-connect  { grid-column: 1 / 4; grid-row: 3; animation-delay: 0.40s; }

.tile-profile {
  display: flex;
  align-items:
  center; gap: 16px;
  padding: 22px;
  cursor: default;
}

.pfp {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #1e2025;
  border: 1px solid rgba(255,255,255,0.08);
}

.pfp img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(10%);
  transition: filter 0.3s, transform 0.4s cubic-bezier(0.16,1,0.3,1);
}

.tile-profile:hover .pfp img { filter: grayscale(0%); }

.profile-text { display: flex; flex-direction: column; gap: 4px; }
.p-top { display: flex; align-items: center; gap: 8px; }

.p-name {
  font-size: 28px;
  font-weight: 700;
  color: #f0f0f2;
  letter-spacing: -0.04em;
  line-height: 1;
}

.p-pronoun { font-family: 'Instrument Mono', monospace;
  font-size: 14px;
  color: rgba(255,255,255,0.28);
  padding-top: 3px;
  padding: 12px 0 0 5px;
}

.p-role {
  font-size: 16px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.01em;
  margin-top: 4px;
}

.link-tile-inner { display: flex; flex-direction: column; justify-content: space-between; height: 100%; min-height: 90px; }

.tile-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.link-name { font-size: 16px; font-weight: 700; color: #e8e8ec; margin-top: auto; padding-top: 12px; letter-spacing: -0.02em; }

.link-arrow {
  position: absolute; top: 14px; right: 14px;
  font-size: 20px; color: rgba(255,255,255,0.3);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s cubic-bezier(0.16,1,0.3,1);
  transform: translate(4px, -4px);
}
.tile:hover .link-arrow { opacity: 1; transform: translate(0,0); }

.tile-github { background: #0d1117; }
.tile-github .tile-icon { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6); }

.tile-discord { background: #111127; }
.tile-discord .tile-icon {
  background: rgba(88,101,242,0.15); color: #818cf8;

}

.tile-linkedin { background: #0a1429; }
.tile-linkedin .tile-icon {
  background: rgba(10,102,194,0.2); color: #70b5f9;
}

.tile-archive { background: #130f0d; }

.tile-archive .tile-icon {
  background: rgba(239,159,39,0.12); color: #ef9f27;
}

.tile-connect {
  background: #0d1117;
  cursor: default;
}

.connect-layout { flex-direction: row; align-items: center; justify-content: space-between; min-height: 0; }
.connect-content { display: flex; align-items: center; gap: 14px; }
.tile-connect .tile-icon { background: rgba(129,140,248,0.18); color: #818cf8; }
.tile-connect .link-name { margin-top: 0; padding-top: 0; }

.connect-badge {
  font-family: 'Instrument Mono', monospace;
  font-size: 12px; color: #60a5fa;
  background: rgba(96,165,250,0.1);
  padding: 6px 14px; border-radius: 12px;
  border: 0.5px solid rgba(96,165,250,0.2);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.tile-connect:hover .connect-badge { background: rgba(96,165,250,0.18); border-color: rgba(96,165,250,0.4); }

@media (max-width: 540px) {
  .bento { grid-template-columns: 1fr 1fr; max-width: 400px; }
  .tile-profile  { grid-column: 1 / 3; grid-row: 1; }
  .tile-github   { grid-column: 1 / 2; grid-row: 2; }
  .tile-discord  { grid-column: 2 / 3; grid-row: 2; }
  .tile-linkedin { grid-column: 1 / 2; grid-row: 3; }
  .tile-archive  { grid-column: 2 / 3; grid-row: 3; }
  .tile-connect  { grid-column: 1 / 3; grid-row: 4; }
}

@media (max-width: 340px) {
  .bento { grid-template-columns: 1fr; }
  .tile-profile, .tile-github, .tile-discord,
  .tile-linkedin, .tile-archive, .tile-connect { grid-column: 1 / 2; grid-row: auto; }
}
