/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: #080808;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #080808;
  color: #e5e5e5;
  line-height: 1.5;
  position: relative;
}

#hex-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.page-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page-box {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  background-color: #080808;
}

/* --- Header --- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #1a1a1a;

  z-index: 10;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #e5e5e5;
  text-decoration: none;
}
.logo:hover { color: #f59e0b; }
.nav {
  display: flex;
  gap: 1.5rem;
}
.nav a {
  color: #a3a3a3;
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:hover { color: #f59e0b; }

/* --- Profile: cover aligned to page; avatar center on cover/body border --- */
.profile-section {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 320px;
}
.profile-section .profile-cover {
  border-radius: 0;
}
.profile-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  right: 0;
  box-sizing: border-box;
  /* background: #1a1a1a url("../imgs/cover.gif") center/cover no-repeat; */
  z-index: 0;
}
/* Avatar center (60px) sits on cover bottom (320px): top = 320 - 60 = 260px */
.profile-info {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0;
}
.profile-avatar-wrap {
  position: relative;
  width: 158px;
  height: 158px;
  border-radius: 50%;
  border: 8px solid #000000;
  box-sizing: content-box;
  flex-shrink: 0;
}
.profile-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #f54d0bae 40%, #f59e0b 70%);
  z-index: 0;
}
/* Cartoon glare shine overlay */
.profile-avatar-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1.5;
}
.profile-avatar-shine::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -80%;
  width: 45%;
  height: 140%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 15%,
    rgba(255, 255, 255, 0.85) 45%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.85) 55%,
    rgba(255, 255, 255, 0.25) 85%,
    transparent 100%
  );
  transform: skewX(-22deg) translateX(-100%);
  transition: transform 0s;
}
.profile-avatar-wrap:hover .profile-avatar-shine::before {
  transform: skewX(-22deg) translateX(380%);
  transition: transform 1s ease-out;
}
.profile-avatar {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  object-fit: cover;

  display: block;
  z-index: 2;
  background: #1a1a1a;
}
.profile-avatar-verified {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  z-index: 2;
  border: 5px solid #080808;
  box-sizing: content-box;
  font-family: system-ui, sans-serif;
}
.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.5rem 0 0;
  color: #fff;
}

.profile-marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 250px;
  margin-top:0;
}

.profile-marquee-inner {
  display: inline-flex;
  animation: profile-marquee-right 12s linear reverse infinite;
}

.profile-marquee-inner span {
  padding-right: 3rem;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

@keyframes profile-marquee-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Profile links: horizontal row on the right, aligned with avatar */
.profile-links {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  top:2rem;
  padding: 0.5rem 1rem;
  background-color: #000000;
  border: 2px solid #888888;
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-radius: 0.5rem;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}
.profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #737373;
  transition: color 0.2s;
}
.profile-link:hover {
  color: #f59e0b;
}
.profile-link svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* LinkedIn: jump + shake every 3s */
.profile-link-linkedin {
  animation: profile-link-shake 3s ease-in-out infinite;
}
@keyframes profile-link-shake {
  0%, 90%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  92% {
    transform: translateY(-6px) translateX(0) rotate(0deg);
  }
  94% {
    transform: translateY(-5px) translateX(-2px) rotate(-4deg);
  }
  96% {
    transform: translateY(-5px) translateX(2px) rotate(4deg);
  }
  98% {
    transform: translateY(-5px) translateX(-1px) rotate(-2deg);
  }
}

/* --- Hero (padding so text clears profile block) --- */
.hero {
  padding: 7.5rem 0 2rem;
  text-align: center;
  max-width: 42rem;
  margin: 3rem auto;
}
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #fff;
}
.hero-tagline {
  margin: 0;
  color: #a3a3a3;
  font-size: 1.1rem;
}

/* --- Content section (Featured + More + Labs) --- */
.content-section {
  padding: 1.2rem;
  max-width: 72rem;
  margin: 15rem auto;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #fff;
}
.section-subtitle {
  font-size: 0.95rem;
  color: #737373;
  margin: 0 0 1.5rem;
}

