/* vars */
:root {
  --bg: #0b0d12;
  --glass: rgba(30,30,35,0.55);
  --border: rgba(255,255,255,0.12);
  --text: #ffffff;
  --subtle: rgba(255,255,255,0.75);
}

body.light {
  --bg: #f3f4f8;
  --glass: rgba(245,245,250,0.6);
  --border: rgba(0,0,0,0.1);
  --text: #111111;
  --subtle: rgba(0,0,0,0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, sans-serif;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* backsplash */

.background-overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(28px);
  background: linear-gradient(
    120deg,
    rgba(120,120,255,0.15),
    rgba(255,120,180,0.15),
    rgba(120,255,220,0.15)
  );
  z-index: -1;
}


/* card layout */
.container {
  position: relative;
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.card {
  width: min(1200px, 95%);
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 1.5rem;

  background: var(--glass);
  backdrop-filter: blur(25px);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  padding: 1.5rem;
}

/* side pane */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  height: 100%;
}

.profile-top img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.profile-top img:hover {
  transform: scale(1.06);
  box-shadow: 0 0 25px rgba(150,150,255,0.5);
}

.profile-top h1 {
  font-size: 1.5rem;
}

.profile-top .handle {
  font-size: 0.9rem;
  color: var(--subtle);
  margin-top: -0.25rem;
}

.profile-top .bio {
  font-size: 0.85rem;
  color: var(--subtle);
  line-height: 1.4;
  max-width: 240px;
}

/* links */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.links a {
  padding: 0.65rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.12);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  text-align: center;
}

.links a:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}

/* socials */
.socials {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.socials a:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(255,255,255,0.22);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/*  main grid  */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  overflow-y: auto;
  padding: 0.75rem;
}

.project {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  min-height: 170px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #fff;
}

.project::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.25));
}

.project h3 {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-size: 1rem;
  z-index: 1;
}

.tags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: 0.3s ease;
  z-index: 1;
}

.tag {
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  white-space: nowrap;
}

.project:hover {
  transform: scale(1.03);
}

.project:hover .tags {
  opacity: 1;
  transform: translateY(0);
}

/* footer */
footer {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
  cursor: pointer;
}

footer a:hover {
  opacity: 0.8;
}

/* mobile optimizations */
@media (max-width: 900px) {
  .container {
    min-height: auto;
    padding: 1rem;
  }

  .card {
    grid-template-columns: 1fr;
    height: auto;
  }

  .profile {
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem 0;
  }

  .profile-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 240px;
  }

  .links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .socials {
    margin-top: auto;
    justify-content: center;
  }

  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .projects {
    grid-template-columns: 1fr;
  }
}
