@font-face {
  font-family: "Space Grotesk";
  src: url("./fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}

:root {
  --bg-dark: #0a0a0a;
  --card-bg: #161618;
  --card-hover: #202023;
  --accent: #e0ff4f;
  --accent-text: #000000;
  --text-main: #ffffff;
  --text-muted: #888888;
  --radius: 28px;
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Space Grotesk", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Grid ── */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

/* ── Card Base ── */

.card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  display: flex;
  text-decoration: none;
  color: var(--text-main);
  transition:
    transform 0.4s var(--ease),
    background-color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px) scale(1.01);
  background-color: var(--card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  z-index: 2;
  outline: none;
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ── Profile ── */

.profile-card {
  grid-column: span 2;
  grid-row: span 2;
  padding: 2rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, var(--card-bg) 0%, #111111 100%);
  cursor: default;
}

.profile-card:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.05);
}

.profile-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.role {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.status-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #4fffa8;
  border-radius: 50%;
  box-shadow: 0 0 10px #4fffa8;
}

/* ── Portfolio ── */

.portfolio-card {
  grid-column: span 2;
  min-height: 220px;
  background-image: url("./site.avif");
  background-size: cover;
  background-position: center top;
  position: relative;
  align-items: flex-end;
  padding: 1.5rem;
}

.portfolio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.95) 20%,
    rgba(10, 10, 10, 0.5) 100%
  );
  z-index: 1;
  transition: background 0.4s var(--ease);
}

.portfolio-card:hover::before,
.portfolio-card:focus-visible::before {
  background: linear-gradient(
    to top,
    rgba(5, 5, 5, 0.98) 30%,
    rgba(10, 10, 10, 0.6) 100%
  );
}

.portfolio-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.portfolio-subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
  opacity: 0.9;
}

.portfolio-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portfolio-arrow {
  transition: transform 0.4s var(--ease);
  color: var(--accent);
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.portfolio-card:hover .portfolio-arrow,
.portfolio-card:focus-visible .portfolio-arrow {
  transform: translateX(5px) translateY(-5px);
}

.external-icon-corner {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.external-icon-corner svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ── Social ── */

.social-card {
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-direction: column;
  gap: 10px;
}

.social-card svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
  transition: color 0.3s var(--ease);
}

.social-label-mobile {
  display: none;
  font-size: 1rem;
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.social-card:hover,
.social-card:focus-visible {
  color: var(--text-main);
}

.social-card.linkedin:hover,
.social-card.linkedin:focus-visible {
  color: #0077b5;
  background-color: rgba(0, 119, 181, 0.1);
}

.social-card.x:hover,
.social-card.x:focus-visible {
  color: #ffffff;
  background-color: #000;
}

.social-card.reddit:hover,
.social-card.reddit:focus-visible {
  color: #ff4500;
  background-color: rgba(255, 69, 0, 0.1);
}

.social-card.github:hover,
.social-card.github:focus-visible {
  color: #ffffff;
  background-color: #24292e;
}

/* ── Contact ── */

.contact-card {
  grid-column: span 2;
  padding: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.copy-hint {
  display: flex;
  align-items: center;
  gap: 12px;
}

.copy-icon-circle {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.copy-icon-circle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.contact-card-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.contact-card-email {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
}

.contact-card-icon {
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

/* ── Toast ── */

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  translate: -50% 100px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
  box-shadow: 0 10px 25px rgba(224, 255, 79, 0.3);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.toast.show {
  translate: -50% 0;
  opacity: 1;
  visibility: visible;
}

.toast svg {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .bento-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .social-card {
    aspect-ratio: auto;
    padding: 1.2rem 1.5rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .social-card svg {
    width: 28px;
    height: 28px;
  }

  .social-label-mobile {
    display: block;
  }

  .profile-card {
    min-height: auto;
    padding: 2rem 1rem;
  }

  .portfolio-card {
    min-height: 200px;
  }

  .copy-icon-circle {
    width: 36px;
    height: 36px;
  }

  .copy-icon-circle svg {
    width: 16px;
    height: 16px;
  }

  .contact-card {
    padding: 1.2rem;
  }

  .contact-card-email {
    font-size: 0.9rem;
  }
}
