/* ===========================================================
   Petr Šomek — personal site
   Custom styles layered on top of Tailwind (CDN)
   =========================================================== */

html { scroll-padding-top: 5rem; } /* offset for fixed navbar on anchor jumps */

body { overflow-x: hidden; }

/* ---------- Animated background decoration ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-decor::after {
  /* subtle grid overlay */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.blob-1 {
  width: 38rem; height: 38rem;
  top: -10rem; left: -8rem;
  background: radial-gradient(circle, #1b7ff5, transparent 70%);
  animation: drift1 22s ease-in-out infinite;
}
.blob-2 {
  width: 32rem; height: 32rem;
  top: 20%; right: -10rem;
  background: radial-gradient(circle, #10b981, transparent 70%);
  opacity: 0.35;
  animation: drift2 28s ease-in-out infinite;
}
.blob-3 {
  width: 30rem; height: 30rem;
  bottom: -12rem; left: 30%;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  opacity: 0.3;
  animation: drift1 26s ease-in-out infinite reverse;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(60px, 40px) scale(1.08); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-50px, 30px) scale(1.1); }
}

/* ---------- Hero artwork ---------- */
.hero-logo {
  /* background already removed (transparent PNG); no glow */
  display: block;
}

/* ---------- Navbar ---------- */
#navbar.scrolled {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  height: 2px; width: 0;
  background: linear-gradient(90deg, #59beff, #10b981);
  transition: width 0.25s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }

.mobile-link {
  display: block;
  padding: 0.75rem 0.5rem;
  border-radius: 0.5rem;
  color: #cbd5e1;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.mobile-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

/* ---------- Section headings ---------- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #59beff;
}
.section-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: linear-gradient(90deg, #59beff, transparent);
}
.section-eyebrow.justify-center { justify-content: center; }

.section-title {
  margin-top: 0.75rem;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  color: #fff;
}

/* ---------- About cards ---------- */
.info-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(89, 190, 255, 0.4);
  background: rgba(89, 190, 255, 0.06);
}

.skill-pill {
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  transition: border-color 0.2s, color 0.2s;
}
.skill-pill:hover { border-color: rgba(89, 190, 255, 0.5); color: #fff; }

/* ---------- Project cards ---------- */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 1.5rem;
  padding: 0;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.project-card::before {
  /* glow that follows the top edge on hover */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none; /* let clicks pass through to the link */
  padding: 1px;
  background: linear-gradient(135deg, rgba(89, 190, 255, 0.6), rgba(16, 185, 129, 0.3), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.7);
}
.project-card:hover::before { opacity: 1; }

.project-card--ghost {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.14);
  background: transparent;
}
.project-card--ghost::before { display: none; }

/* ---------- Project screenshot ---------- */
.project-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
/* placeholder shown until a real screenshot is dropped in */
.project-shot::after {
  content: "Screenshot coming soon";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}
.project-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1; /* covers the placeholder when loaded */
  transition: transform 0.4s ease;
}
.project-shot img.is-missing { opacity: 0; } /* hide broken-image glyph */
.project-card:hover .project-shot img { transform: scale(1.05); }

.project-shot__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.3rem 0.8rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
/* dark glassy base so the label stays readable over any screenshot
   (higher specificity than .badge-web / .badge-android) */
.project-shot__badge.badge-web,
.project-shot__badge.badge-android {
  background: rgba(2, 6, 23, 0.7);
  border-color: rgba(255, 255, 255, 0.22);
}
.project-shot__badge.badge-web    { color: #6ee7b7; }
.project-shot__badge.badge-android { color: #a9cdff; }

/* themed placeholder gradients per project */
.shot-emerald { background: linear-gradient(135deg, rgba(16,185,129,0.22), rgba(6,78,59,0.15)); }
.shot-cyan    { background: linear-gradient(135deg, rgba(34,211,238,0.22), rgba(8,47,73,0.15)); }
.shot-amber   { background: linear-gradient(135deg, rgba(251,191,36,0.20), rgba(120,53,15,0.15)); }
.shot-rose    { background: linear-gradient(135deg, rgba(244,63,94,0.20), rgba(76,5,25,0.15)); }
.shot-violet  { background: linear-gradient(135deg, rgba(167,139,250,0.22), rgba(46,16,101,0.15)); }

/* ---------- Project body ---------- */
.project-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.5rem 1.6rem 1.6rem;
}

.project-link {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 600;
  color: #8ed7ff;
  border: 1px solid rgba(142, 215, 255, 0.3);
  background: rgba(89, 190, 255, 0.08);
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.project-link:hover {
  background: rgba(89, 190, 255, 0.18);
  border-color: rgba(142, 215, 255, 0.6);
  color: #fff;
  transform: translateY(-2px);
}
.project-link svg { transition: transform 0.2s ease; }
.project-link:hover svg { transform: translateX(2px); }

.project-name {
  margin-top: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
}
.project-tagline {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #59beff;
}
.project-desc {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #94a3b8;
  flex: 1 1 auto;
}
.project-tech {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tech {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- Badges ---------- */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
}
.badge-web {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-android {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .blob,
  .animate-float,
  .animate-bounce,
  .animate-ping { animation: none !important; }
  html { scroll-behavior: auto; }
}
