:root {
  color-scheme: dark;
  --black: #050508;
  --white: #f0ede6;
  --cream: #e8e3d8;
  --accent: #c8f23a;
  --accent2: #ff5533;
  --muted: #7a7869;
  --card-bg: #0d0d14;
  --border: rgba(240,237,230,0.08);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.project-page {
  font-family: 'DM Sans', Arial, sans-serif;
  background:
    radial-gradient(ellipse 60% 60% at 80% 15%, rgba(200,242,58,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 15% 80%, rgba(255,85,51,0.04) 0%, transparent 55%),
    var(--black);
  color: var(--white);
  line-height: 1.65;
}

.project-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.project-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.back-link {
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
}

.project-kicker {
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--muted);
}

.project-hero,
.project-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.project-hero {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.project-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(200,242,58,0.08), transparent 30%, transparent 70%, rgba(255,85,51,0.08));
  pointer-events: none;
}

.project-title {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.project-summary {
  margin: 1rem 0 0;
  max-width: 70ch;
  color: var(--cream);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.75rem;
  border: 1px solid rgba(240,237,230,0.12);
  border-radius: 999px;
  color: var(--white);
  background: rgba(240,237,230,0.03);
  font-size: 0.84rem;
}

.tech-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  align-items: center;
}

.tech-logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-logo {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.tech-logo:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.tech-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(5, 5, 8, 0.95);
  border: 1px solid rgba(240,237,230,0.2);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.tech-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(5, 5, 8, 0.95);
}

.tech-logo-wrapper:hover .tech-tooltip {
  opacity: 1;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.project-section {
  padding: 1.5rem 1.7rem;
}

.project-section h2 {
  font-family: 'Syne', sans-serif;
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.project-section ul {
  margin: 0;
  padding-left: 1.2rem;
}

.project-section p,
.project-section li {
  color: var(--cream);
}

.project-footer {
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.1rem;
  align-items: start;
}

.demo-card {
  margin: 0;
  border: 1px solid rgba(240,237,230,0.12);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(240,237,230,0.03);
}

.demo-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #111;
}

.demo-card figcaption {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1rem 1.05rem;
  color: var(--cream);
}

.demo-card figcaption strong {
  color: var(--white);
  font-family: 'Syne', sans-serif;
}

.demo-copy {
  display: grid;
  gap: 1rem;
}

.demo-note {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(240,237,230,0.12);
  border-radius: 12px;
  background: rgba(240,237,230,0.03);
}

.demo-note h3 {
  margin: 0 0 0.5rem;
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
}

.demo-note p {
  margin: 0;
  color: var(--cream);
}

.demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .project-wrap { padding: 1.2rem 1rem 3rem; }
  .project-hero, .project-section { padding: 1.2rem; }
  .project-topbar { align-items: flex-start; flex-direction: column; }
  .tech-logo { width: 56px; height: 56px; }
  .tech-tooltip { font-size: 0.7rem; }
  .demo-grid { grid-template-columns: 1fr; }
}