/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f6f5fa;
  --bg-alt: #edecf5;
  --surface: #ffffff;
  --surface-hover: #f4f3fa;
  --border: #e3e1ee;
  --text: #191b2e;
  --text-dim: #565973;
  --text-faint: #8a8da3;
  --accent: #0d9488;
  --accent-2: #6366f1;
  --accent-soft: rgba(13, 148, 136, 0.08);
  --header-bg: rgba(246, 245, 250, 0.75);
  --header-bg-scrolled: rgba(246, 245, 250, 0.92);
  --mobile-nav-bg: rgba(246, 245, 250, 0.98);
  --on-accent: #ffffff;
  --grid-line: rgba(13, 148, 136, 0.06);
  --hero-glow: rgba(99, 102, 241, 0.12);
  --font-head: 'Autour One', sans-serif;
  --font-body: 'Autour One', sans-serif;
  --radius: 14px;
  --max-width: 1140px;
}

:root[data-theme="dark"] {
  --font-head: 'Bitcount Grid Single', sans-serif;
  --font-body: 'Bitcount Grid Single', sans-serif;
  --bg: #0b0d12;
  --bg-alt: #10131a;
  --surface: #151922;
  --surface-hover: #1b202c;
  --border: #242a38;
  --text: #e8eaf0;
  --text-dim: #9aa3b5;
  --text-faint: #626a7d;
  --accent: #5eead4;
  --accent-2: #818cf8;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --header-bg: rgba(11, 13, 18, 0.7);
  --header-bg-scrolled: rgba(11, 13, 18, 0.92);
  --mobile-nav-bg: rgba(11, 13, 18, 0.98);
  --on-accent: #06231d;
  --grid-line: rgba(94, 234, 212, 0.06);
  --hero-glow: rgba(129, 140, 248, 0.18);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.02em; }

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

ul { list-style: none; }

img { max-width: 100%; display: block; }

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

:root[data-theme="dark"] #bg-canvas {
  opacity: 1;
}

#particle-score {
  position: fixed;
  top: 89px;
  left: 16px;
  z-index: 5;
  display: none;
  font-family: var(--font-head, inherit);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #818cf8;
  background: rgba(21, 25, 34, 0.6);
  border: 1px solid rgba(129, 140, 248, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
  text-shadow: 0 0 8px rgba(129, 140, 248, 0.9);
  backdrop-filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

#mute-toggle {
  position: fixed;
  top: 89px;
  right: 16px;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  font-size: 1rem;
  line-height: 1;
  color: #818cf8;
  background: rgba(21, 25, 34, 0.6);
  border: 1px solid rgba(129, 140, 248, 0.4);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
#mute-toggle:hover { border-color: #818cf8; transform: translateY(-2px); }
#mute-toggle.is-muted { color: var(--text-faint); }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: var(--header-bg-scrolled);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.logo span { color: var(--accent); }

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav .nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
}
.main-nav .nav-cta:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 40%, transparent 100%);
}

.hero::after {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1.02;
  margin-bottom: 16px;
}

