@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #04070d;
  --text: #f4f8fc;
  --muted: #aab8c6;
  --accent: #3b82f6;
  --accent-2: #ef4444;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.container {
  width: min(960px, calc(100% - 48px));
  margin-inline: auto;
}

/* ================= TOP BAR ================= */

.project-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #eaf1f8;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(4, 7, 13, 0.45);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.back-link:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(-3px);
  background: rgba(8, 12, 20, 0.65);
}

.back-link svg {
  width: 14px;
  height: 14px;
}

.project-topbar .logo-mini {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: #f2f6fa;
}

.project-topbar .logo-mini span {
  color: var(--accent-theme, var(--accent-2));
}

/* ================= HERO ================= */

.project-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}

.project-hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.project-hero .hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(2, 3, 6, 0.98) 0%, rgba(2, 3, 6, 0.55) 42%, rgba(2, 3, 6, 0.72) 100%),
    linear-gradient(90deg, rgba(2, 3, 6, 0.55), transparent 60%);
}

.project-hero-inner {
  position: relative;
  width: 100%;
  padding: 0 clamp(20px, 5vw, 64px) 76px;
  display: grid;
  gap: 16px;
  max-width: 780px;
}

.project-hero-inner > * {
  opacity: 0;
  transform: translateY(24px);
  animation: pRiseIn 0.85s cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
}

@keyframes pRiseIn {
  to { opacity: 1; transform: translateY(0); }
}

.project-category {
  animation-delay: 0.05s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-theme, var(--accent-2));
  width: fit-content;
}

.project-category::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.project-title {
  animation-delay: 0.14s;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  color: #f8fbfe;
}

.project-tagline {
  animation-delay: 0.22s;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: #dce6f0;
  max-width: 46ch;
  line-height: 1.6;
}

.project-hero-actions {
  animation-delay: 0.32s;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.project-btn-live {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--accent-theme, var(--accent-2)) 55%, transparent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  --mx: 50%;
  --my: 50%;
}

.project-btn-live::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent-theme, var(--accent-2)) 45%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-btn-live:hover::before { opacity: 1; }

.project-btn-live:hover {
  transform: translateY(-3px);
  border-color: var(--accent-theme, var(--accent-2));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--accent-theme, var(--accent-2)) 30%, transparent);
}

.project-btn-live svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.project-btn-live:hover svg {
  transform: translate(3px, -3px);
}

.project-scroll-hint {
  animation-delay: 0.4s;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.project-scroll-hint svg {
  width: 12px;
  height: 12px;
  animation: pArrow 1.8s ease-in-out infinite;
}

@keyframes pArrow {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* ================= CONTENT ================= */

.project-content {
  padding: 100px 0 60px;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 60px;
}

.project-meta div {
  display: grid;
  gap: 6px;
}

.project-meta span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-meta strong {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: #f2f6fa;
}

.project-section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  color: #f5f9fc;
  margin-bottom: 18px;
}

.project-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
  max-width: 68ch;
  margin-bottom: 60px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 50px;
  margin-bottom: 70px;
}

.project-feature {
  display: grid;
  gap: 8px;
}

.project-feature .num {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--accent-theme, var(--accent-2));
}

.project-feature strong {
  font-size: 1rem;
  color: #f2f6fa;
  font-weight: 600;
}

.project-feature p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 80px;
}

.project-stack span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: #dbe6f1;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.project-stack span:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.tech-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  flex: 0 0 auto;
  font-family: "Poppins", sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.project-footer-cta {
  text-align: center;
  padding: 60px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-footer-cta p {
  color: var(--muted);
  margin-bottom: 20px;
}

@media (max-width: 720px) {
  .project-meta {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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