/* =========================
   Base / Reset
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #0f1115;
  color: #eaeaea;
}

/* =========================
   Layout
========================= */
.layout {
  display: flex;
  min-height: 100vh;
}

/* =========================
   Sidebar (Desktop)
========================= */
.sidebar {
  width: 260px;
  background: #161922;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.logo {
  width: 100px;
  border-radius: 50%;
}

.sidebar h1 {
  margin: 0;
  font-size: 1.5rem;
}

.bio {
  font-size: 0.9rem;
  color: #b0b3c2;
}

.socials a {
  display: block;
  color: #7aa2f7;
  text-decoration: none;
  margin-bottom: 6px;
}

/* =========================
   Main Content
========================= */
.content {
  flex: 1;
  padding: 32px;
}

/* =========================
   Project Grid
========================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* =========================
   Project Card
========================= */
.project-card {
  position: relative;
  overflow: hidden;
  border: 2px solid #2a2e3f;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #000;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Desktop hover only */
@media (hover: hover) {
  .project-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
  }

  .project-card:hover {
    transform: scale(1.05);
    border-color: #7aa2f7;
    z-index: 10;
  }

  .project-card:hover .project-overlay {
    opacity: 1;
  }
}

/* =========================
   Overlay
========================= */
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.92);
  opacity: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.25s ease;
}

.project-card.active .project-overlay {
  opacity: 1;
}

/* =========================
   Tablet
========================= */
@media (max-width: 1000px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   Mobile (REAL FIX)
========================= */
@media (max-width: 650px) {
  .layout {
    flex-direction: column;
  }

  /* Sidebar becomes a compact header */
  .sidebar {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 6px;
  }

  .logo {
    width: 48px;
  }

  .sidebar h1 {
    font-size: 1.2rem;
  }

  /* Bio removed completely */
  .bio {
    display: none;
  }

  .socials {
    display: flex;
    gap: 12px;
  }

  .socials a {
    margin: 0;
    font-size: 0.9rem;
  }

  .content {
    padding: 16px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}