.hero-role {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-sub {
  max-width: 640px;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover { transform: translateY(-2px); background: #7ff2e0; }
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 24px 32px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  max-width: 800px;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ===== Sections ===== */
.section { padding: 120px 0; position: relative; z-index: 2; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 56px; max-width: 700px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.section-intro { color: var(--text-dim); font-size: 1.05rem; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: start;
}

.about-photo { display: flex; justify-content: center; }
.about-photo img {
  width: 200px;
  height: 200px;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.about-copy p {
  color: var(--text-dim);
  margin-bottom: 18px;
  font-size: 1.02rem;
}
.about-copy strong { color: var(--text); font-weight: 600; }

/* ===== Timeline ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--border);
}

.timeline-item { position: relative; }
.timeline-marker {
  position: absolute;
  left: -33px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt), 0 0 0 5px var(--border);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.timeline-header h3 { font-size: 1.2rem; }
.timeline-date {
  font-size: 0.8rem;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.timeline-org { color: var(--accent-2); font-weight: 500; margin-bottom: 10px; }
.timeline-desc { color: var(--text-dim); margin-bottom: 16px; max-width: 720px; }

.timeline-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-tags span {
  font-size: 0.78rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-4px); }

.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: var(--accent);
}
.skill-card li {
  color: var(--text-dim);
  font-size: 0.92rem;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}
.skill-card li:first-child { border-top: none; }

/* ===== Engine Marquee Ticker ===== */
.engine-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 40px;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.engine-marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: engineScroll 22s linear infinite;
}

.engine-marquee:hover .engine-marquee-track {
  animation-play-state: paused;
}

@keyframes engineScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.engine-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.engine-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.engine-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.engine-icon svg, .engine-logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  fill: currentColor;
}

.tools-marquee { margin-top: 40px; margin-bottom: 0; }
:root[data-theme="dark"] .tools-marquee img[src*="github.svg"],
:root[data-theme="dark"] .tools-marquee img[src*="elevenlabs.svg"] {
  filter: brightness(0) invert(1);
}

/* ===== Apps Grid (tile cards) ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
}

.app-card-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
}
.app-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-card-cover .legacy-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.app-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.app-card-body h3 { font-size: 1.02rem; }
.app-card-category { font-size: 0.82rem; color: var(--text-faint); }

.app-card-cta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.app-card:hover .app-card-cta { border-color: var(--accent); background: var(--accent-soft); }
.app-card-cta .cta-label { color: var(--accent); font-weight: 600; }
.app-card-cta .app-card-downloads { color: var(--text-faint); }

.legacy-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5a524;
  background: rgba(245, 165, 36, 0.14);
  border: 1px solid rgba(245, 165, 36, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.in-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}
.in-dev-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

/* ===== Micro SaaS ===== */
.saas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.saas-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.saas-card:hover { border-color: var(--accent); transform: translateY(-4px); }

.saas-card-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.saas-card h3 { font-size: 1.15rem; }
.saas-card p { color: var(--text-dim); font-size: 0.92rem; }

.saas-card-features { display: flex; flex-wrap: wrap; gap: 8px; }
.saas-card-features span {
  font-size: 0.76rem;
  color: var(--text-dim);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.saas-card-cta { margin-top: auto; padding-top: 6px; }
.saas-card-cta .btn { width: 100%; justify-content: center; }

/* ===== Awards Ticker ===== */
.awards-ticker-wrap {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.awards-ticker {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.awards-ticker::before,
.awards-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 3;
  pointer-events: none;
}
.awards-ticker::before { left: 0;  background: linear-gradient(to right, var(--bg-alt), transparent); }
.awards-ticker::after  { right: 0; background: linear-gradient(to left,  var(--bg-alt), transparent); }

.awards-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: ticker-scroll 50s linear infinite;
}

.awards-ticker:hover .awards-track { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.award-tile {
  display: flex;
  flex-direction: column;
  width: 190px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.award-tile:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.award-tile-icon {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.award-tile-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.award-tile-org {
  font-size: 0.7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.award-tile-name {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
}

.award-tile-year {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: 4px;
}

/* ===== Awards ===== */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.award-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.award-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.award-year {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.award-card h3 { font-size: 1rem; margin-bottom: 4px; }
.award-card p { color: var(--text-faint); font-size: 0.85rem; }

/* ===== Feature Grid (Game/XR work) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}
.feature-card-full {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, var(--surface), var(--bg-alt));
}
.feature-card-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.feature-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}
.feature-card-info h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.feature-card h3 { color: var(--accent); margin-bottom: 10px; font-size: 1.15rem; }
.feature-card h3 a { color: var(--text); transition: color 0.2s ease; }
.feature-card h3 a:hover { color: var(--accent); }
.feature-card p { color: var(--text-dim); font-size: 0.93rem; line-height: 1.6; }
.feature-card-footer {
  margin-top: auto;
  padding-top: 16px;
}

/* ===== Contact ===== */
.section-contact { text-align: center; }

.contact-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-link:hover { border-color: var(--accent); transform: translateY(-4px); }
.contact-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.contact-value { font-size: 1.05rem; font-weight: 500; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.back-top { color: var(--text-dim); transition: color 0.2s ease; }
.back-top:hover { color: var(--accent); }

.disclaimer-box {
  padding: 14px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
}
.disclaimer-box strong { color: var(--text); }

/* ===== App Detail Page ===== */
.app-hero {
  padding: 160px 0 60px;
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 32px;
}
.breadcrumb a { color: var(--text-dim); transition: color 0.2s ease; }
.breadcrumb a:hover { color: var(--accent); }

.app-hero-top {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.app-hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}
.app-hero-titles h1 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  margin-bottom: 8px;
}
.app-hero-titles .featured-badge {
  position: static;
  margin-bottom: 10px;
}
.app-hero-titles p {
  color: var(--text-dim);
  font-size: 1.02rem;
}

.app-hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.meta-pill {
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 999px;
}
.meta-pill strong { color: var(--accent); font-weight: 600; }

.app-hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Screenshot gallery */
.screenshot-gallery {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 40px 0;
  scroll-snap-type: x mandatory;
}
.screenshot-gallery img {
  height: 420px;
  width: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  scroll-snap-align: start;
  flex-shrink: 0;
}
.screenshot-gallery.wide img { height: 320px; }

/* Video demo (vertical shorts embed) */
.video-demo { margin-bottom: 48px; }
.video-demo h2 { font-size: 1.4rem; margin-bottom: 20px; }
.video-embed {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.video-embed video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-embed.wide { max-width: none; aspect-ratio: 16 / 9; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.video-grid .video-embed.wide { margin-bottom: 12px; }

.video-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 8px 0 24px;
  scroll-snap-type: x mandatory;
}
.video-scroll-item {
  flex-shrink: 0;
  width: 340px;
  scroll-snap-align: start;
}
.video-scroll-item .video-embed.wide { margin-bottom: 12px; }
.video-scroll-item h3 { font-size: 0.95rem; margin-bottom: 4px; }
.video-scroll-item p { color: var(--text-faint); font-size: 0.82rem; }
.video-grid h3 { font-size: 1rem; margin-bottom: 4px; }
.video-grid p { color: var(--text-faint); font-size: 0.85rem; }

.instagram-embed-wrap { display: flex; justify-content: center; }
.instagram-embed-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
}
.instagram-embed-note a { color: var(--accent); }

/* Detail grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}
.detail-main h2 {
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.detail-main p {
  color: var(--text-dim);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.sidebar-block h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.brand-cloud-head {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-dim);
  margin: 48px 0 20px;
}
.brand-logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.brand-logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.brand-logo-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.brand-logo-tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.72;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.brand-logo-tile:hover img { filter: none; opacity: 1; }
/* light mode: treat like any tile but invert the white logo to dark */
.brand-logo-tile--dark img { filter: grayscale(100%) invert(1); opacity: 0.9; }
.brand-logo-tile--dark:hover img { filter: invert(1); opacity: 1; }

/* dark mode: restore dark bg so white logos are actually visible */
:root[data-theme="dark"] .brand-logo-tile--dark {
  background: #14141f;
  border-color: var(--border);
}
:root[data-theme="dark"] .brand-logo-tile--dark:hover { border-color: var(--accent); }
:root[data-theme="dark"] .brand-logo-tile--dark img { filter: grayscale(100%); opacity: 0.88; }
:root[data-theme="dark"] .brand-logo-tile--dark:hover img { filter: none; opacity: 1; }

/* dark mode helper: invert dark-on-light logos that disappear on dark surfaces */
:root[data-theme="dark"] .brand-logo-tile--invert-dark img { filter: grayscale(100%) invert(1); opacity: 0.88; }
:root[data-theme="dark"] .brand-logo-tile--invert-dark:hover img { filter: invert(1); opacity: 1; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tags span {
  font-size: 0.82rem;
  color: var(--accent-2);
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}
.sidebar-block .fact { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--border); font-size: 0.92rem; }
.sidebar-block .fact:first-of-type { border-top: none; }
.sidebar-block .fact span:first-child { color: var(--text-faint); }
.sidebar-block .fact span:last-child { color: var(--text); font-weight: 500; }

.other-apps-nav {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding-top: 32px;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.other-apps-nav a { color: var(--accent); transition: opacity 0.2s ease; }
.other-apps-nav a:hover { opacity: 0.7; }

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

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--mobile-nav-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .nav-toggle { display: flex; }
  .hero-stats { gap: 32px; }
  .section { padding: 80px 0; }
}
