:root {
  --bg-dark: #0f0f11;
  --bg-mid: #1a1b1f;
  --line: #2f323a;
  --line-soft: #22242b;
  --text: #ffffff;
  --muted: #c2c7d1;
}

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

body {
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  min-height: 100vh;
}

/* Homepage, apps & bio: light mode */
.home-page,
.apps-page,
.bio-page {
  --home-bg: #f5f5f7;
  --home-line: #e0e0e5;
  --home-text: #1c191a;
  --home-muted: #6b6b73;
  background-color: var(--home-bg);
  background-image: linear-gradient(var(--home-line) 1px, transparent 1px), linear-gradient(90deg, var(--home-line) 1px, transparent 1px), radial-gradient(circle at 20% 20%, rgba(0,0,0,0.03) 0, transparent 35%);
  background-size: 36px 36px, 36px 36px, auto;
}

.home-wrap {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  text-align: center;
}

.home-page .home-wrap,
.bio-page .home-wrap {
  color: var(--home-text);
}

.home-wrap h1 {
  color: #fff;
  font-size: clamp(3rem, 13vw, 9rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.home-page .home-wrap h1,
.bio-page .home-wrap h1 {
  color: var(--home-text);
}

.home-wrap p {
  color: var(--muted);
  font-size: clamp(1rem, 2.8vw, 1.3rem);
  margin-top: 1rem;
}

.home-page .home-wrap p,
.bio-page .home-wrap p {
  color: var(--home-muted);
}

.home-logo {
  animation: spin 8s linear infinite;
  flex-shrink: 0;
  height: clamp(140px, 28vw, 220px);
  margin-bottom: 1.5rem;
  width: auto;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.site-nav {
  padding: 1.25rem 1.5rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 1.75rem;
}

.site-nav nav {
  display: flex;
  justify-content: center;
  justify-self: center;
  gap: 2.1rem;
  font-size: 1.08rem;
}

.nav-logo-link {
  display: inline-block;
}

.nav-logo {
  display: block;
  width: clamp(84px, 10vw, 140px);
  height: auto;
  animation: spin 10s linear infinite;
}

.nav-spacer {
  width: clamp(84px, 10vw, 140px);
  height: 1px;
}

.nav-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  color: var(--muted);
}

.home-page .nav-link,
.apps-page .nav-link,
.bio-page .nav-link {
  color: var(--home-muted);
}

.nav-link-active {
  color: var(--text);
}

.home-page .nav-link-active,
.apps-page .nav-link-active,
.bio-page .nav-link-active {
  color: var(--home-text);
  text-decoration-thickness: 2px;
}

.apps-wrap {
  margin: 0 auto;
  max-width: 980px;
  min-height: 100vh;
  padding: 2rem 1rem 3rem;
}

.apps-header {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.apps-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.apps-header a {
  color: var(--muted);
  text-decoration: none;
}

.apps-header a:hover {
  color: #fff;
}

.apps-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.app-card {
  background: linear-gradient(180deg, rgb(30 32 38 / 85%), rgb(23 24 29 / 85%));
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  min-height: 170px;
  padding: 1rem;
}

.app-card h2 {
  font-size: 1.1rem;
}

.app-card p {
  color: var(--muted);
  margin-top: 0.55rem;
}

/* Apps page: light styling */
.apps-page .apps-wrap {
  color: var(--home-text);
}

.apps-page .apps-header h1 {
  color: var(--home-text);
}

.apps-page .apps-header a {
  color: var(--home-muted);
}

.apps-page .apps-header a:hover {
  color: var(--home-text);
}

.apps-page .app-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 245, 247, 0.96));
  border: 1px solid #dedee6;
  box-shadow: 0 12px 30px rgba(15, 15, 17, 0.08);
}

.apps-page .app-card h2 {
  color: var(--home-text);
}

.apps-page .app-card p {
  color: var(--home-muted);
}
