/* Fonts are self-hosted on purpose: loading them from Google would send every visitor's IP address to Google,
   which doesn't fit a privacy policy that says we don't track anyone. DM Sans and DM Mono are open fonts (OFL). */
@font-face { font-family: 'DM Sans'; font-weight: 300 600; font-style: normal; font-display: swap; src: url('fonts/dm-sans-var.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/dm-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/dm-mono-500.woff2') format('woff2'); }

:root {
  --bg: #0a0a0f;
  --bg-2: #111118;
  --bg-3: #1a1a24;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --text-dim: #555568;
  --accent: #f0a500;
  --accent-2: #ff6b35;
  --accent-glow: rgba(240, 165, 0, 0.15);
  --blue: #4a9eff;
  --radius: 12px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* faint grain, same idea as the portfolio site */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--accent); text-decoration-color: rgba(240, 165, 0, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

.wrap { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 40px; }
.narrow { max-width: 760px; }

/* navigation */
nav {
  position: sticky; top: 0; z-index: 10;
  height: 64px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .wrap { height: 100%; display: flex; align-items: center; gap: 8px; }
.logo { font-weight: 600; font-size: 18px; color: var(--text); text-decoration: none; margin-right: auto; }
.logo span { color: var(--accent); }
.nav-link {
  font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none; padding: 8px 12px; border-radius: 8px;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* hero */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; width: 600px; height: 600px; right: -160px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); pointer-events: none;
}
.eyebrow { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
h1, h2, h3 { font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -2px; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 16px; }
h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; letter-spacing: 0; }
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 620px; margin: 20px 0 0; }

.fade-up { opacity: 0; transform: translateY(14px); animation: fadeUp 0.5s ease forwards; }
.d1 { animation-delay: 0.07s; } .d2 { animation-delay: 0.14s; } .d3 { animation-delay: 0.21s; } .d4 { animation-delay: 0.28s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-up { animation: none; opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* buttons and tags */
.btn {
  display: inline-block; font-family: 'DM Mono', monospace; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 12px 20px; border-radius: 10px; text-decoration: none; margin: 28px 12px 0 0;
  border: 1px solid var(--border-hover); color: var(--text); transition: all 0.2s ease;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0a0a0f; font-weight: 500; }
.btn.primary:hover { background: #ffb922; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; }

/* sections and cards */
section { padding: 56px 0; border-top: 1px solid var(--border); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-hover); background: var(--bg-3); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }
.card p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }
a.card { display: block; text-decoration: none; color: inherit; }

.app-head { display: flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.app-icon { width: 96px; height: 96px; border-radius: 22%; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); border: 1px solid var(--border); flex: none; }
.app-icon.small { width: 56px; height: 56px; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 28px; }
.shots img { width: 100%; height: auto; display: block; border-radius: 28px; }

.note { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--text-muted); }

/* text pages (privacy) */
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -1px; }
.doc h2 { font-size: 1.4rem; margin: 2.4rem 0 0.6rem; letter-spacing: -0.2px; }
.doc p, .doc li { color: #c9c9d6; }
.doc strong { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin: 0.45rem 0; }
.doc table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); color: #c9c9d6; }
.doc th { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }

footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--text-dim);
  font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.04em; }
footer a { color: var(--text-muted); }

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 64px 0 48px; }
  .nav-link { padding: 8px 8px; font-size: 11px; }
}