/* Featured: large cards, one column on small, two on large */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;

}
@media (min-width: 768px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-info { left: 2.5rem; transform: translateX(0) translateY(50%); }
  .content-section { padding: 1rem; }
  .profile-links { top:auto;  bottom: -3rem;  right:1.4rem; transform: translateX(0) translateY(-50%); box-shadow: 3px 3px rgba(255, 159, 5, 0.5);}
}
.card-featured .card-image-wrap { aspect-ratio: 16/9; }
.card-featured .card-body { padding: 1.25rem 1.5rem; }
.card-featured .card-title { font-size: 1.2rem; }
.card-featured .card-desc { margin-bottom: 1rem; }
.card-pill {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  background: #f59e0b;
  color: #0f0f0f;
  border-radius: 4px;
}
.card-featured .card-image-wrap,
.card .card-image-wrap { position: relative; }
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.card-cta-secondary {
  color: #a3a3a3;
  font-weight: 400;
}
.card-cta-secondary:hover { color: #e5e5e5; }

/* More projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Labs: dense grid of small cards */
.labs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .labs-grid { grid-template-columns: repeat(4, 1fr); }
}
.labs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  background: #1a1a1a;
  border: 1px solid #262626;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
.labs-card:hover { border-color: #404040; }
.labs-icon {
  width: 100%;
  aspect-ratio: 1;
  align-self: stretch;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: #262626;
  flex-shrink: 0;
}
.labs-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.labs-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.25rem;
}
.labs-desc {
  font-size: 0.8rem;
  color: #737373;
  margin-bottom: 0.5rem;
}
.labs-links {
  font-size: 0.75rem;
  color: #f59e0b;
}
.labs-card:hover .labs-links { color: #eab308; }

/* --- Card --- */
.card {
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #262626;
  transition: border-color 0.2s;
}
.card:hover { border-color: #404040; }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.card-body-bottom { margin-top: auto; }
.card-image-wrap {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #262626;
}
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-image-wrap .card-image-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card-image-wrap:hover .card-image-hover {
  opacity: 1;
}
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 1rem 1.25rem;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #fff;
}
.card-desc {
  font-size: 0.9rem;
  color: #a3a3a3;
  margin: 0 0 0.75rem;
  line-height: 1.45;
}
.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: #262626;
  color: #a3a3a3;
  border-radius: 4px;
}
.card-tech-stack { margin-bottom: 1rem; }
.card-tech-row {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: #a3a3a3;
}
.card-tech-row:last-child { margin-bottom: 0; }
.card-tech-label {
  display: inline-block;
  min-width: 5.5rem;
  font-weight: 500;
  color: #737373;
}
.card-features {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: #a3a3a3;
  line-height: 1.5;
}
.card-features li { margin-bottom: 0.25rem; }
.card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.card-stat { color: #a3a3a3; }
.card-stat-value { font-weight: 600; color: #f59e0b; }
.card-stat-label { text-transform: capitalize; margin-left: 0.2rem; }
.card-cta {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #f59e0b;
  padding: 0.35rem 0;
}
.card-cta:hover { color: #eab308; }



/* --- About --- */
.about {
  padding: 3rem 1.5rem 4rem;
  background: #1a1a1a;
  border-top: 1px solid #262626;
}
.about-content {
  max-width: 42rem;
  margin: 0 auto;
}
.about h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #fff;
}
.about p {
  margin: 0 0 1.25rem;
  color: #a3a3a3;
}
.about .cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #f59e0b;
  color: #0f0f0f;
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}
.about .cta:hover { background: #eab308; }

/* --- Footer --- */
.footer {
  padding: 1.5rem;
  border-top: 1px solid #262626;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: #737373;
}
.footer-links { display: flex; gap: 1rem; }
.footer a { color: #a3a3a3; text-decoration: none; }
.footer a:hover { color: #f59e0b; }
